Comments (15)
Think I might have found the commit that changed the library in 9.3+
from repmgr.
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.
$ 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.
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.
Yes it is, by design, please see the FAQ and install the setup you seem to need as described there:
from repmgr.
@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.
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.
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.
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.
@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.
@martinmarques If it's working for you on wheezy then it might be a broken Ubuntu Trusty package.
from repmgr.
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.
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.
@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.
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)
- repmgr replication with multislaves failover is failing HOT 1
- Repmgr: an older version of the extension is installed but it's not true HOT 1
- **High Priority** repmgr with multi slaves replication solution is not working in k8s environment
- node_rejoin event
- CRITICAL (node "foo" (ID: 2) is not attached to expected upstream node "bar" (ID: 1) repmgr-16
- LOG: could not receive data from client: Connection reset by peer HOT 3
- Slot in the catchup state
- repmgr - failed: fe_sendauth: no password supplied
- Issue encountered while adding script for split-brain prevention HOT 1
- Self-node check method not changed. HOT 1
- node "node_master" (ID: 1) is registered as primary but running as standby HOT 4
- Promote secondary to new master
- master node fails to automatically rejoin the cluster after recovery from failure HOT 1
- repmgrd autofailover not working if PR is down with File system hang HOT 6
- repmgr cluster crosscheck does not work with custom PostgreSQL location
- single HTML page documentation link is broken HOT 1
- repmgr daemon status showing repmgrd as 'not running' HOT 1
- Repmgr cannot perform failover in a cluster that is not in a healthy state.
- PostgreSQL 17 support
- How to update conninfo in a running cluster?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repmgr.