AI Features and extensions pgvector
David Sterling  

Postgres 18.7 Forces Extensions to Move With the Server

PostgreSQL 18.7, 17.12, 16.16, 15.20 and 14.25 landed on November 12 with 52 security fixes and over 140 bug fixes — and if you run extensions, this is not a routine minor release. The CVE-2026-6460 fix changes the interface between the server and every compiled extension, which is why the PGDG packagers rebuilt every extension in their repositories against the new minors and now pin each extension package to that exact minor.

Patch the server and leave the extensions behind and you get one of two outcomes: extensions that still load but do not carry the fix, or extensions that fail to load at all on the next restart. Here is what changed and the order to do the work in.

What CVE-2026-6460 changed at the extension boundary

The fix (CVSS 8.8) adds versions for composite types, which changes how composite values are stored and touches the server’s interface to extensions in two places: DatumGetHeapTupleHeader() moved from a macro to a real function in the server, and heap_getattr() now calls a new heap_datum_check().

Those headers are compiled into every C extension, which makes the dependency bidirectional:

  • Old extension, new server: it still loads and still runs, but it was built without the checks, so it is not protected by the fix.
  • New extension, old server: it calls a function the old server does not have, and fails to load with an undefined symbol error.

A new server needs new extensions to be safe, and new extensions need a new server to load at all. Devrim Gündüz documents the rebuild and its consequences in detail in his packaging write-up.

The package metadata now enforces it

Until this release an extension RPM only required the PostgreSQL major version. From these rebuilds on, every compiled extension requires at least today’s minor — for example Requires: postgresql18-libs >= 18.7. The server, client and contrib packages require the exact same libs version, so dnf cannot install a new extension next to an old server. That is a good failure mode: the resolver stops you instead of the loader doing it.

The corollary is that the usual tricks to slow a patch down now break the extension path too. A dnf versionlock or an exclude=postgresql18* line blocks the extension updates as well, because their dependencies cannot be resolved. --skip-broken and --nobest leave you half-updated. And copying an extension RPM from a machine patched yesterday to one still on 18.6 gives you a library that will not load.

That chain is specific to the PGDG RPM repositories. The ABI rule is not. If you install from apt or build extensions yourself, run the same test before you restart: a library compiled against 18.7 headers is not safe on an older server, and one compiled against the old headers loads on 18.7 without the new checks. Compare pg_config --version and your package version with the server binary, and rebuild where they disagree.

Step 1: inventory before you touch anything

You cannot patch what you have not listed. Run this in every database on the cluster, not just the primary — extensions live per database:

SELECT e.extname,
       e.extversion                AS installed,
       a.default_version           AS packaged,
       n.nspname                   AS schema
FROM pg_extension e
JOIN pg_namespace n                 ON n.oid = e.extnamespace
LEFT JOIN pg_available_extensions a ON a.name = e.extname
ORDER BY e.extname;

packaged > installed means the package on disk is newer than the extension definition in the catalog and you owe an ALTER EXTENSION ... UPDATE after the restart (PostGIS and its postgis_raster / postgis_topology satellites are the usual suspects). Then record SHOW shared_preload_libraries; — those libraries load at postmaster start, so a broken one takes the server down rather than one query.

Step 2: update server and extensions in one transaction

sudo dnf update      # RHEL, Rocky, AlmaLinux, Fedora, Amazon Linux
sudo zypper update   # SLES, openSUSE Leap

In most cases the dependencies pull the server, client, libs and extensions together — updating postgis36_18 alone now drags in the new server. If you run several major versions on one host, update all in the same window.

Step 3: restart, and mean it

The server package restarts a running service with systemctl try-restart. If your Postgres is not managed by that unit — Patroni, a custom unit, a container entrypoint — the old binary keeps running while new libraries sit on disk, and the first session that loads one gets undefined symbol. Restart deliberately, then confirm the running version rather than the installed one:

SELECT version();
SHOW shared_preload_libraries;
SELECT extname, extversion FROM pg_extension ORDER BY extname;

Step 4: reindex what this release touched

This minor also fixes index corruption, and the release notes ask for reindexing. The extension case matters most here: GiST indexes using gist_trgm_ops from pg_trgm could miss matching rows. Find them:

SELECT ic.relname AS index_name, c.relname AS table_name
FROM pg_index i
JOIN pg_class c    ON c.oid = i.indrelid
JOIN pg_class ic   ON ic.oid = i.indexrelid
JOIN pg_am am      ON am.oid = ic.relam
JOIN pg_opclass op ON op.oid = i.indclass[0]
WHERE am.amname = 'gist' AND op.opcname = 'gist_trgm_ops';

Then REINDEX INDEX CONCURRENTLY <name>; on each. The same release asks for a reindex of GIN indexes if you suspect corruption, of B-tree indexes on length-less bpchar columns, and of any table throwing missing chunk number errors (REINDEX TABLE covers the TOAST table too). The release announcement has the full post-update list.

The extensions that broke, and what it tells you

The rebuild also ran every extension’s regression suite, and three packages needed work. pllua was a real bug, not a test artifact: the new minors fix CVE-2026-120143, so SPI_finish() now drops cursors that use a trigger’s transition tables, and a pllua trigger looping over spi.rows() crashed the server. The packages carry a fix, sent upstream as pllua/pllua#19 — but the old pllua package on a new server crashes in exactly that case. pg_repack needed a test adjustment because the new minors store a pg_attver=N entry in pg_attribute.attoptions, and rum had one test query whose result was never defined.

Translation for a Houston shop: the extension you installed in 2023 and never thought about again is the one that decides whether Saturday’s patch window is quiet. Our posts on pg_clickhouse and the PostgreSQL 14 end-of-life are the same story from other angles — the extension surface is where upgrades get expensive.

The short version

One transaction, one restart, one verification query, then the reindexes. Do not hold the server back to protect an extension, do not hold an extension back to protect the server, and do not assume a package you built last year is compatible with a server built yesterday.

If your fleet is a mix of 18.7 on the primary, a 15.x reporting replica, and a set of extensions nobody has inventoried since the last upgrade, an extension upgrade runbook for your Postgres fleet is a short engagement, not a project — we map what you run, what it is compiled against, and the order to patch it in before a window finds out for you.

Leave A Comment