1

I'm getting the following error when attempting to access a foreign table.

ERROR: could not load library "/usr/pgsql-11/lib/postgres_fdw.so": /usr/pgsql-11/lib/postgres_fdw.so: undefined symbol: TimestampDifferenceMilliseconds

This was not a problem until yesterday, when someone used yum to update a bunch of stuff under sudo permissions.

The file, postgres_fdw.so, is in the listed location.

Relevant Information:

  • I've been using psql (11.11, server 11.5) for a few months now.
  • I had previously been using psql (9.2.24, server 11.5)
  • foreign data wrappers had been constructed and linked before the update
  • I'm running CentOS 7 (centos-release-7-9.2009.1.el7.centos.x86_64)
  • I am aware that there are at least two instances of psql installed on the server
  • someone on sudo recently ran yum update -y; looking at the logs from the update, the following lines contain "postgresql"
Mar 05 10:00:22 Updated: postgresql-libs-9.2.24-4.el7_8.x86_64
Mar 05 10:00:22 Updated: postgresql11-libs-11.11-1PGDG.rhel7.x86_64
Mar 05 10:00:27 Updated: postgresql-9.2.24-4.el7_8.x86_64
Mar 05 10:02:36 Updated: postgresql11-11.11-1PGDG.rhel7.x86_64
Mar 05 10:02:45 Updated: postgresql11-server-11.11-1PGDG.rhel7.x86_64
Mar 05 10:06:11 Updated: postgresql11-contrib-11.11-1PGDG.rhel7.x86_64
Mar 05 10:06:22 Updated: postgresql-server-9.2.24-4.el7_8.x86_64
Mar 05 10:06:51 Updated: postgresql-contrib-9.2.24-4.el7_8.x86_64
Mar 05 10:06:54 Updated: postgresql10-libs-10.16-1PGDG.rhel7.x86_64
zjmrl
  • 11
  • 2
  • https://www.postgresql.org/docs/11/release-11-11.html ... without having checked the respective source this may have just bitten you; there are three mentions of `postgres_fdw` in the changelog. – tink Mar 06 '21 at 20:52
  • P.S.: This highlights the beauty of different environments (dev/test/UAT/prod)? :) – tink Mar 06 '21 at 20:56
  • Per @tink, from release notes: "Both of these errors stemmed from incorrectly converting seconds-and-microseconds to milliseconds. Introduce a new API TimestampDifferenceMilliseconds() to make it easier to get this right in the future." Did you build the FDW from source or did you use the `-contrib` version? – Adrian Klaver Mar 06 '21 at 22:53
  • 1. i don't know enough to implement different environments (dev/test/UAT/prod). 2. I don't know if I built the fdw from source or --contrib; I just used the CREATE EXTENSION command with the version of postgres I had installed. – zjmrl Mar 07 '21 at 21:13

0 Answers0