Postgres Update and Timescale version not found

Any advice on my postgresql upgrade issue would be apreciated. I’m following the guide here: In-place PostgreSQL upgrade | ApisCP Notes

this is from postgres 13 to 17.
# dnf install -y "timescaledb-2-postgresql-${PG_TO_VERSION}-$(rpm -q --queryformat="%{VERSION}" timescaledb-2-postgresql-${PG_FROM_VERSION})" Last metadata expiration check: 0:03:00 ago on Sat 20 Jun 2026 05:51:47 PM CEST. No match for argument: timescaledb-2-postgresql-17-2.15.3 Error: Unable to find a match: timescaledb-2-postgresql-17-2.15.3

Any advice would be apreciated.

Different versions of Timescale publish different versions of the extension. Moving from v13 straight to v17… is a significant upgrade. I don’t recommend these upgrades, especially on production servers, because the risk of table incompatibility or library incompatibility presents serious complications to a production server as we’re seeing here.

dnf install -y timescaledb-2-postgresql-17

If you get extension errors, these are determined by /var/lib/pgsql/VERSION/data/postgresql.conf (shared_preload_libraries) so make sure the named extension exists in /usr/pgsql-VERSION/share/extension.

Yeah, this ends with the next steps hanging as the 13 (pre update was timescale 2.15.3) and 17 is (2.17.0). Wich is the hangup on the pg upgrade, as the first timescaledb version does not exist for psql version 17. (I sadly i only noticed this after i was halfway thru the guide and got stuck here).

any ideas you have on this would be appreciated. (i have a db dump (the optional step) and theoretically i could start the pg13 server manually.

As a sidenote: Normally i would have just let it be, but pg13 is eol and repos got removed, hanging system updates… // as a sidenote: I would advise for the next version of the “guide” to include a check to see if there is a comatible timescale version avalible for the next server version, prior to running ANY upgrade steps.

Timescale always exists with the corresponding PostgreSQL but it may not be the same release as you’re presently moving from, which is why multiple warnings are present before beginning the how-to.

Because the version of Timescale available may not match the current Timescale version you’re moving from, additional changes may be necessary.

This process is designed for experts.

Because the process is complicated, I need to know what commands you’re running at the time and what errors you’re seeing. I’ve only done an in-place upgrade a handful of times. I prefer migrating to new hardware rather than do this.

If you’d like to revert back to PostgreSQL 13, the old RPMs are available in the yum-archive repository.

I will take that into account for the next time. The reason why i did not go with the migration to a different server was because of certain sites using third-party dns/reverse proxy. But i have learned my lesson on this, and will not be making this mistake of going for the upgrade again.

regarding the commands i have pretty much followed the guide. first i got hung on the timescale install. now after going with the suggested (not version pinned) timescale lib, i am stuck on the import that errors out on the appldb

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 contrib/isn with bigint-passing mismatch         ok
Checking data type usage                                      ok
Checking for user-defined encoding conversions                ok
Checking for user-defined postfix operators                   ok
Checking for incompatible polymorphic functions               ok
Checking for not-null constraint inconsistencies              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/pgsql/17/data/pg_upgrade_output.d/20260621T201928.001/loadable_libraries.txt
Failure, exiting

and the outut of the file is specifying the old timescaledb.

could not load library "$libdir/timescaledb-2.15.3": ERROR:  could not access file "$libdir/timescaledb-2.15.3": No such file or directory
In database: appldb

looking at dnf

# dnf --showduplicates list timescaledb-2-postgresql-13
timescale_timescaledb                                                                                                                                          412  B/s | 833  B     00:02    
Installed Packages
timescaledb-2-postgresql-13.x86_64                                                             2.15.3-0.el8                                                              @timescale_timescaledb
Available Packages
timescaledb-2-postgresql-13.x86_64                                                             2.1.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.1.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.2.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.2.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.3.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.3.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.4.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.4.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.4.2-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.5.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.5.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.5.2-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.6.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.6.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.7.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.7.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.7.2-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.8.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.8.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.9.0-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.9.1-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.9.2-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.9.3-0.el8                                                               timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.10.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.10.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.10.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.10.3-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.11.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.11.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.11.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.12.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.12.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.12.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.13.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.13.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.14.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.14.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.14.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.15.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.15.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.15.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-13.x86_64                                                             2.15.3-0.el8                                                              timescale_timescaledb 

vs

# dnf --showduplicates list timescaledb-2-postgresql-17
Last metadata expiration check: 0:00:38 ago on So 21 Jun 2026 20:21:09 CEST.
Installed Packages
timescaledb-2-postgresql-17.x86_64                                                             2.28.0-0.el8                                                              @timescale_timescaledb
Available Packages
timescaledb-2-postgresql-17.x86_64                                                             2.17.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.17.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.17.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.17.2-1.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.18.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.18.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.18.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.19.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.19.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.19.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.19.3-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.20.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.20.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.20.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.20.3-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.21.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.21.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.21.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.21.3-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.21.4-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.22.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.22.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.23.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.23.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.24.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.25.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.25.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.25.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.26.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.26.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.26.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.26.3-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.26.4-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.27.0-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.27.1-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.27.2-0.el8                                                              timescale_timescaledb 
timescaledb-2-postgresql-17.x86_64                                                             2.28.0-0.el8                                                              timescale_timescaledb

I ran your question through Gemini.

The following advice may be appropriate.

When PostgreSQL extensions (like PostGIS or TimescaleDB) report version mismatches during an upgrade, pg_upgrade will halt. To fix this, align the old cluster’s extension catalog with the physical shared libraries installed on the new cluster or use logical replication for a safer, decoupled migration. [1, 2, 3, 4]

Method 1: The In-Place pg_upgrade Fix (Downtime Required) [1]

If you are running pg_upgrade and it fails because your old database extension version is behind the new binaries, you need to update the extension’s metadata in the old cluster before upgrading. [1]

  1. Install Missing Libraries on Target: Ensure the new PostgreSQL environment has the exact same extension shared libraries installed as the old cluster. [1]
  2. Update the Extension Catalogs: Start the old server, connect to each database, and run:

sql

ALTER EXTENSION <extension_name> UPDATE;

Use code with caution.

3.Note: For complex extensions like PostGIS, ensure all related components are updated (e.g., ALTER EXTENSION postgis_topology UPDATE;)*.
4. Re-run pg_upgrade: Once the old catalog versions match or exceed the version expected by the new cluster’s binaries, the pg_upgrade checks will pass. [1]

Method 2: Logical Replication / pg_dump (Zero to Minimal Downtime)

If the shared object versions are drastically incompatible (e.g., jumping multiple major versions of an extension), an in-place binary upgrade might not work. A logical migration using pg_dumpall or pg_dump bypasses shared library discrepancies entirely. [1, 2]

  1. Set Up the New Cluster: Install the new PostgreSQL release and the target version of your extension.
  2. Initialize: Create a new, empty database on the target and run CREATE EXTENSION <extension_name>; to let the new cluster build its own native catalogs.
  3. Transfer Schema & Data: Migrate your schema with pg_dump --schema-only and your data with pg_dump --data-only, or use native PostgreSQL Logical Replication to sync data with minimal downtime. [1, 2, 3, 4, 5]

Post-Migration Steps

Whenever an extension is updated or a database is migrated across major versions, extension objects require post-upgrade compiling and statistics updates: [1]

  • Update Extension Catalogs on Target: Run ALTER EXTENSION <extension_name> UPDATE; in your new cluster.
  • Update Query Statistics: Run ANALYZE; to ensure your query planner isn’t using outdated plans.
  • Validate C-Library Functions: Execute a smoke test that calls the extension’s native library functions (e.g., SELECT PostGIS_Full_Version(); or testing custom datatypes). [1, 2, 3, 4]

To note, if PostGIS is also installed then this will also result in a library mismatch moving 4 major releases.

Additionally, the PostgreSQL mailing list may be suitable for edge cases during this discouraged process.

Lastly, you may opt to pull a silver support request through my.apiscp.com. I would be able to take a look at migrating things fully over to 17 or at least unwinding your steps back 13 later this afternoon.

TL;DR use pg_dump (or pg_dumpall) if library extensions cannot be synchronized between these releases. The system database for the platform is named: “apnscp”.

Moving to 17 is too great a version upgrade to directly.

The guide, as presented, sets the version to 16, which includes 2.15. This allows an in-place upgrade using pg_upgrade while preserving the underlying analytics data. Attempting to dump the logical data directly, then re-importing into 2.28 (from 2.15) is impossible without database corruption.

Ref: Major TimescaleDB upgrades | Tiger Data Docs

It’s possible to upgrade horizontally or vertically but never diagonally. Going from 13 to 16 with TimescaleDB 2.15 works because 2.15 exists for both. From there, update TimescaleDB 2.15 to latest (dnf update -y timescaledb-2-postgresql-MAJOR), then upgrade from 16 to 17.

Output indicating blockers absent

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
Checking for user-defined encoding conversions                ok
Checking for user-defined postfix operators                   ok
Checking for incompatible polymorphic functions               ok
Checking for not-null constraint inconsistencies              ok
Creating dump of global objects                               ok
Creating dump of database schemas
                                                              ok
Checking for presence of required libraries                   ok
Checking database user is the install user                    ok
Checking for prepared transactions                            ok
Checking for new cluster tablespace directories               ok

If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.

Performing Upgrade
------------------
Setting locale and encoding for new cluster                   ok
Analyzing all rows in the new cluster                         ok
Freezing all rows in the new cluster                          ok
Deleting files from new pg_xact                               ok
Copying old pg_xact to new server                             ok
Setting oldest XID for new cluster                            ok
Setting next transaction ID and epoch for new cluster         ok
Deleting files from new pg_multixact/offsets                  ok
Copying old pg_multixact/offsets to new server                ok
Deleting files from new pg_multixact/members                  ok
Copying old pg_multixact/members to new server                ok
Setting next multixact ID and offset for new cluster          ok
Resetting WAL archives                                        ok
Setting frozenxid and minmxid counters in new cluster         ok
Restoring global objects in the new cluster                   ok
Restoring database schemas in the new cluster
                                                              ok
Copying user relation files
                                                              ok
Setting next OID for new cluster                              ok
Sync data directory to disk                                   ok
Creating script to delete old cluster                         ok
Checking for extension updates                                notice

Your installation contains extensions that should be updated
with the ALTER EXTENSION command.  The file
    update_extensions.sql
when executed by psql by the database superuser will update
these extensions.

Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade.
Once you start the new server, consider running:
    /usr/pgsql-16/bin/vacuumdb --all --analyze-in-stages
Running this script will delete the old cluster's data files:
    ./delete_old_cluster.sh

Repeat same process going from 16 to 17 after updating TimescaleDB to 2.28…

Voila.

# echo "SELECT version();" | psql template1
                                                 version
----------------------------------------------------------------------------------------------------------
 PostgreSQL 17.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit
(1 row)