GithubHelp home page GithubHelp logo

Comments (15)

martinisoft avatar martinisoft commented on August 12, 2024

Think I might have found the commit that changed the library in 9.3+

from repmgr.

martinmarques avatar martinmarques commented on August 12, 2024

root@debian7:~# dlocate /usr/include/postgresql/libpq-fe.h
libpq-dev: /usr/include/postgresql/libpq-fe.h

Which version of libpq-dev and libpq are you using?

Regards,

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024
$ sudo dpkg -l | grep postgres
ii  pgdg-keyring                        2014.1                        all          keyring for apt.postgresql.org
ii  postgresql-9.2                      9.2.10-1.pgdg14.04+1          amd64        object-relational SQL database, version 9.2 server
ii  postgresql-client-9.2               9.2.10-1.pgdg14.04+1          amd64        front-end programs for PostgreSQL 9.2
ii  postgresql-client-common            166.pgdg14.04+1               all          manager for multiple PostgreSQL client versions
ii  postgresql-common                   166.pgdg14.04+1               all          PostgreSQL database-cluster manager
ii  postgresql-server-dev-9.2           9.2.10-1.pgdg14.04+1          amd64        development files for PostgreSQL 9.2 server-side programming
$ sudo dpkg -l | grep libpq
ii  libpq-dev                           9.4.1-1.pgdg14.04+1           amd64        header files for libpq5 (PostgreSQL library)
ii  libpq5:amd64                        9.4.1-1.pgdg14.04+1           amd64        PostgreSQL C client library

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

Looks like pgdg is pulling in a 9.4 series libpq as a dependency, even when installing the 9.2 server dev package.

from repmgr.

dimitri avatar dimitri commented on August 12, 2024

Yes it is, by design, please see the FAQ and install the setup you seem to need as described there:

https://wiki.postgresql.org/wiki/Apt/FAQ#I_want_libpq5_for_version_X.2C_but_there_is_only_version_Y_in_the_repository

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

@dimitri That's the fun part, I am doing that.

$ sudo cat /etc/apt/sources.list.d/apt.postgresql.org.list
deb     http://apt.postgresql.org/pub/repos/apt trusty-pgdg main 9.2

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

I'm trying various apt pinning techniques to get it to attempt installing 9.2 based libs. So far my hunch is that 9.3+ breaks library compatibility so I need to somehow force apt to attempt grabbing the older libraries even though the newer one is supposed to be, but is really not compatible with 9.0 through 9.2 libraries.

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

A lot changed in 9.3 so I am not surprised a break happened. I can submit a PR if you like to update the README here to warn people that 9.2 and earlier cannot be compiled on Ubuntu against the pgdg repo (or official Ubuntu in 14.04 and newer).

from repmgr.

martinmarques avatar martinmarques commented on August 12, 2024

Add the 9.x at the end of you apt source line and you will have the appropriate libpq packages:

cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main 9.2

apt-cache policy libpq-dev
libpq-dev:
Instalados: 9.4.1-1.pgdg70+1
Candidato: 9.4.1-1.pgdg70+1
Tabla de versión:
*** 9.4.1-1.pgdg70+1 0
500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages
100 /var/lib/dpkg/status
9.2.10-1.pgdg70+1 0
500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/9.2 amd64 Packages
9.1.15-0+deb7u1 0
500 http://security.debian.org/ wheezy/updates/main amd64 Packages
9.1.14-0+deb7u1 0
500 http://cdn.debian.net/debian/ wheezy/main amd64 Packages

Then you can install the appropriate version you need.

Regards,

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

@martinmarques That's the thing. That version will not compile at all (see previous messages) on Ubuntu 14.04 against pgdg with 9.2 set for that repo. If I upgrade to PostgreSQL 9.3 it's totally fine and compiles normally.

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

@martinmarques If it's working for you on wheezy then it might be a broken Ubuntu Trusty package.

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

If anyone here likes I can post an exemplar Chef cookbook to prove this bug exists and that I am following the readme link people are pointing out here.

from repmgr.

martinmarques avatar martinmarques commented on August 12, 2024

Could you send the apt line for the pgdg repo? Also the output of "apt-cache policy libpq"?

If you install libpq, libpq-dev and postgresql-9.x-server-dev from the same version it will compile with no errors.

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

@martinmarques pasted below. So you know, the apt line they suggest puts you into two apt sources, main and the version number. In my case, 9.2. Since the libpq-dev package does not exist in the 9.2 repo, any package depending on it always pulls the main version which currently is 9.4.1. I suggest you give this a try by removing libpq-dev on your system and installing postgresql-server-dev-9.2 and I guarantee it will pull in libpq-dev 9.4.1 because it exists in main, not 9.2.

$ sudo cat /etc/apt/sources.list.d/apt.postgresql.org.list
deb     http://apt.postgresql.org/pub/repos/apt trusty-pgdg main 9.2
$ sudo dpkg -l | grep postgres
ii  pgdg-keyring                        2014.1                        all          keyring for apt.postgresql.org
ii  postgresql-9.2                      9.2.10-1.pgdg14.04+1          amd64        object-relational SQL database, version 9.2 server
ii  postgresql-client-9.2               9.2.10-1.pgdg14.04+1          amd64        front-end programs for PostgreSQL 9.2
ii  postgresql-client-common            166.pgdg14.04+1               all          manager for multiple PostgreSQL client versions
ii  postgresql-common                   166.pgdg14.04+1               all          PostgreSQL database-cluster manager
ii  postgresql-server-dev-9.2           9.2.10-1.pgdg14.04+1          amd64        development files for PostgreSQL 9.2 server-side programming
$ sudo dpkg -l | grep libpq
ii  libpq-dev                           9.4.1-1.pgdg14.04+1           amd64        header files for libpq5 (PostgreSQL library)
ii  libpq5:amd64                        9.4.1-1.pgdg14.04+1           amd64        PostgreSQL C client library

from repmgr.

martinisoft avatar martinisoft commented on August 12, 2024

I think the better course of action here is to close this and bring up the issue with PostgreSQL directly since it's a backwards compatibility issue and I can work on presenting a failing test. Thank you for the replies folks and again I'll offer a separate pull request to update your docs with a warning about 9.2 incompatibility on Ubuntu trusty if you'd like.

from repmgr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.