timescaledb
timescaledb copied to clipboard
[Bug]: pg_upgrade fails for pg 14.12 to 16.3 both on timescale 2.15.3
What type of bug is this?
Unexpected error
What subsystems and features are affected?
Other
What happened?
I tried to run pg_upgrade to migrate from Postgres 14 to Postgres 16. Before upgrading Postgres I migrated to the latest Timescale version on the existing Postgres 14 server. It fails with the message could not load library "$libdir/timescaledb-2.15.3": ERROR: attempt to redefine parameter "timescaledb.enable_deprecation_warnings"
Installed Postgres and Timescale packages:
postgresql-14-pgpool2/bullseye-pgdg,now 4.5.2-1.pgdg110+1 amd64 [installed]
postgresql-14/bullseye-pgdg,now 14.12-1.pgdg110+1 amd64 [installed]
postgresql-16/bullseye-pgdg,now 16.3-1.pgdg110+1 amd64 [installed]
postgresql-client-14/bullseye-pgdg,now 14.12-1.pgdg110+1 amd64 [installed,automatic]
postgresql-client-16/bullseye-pgdg,now 16.3-1.pgdg110+1 amd64 [installed,automatic]
postgresql-client-common/bullseye-pgdg,now 261.pgdg110+1 all [installed,automatic]
postgresql-common/bullseye-pgdg,now 261.pgdg110+1 all [installed]
postgresql-server-dev-14/bullseye-pgdg,now 14.12-1.pgdg110+1 amd64 [installed]
timescaledb-2-loader-postgresql-14/bullseye,now 2.15.3~debian11 amd64 [installed,automatic]
timescaledb-2-loader-postgresql-16/bullseye,now 2.15.3~debian11 amd64 [installed,automatic]
timescaledb-2-postgresql-14/bullseye,now 2.15.3~debian11 amd64 [installed]
timescaledb-2-postgresql-16/bullseye,now 2.15.3~debian11 amd64 [installed]
timescaledb-toolkit-postgresql-14/bullseye,now 1:1.18.0~debian11 amd64 [installed,automatic]
timescaledb-toolkit-postgresql-16/bullseye,now 1:1.18.0~debian11 amd64 [installed,automatic]
TimescaleDB version affected
2.15.3
PostgreSQL version used
14.12, 16.3
What operating system did you use?
Debian 11
What installation method did you use?
Deb/Apt
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
postgres@dev-debian-2:/tmp$ /usr/lib/postgresql/16/bin/pg_upgrade -d /etc/postgresql/14/main -D /etc/postgresql/16/main -b /usr/lib/postgresql/14/bin -B /usr/lib/postgresql/16/bin
Finding the real data directory for the source cluster ok
Finding the real data directory for the target cluster ok
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for system-defined composite types in user tables ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for incompatible "aclitem" data type in user tables ok
Creating dump of global objects ok
Creating dump of database schemas
ok
Checking for presence of required libraries fatal
Your installation references loadable libraries that are missing from the
new installation. You can add these libraries to the new installation,
or remove the functions using them from the old installation. A list of
problem libraries is in the file:
/var/lib/postgresql/16/main/pg_upgrade_output.d/20240704T080136.575/loadable_libraries.txt
Failure, exiting
could not load library "$libdir/timescaledb-2.15.3": ERROR: attempt to redefine parameter "timescaledb.enable_deprecation_warnings"
How can we reproduce the bug?
/usr/lib/postgresql/16/bin/pg_upgrade -d /etc/postgresql/14/main -D /etc/postgresql/16/main -b /usr/lib/postgresql/14/bin -B /usr/lib/postgresql/16/bin