Back to Blog

PostgreSQL 14 is out of patches, and 19 is not your target

PostgreSQL 14 is out of patches, and 19 is not your target

On 12 November PostgreSQL 14.25 shipped and closed the branch: it is the last release that will ever exist for 14, security patches included. Seven days later, on the 19th, PostgreSQL 19 came out. The move that looks obvious — jump from the one that is ending to the newest one — is the one we would not make, and not out of generic caution: the 19 migration notes contain two lines that do not give you trouble the day after, they stop pg_upgrade during its checks, before a single file is moved. One of them lands, without meaning to, on anyone who stores IP addresses in the database.

We run customer databases that live inside applications those customers sell, and our own as well: the network inventory, the traffic records, the ticketing tool. So this week we did the same exercise anyone with a 14 in production has to do. Here is what came out of it, with the sources in hand.

What changed on the 13th (and what did not)

Nothing broke. Your 14 starts the same, answers the same and performs the same as it did on 11 November. The project's policy is a single sentence: "The PostgreSQL Global Development Group supports a major version for 5 years after its initial release. After this, a final minor version will be released and the software will then be unsupported." 14 shipped on 30 September 2021 and served its term. What ended on the 13th was the future fix: any bug that shows up in that branch — performance, corruption or security — stays with you forever. Three weeks ago we wrote about why nobody announces this date; what has changed since then is that the target everyone is looking at now exists.

We have written before about the hole this opens in procedures: almost no patching policy has an entry for "there is no patch". A closed branch is exactly that, except with a known date and months of warning. Which is why this is not an emergency for this afternoon. It is a decision for the quarter, and the decision is not whether to move, but where to.

The target is not the newest version

The dates are published and need no interpretation. This is what each jump buys you:

Version Current minor Final release What it buys
15 15.20 11/11/2027 One year. With this you have this very conversation again next November.
16 16.16 09/11/2028 Two years. Only makes sense if your application certifies it and not 17.
17 17.12 08/11/2029 Three years, twelve minors of mileage, and the version Debian 13 packages.
18 18.7 14/11/2030 Four years, and fourteen months of mileage. This is where we would go.
19 19.0 19/11/2031 Five years, paid for by being the one who finds whatever breaks in 19.0.

The difference between 18 and 19 is one year of shelf life. The difference in the other column is that 18 has been in production around the world for fourteen months with seven minors behind it, and 19 has been out for one day. We are not saying 19 is bad: we are saying a production server that has been quiet for five years is not the place to break in a new major. In four or five months, with 19.2 or 19.3 on the table, this recommendation will change, and we will say so.

Two lines in 19 that do not annoy you: they stop you

The migration notes of a new major are usually a list of things to watch out for. In 19 two of them are of a different kind, because pg_upgrade refuses to continue, and a third one blocks nothing but changes your route:

  • btree_gist indexes on inet or cidr. The official text leaves no room: "The btree_gist inet/cidr opclasses are broken because they can exclude rows that should be returned. pg_upgrade will disallow upgrading of clusters with btree_gist inet/cidr indexes."
  • Carriage returns or line feeds in database, role or tablespace names. They are disallowed, the note says, "to avoid security problems", and clusters using them cannot be upgraded either.
  • MULE_INTERNAL encoding is gone. The checker does not stop this one; the note only says databases using it will need to be dumped and restored with a different encoding.

Barely anyone will meet the encoding one, and line feeds inside a role name are trade folklore. The first one, though, is the news of the day for anyone doing our job.

Whoever stores IP addresses did not choose that index

Databases that store inet and cidr are not exotic in our world: they are the network inventory, a RADIUS accounting table, DHCP leases, flow-record tables, allow lists. We run NetBox as the source of truth for addressing and analyse traffic with NetFlow; that is exactly the kind of table we are talking about.

And here is the detail that turns this into a trap rather than a decision: btree_gist is almost never installed in order to index addresses. It gets installed because somebody needed an exclusion constraint — non-overlapping bookings, time ranges, address ranges — and that extension is what makes it possible. From then on, any CREATE INDEX ... USING gist (inet_column) written without thinking picked up the extension's operator class by default. Nobody chose. And now that choice nobody made decides whether you can use the fast upgrade route.

There is a second, worse reading, and it is worth saying even though it sells nothing: if you have one of those indexes, the project has just told you in writing that it could have been excluding rows that should have been returned. That is not an upgrade problem. It is a results problem, and it has been there all along. It is the same class of surprise we wrote about when a column everyone assumed was encrypted was storing cleartext: the database does not complain, it just does something other than what you believed.

Finding out whether this hits you is one query. This lists the indexes whose operator class belongs to btree_gist and is for inet or cidr, without having to remember their names:

SELECT n.nspname AS esquema, t.relname AS tabla,
       c.relname AS indice, oc.opcname AS clase,
       pg_get_indexdef(i.indexrelid) AS definicion
FROM pg_index i
JOIN pg_class c   ON c.oid = i.indexrelid
JOIN pg_class t   ON t.oid = i.indrelid
JOIN pg_namespace n ON n.oid = t.relnamespace
JOIN pg_opclass oc ON oc.oid = ANY (i.indclass::oid[])
JOIN pg_depend d  ON d.objid = oc.oid
                 AND d.classid = 'pg_opclass'::regclass
                 AND d.deptype = 'e'
JOIN pg_extension e ON e.oid = d.refobjid AND e.extname = 'btree_gist'
WHERE oc.opcintype IN ('inet'::regtype, 'cidr'::regtype);

Run it in every database of the cluster, not just the first one: extensions are installed per database. And the check that counts, in any case, is pg_upgrade --check with the target binaries: the documentation says that mode "will also outline any manual adjustments you will need to make after the upgrade" and it can be run while the old server is still up, as long as the new cluster is already initialised and the two listen on different ports.

If the query returns anything, the fix does not wait for the migration — you can do it today, on the 14. The GiST manual has explained the root of the mess for years: "For historical reasons, the inet_ops operator class is not the default class for types inet and cidr. To use it, mention the class name in CREATE INDEX." In other words, the core class has to be asked for by name and the extension's came for free. Rebuilding the index means naming it: CREATE INDEX CONCURRENTLY ... USING gist (column inet_ops); and dropping the old one. The core class covers =, <, >, <<, >> and &&, which is what address-range exclusion constraints are built from.

And do not kid yourself about the shortcut: going to 18 dodges the block, not the index. If you have one, it can keep leaving rows out while you celebrate an upgrade that went through without a fight, and in four years the block will be waiting for you all the same. 19 is not hurting you here: it forces you to do earlier what had to be done anyway.

What does not block you, but bites the week after

Change in 19 Who pays for it
max_locks_per_transaction goes from 64 to 128, and the note warns that lock allocation changed, so "settings must now be doubled to match their capacity in previous releases". Anyone who raised it because of partitioned tables. Copy your value verbatim and you end up with half.
JIT is disabled by default; you have to turn it on by hand for large analytical queries. Anyone with heavy reports: same plan, different timing. Up or down.
Full text search and pg_trgm now classify characters using the database's locale provider instead of libc. Only those with a search feature and a database whose locale provider is ICU or builtin and behaves differently from LC_CTYPE. With libc, nothing changes. If that is you, the note recommends reindexing those indexes and recomputing stored tsvector values; same for indexes over fuzzystrmatch functions.
RADIUS support is removed for authenticating against the server: "PostgreSQL only supported RADIUS over UDP, which is unfixably insecure." Anyone with a radius line in pg_hba.conf — more common in networking shops than you would think: after the jump, that login no longer exists. You check this before, not after.
The sync_error_count column in pg_stat_subscription_stats is renamed sync_table_error_count. Anyone monitoring replication with their own queries: the dashboard throws no error, it just stops drawing.
standard_conforming_strings is forced to on in the server. Anyone keeping emergency dumps made by the old pg_dump with that setting off: they will not load properly into a 19. Take the dump with the new binary.

None of these four stops the upgrade. All four explain the "ever since you upgraded, this behaves oddly" call a week later, which is exactly when nobody connects the two events any more.

The lowest-downtime path still does not copy your sequences

There are three routes out of a 14, and the 19 documentation lists them plainly: dump and restore, pg_upgrade, or logical replication. The first is the cleanest and the one that stops you longest. The second is the usual one and accepts sources back to 9.2. The third is what you pick when you cannot stop for half an hour: you bring the target up alongside, replicate, and cut over when it has caught up.

19 finally brings sequence synchronisation to logical replication: you publish them with ALL SEQUENCES, sync them with ALTER SUBSCRIPTION ... REFRESH SEQUENCES, there is a pg_get_sequence_data() function to inspect progress and even a sync_seq_error_count column in the subscription statistics. It is a genuine improvement and it has been requested for years.

And it is of no use to you. All of that is written on the publisher, and your publisher is a 14. The ALL SEQUENCES clause goes in the source's CREATE PUBLICATION, not in the target. The same goes for 19's other convenience — being able to enable logical replication without a restart when wal_level is replica: that is on the publishing side. Your 14 still needs wal_level = logical and a restart, as always.

So in a logical-replication migration out of a 14, the sequences are still your job at cutover: read the value on the source, set it on the target with a margin, and do it after writes have stopped. Forget it and the symptom does not show up during the migration: it shows up on the first record a user creates, as a unique-key violation, with the application already open to the public. If someone sells you 19 as the target because "it replicates sequences now", ask them who publishes.

Fast mode leaves you no way back

pg_upgrade's --link option is what turns an outage of hours into one of minutes, because it does not copy files. In exchange the manual says a sentence worth reading twice: "you will not be able to access your old cluster once you start the new cluster after the upgrade". There is no undo. With --link, your rollback plan is exclusively the backup you took beforehand.

And a backup you have never restored is not a rollback plan, it is an intention. Fenix24's annual report covered more than eight hundred client engagements and, as we wrote at the time, only four recoveries came close to the RTO they had written down. The reading is ours, not the report's: what separates the ones who meet theirs is having restored before, cold, with no fire in front of them. Before the window, restore that database on another machine and time it. It is half the work of a disaster recovery plan and it takes an afternoon.

And when the upgrade finishes, do not go home yet: pg_upgrade does not transfer all statistics, and the manual tells you to run vacuumdb --all --analyze-in-stages --missing-stats-only first and vacuumdb --all --analyze-only afterwards. Skipping that step is the silliest cause of "the new database is crawling" the next morning.

If your 14 lives on RDS, this is an invoice with dates

On Amazon RDS the calendar is different from the community one, and it is published. For 14:

Date What happens
12/11/2026Community end of life. RDS still provides standard support.
28/02/2027RDS end of standard support for version 14.
01/03/2027Extended Support starts being billed: unless you turned it off by hand, enrolment is automatic.
01/03/2029The "year 3" rate kicks in, higher than the first two years.
28/02/2030Extended Support ends and AWS upgrades your major version for you.

Two details that are not in the headline. First: that charge buys you "security updates for critical and high CVEs" and fixes for critical bugs, and that is the whole list. A medium-severity bug in your 2027-vintage 14 gets fixed by nobody. Second, and this is the one that actually decides things: if, once the date passes, you un-enrol to get rid of the charge, the instance is automatically upgraded to the next supported major version. So the "don't pay" option translates to "let AWS pick your migration date". Between paying for time and having it picked for you, there is a third option: deciding it yourself now, which is free.

When we would not touch it this week

If that Postgres belongs to an application you bought, the version is not yours. Inside a packaged product — an ERP, a ticketing tool, a monitoring platform — the database version is pinned by the vendor and the compatibility matrix rules. There the job is to open a ticket and get a date. Running pg_upgrade behind the application's back puts you out of support the day you need it. If the answer is that no release supports 17 or 18 yet, that is the conversation to have, and it is worth having it in writing.

We would not do it in the two weeks around Christmas either, for the usual reason: the people who would fix the problem are not there. Nor without having restored a copy of that database first. Nor to get features you will not use: 19's parallel autovacuum and server-side SNI are good news for whoever needs them, and neither is a reason to move a server that is doing fine.

The twenty-minute check

You do this today, with no window and without touching anything:

  1. How many 14s you have and where. Not just servers: containers, the one somebody spun up for a test in 2022, and the database that came inside an application. SELECT version(); on each and the size via pg_database_size(), which is what sets the window.
  2. Who owns that version. If the database belongs to a packaged product, the answer lives in a compatibility matrix and a ticket to the vendor, not in a command.
  3. The extension list, database by database (SELECT extname, extversion FROM pg_extension;). For each one, the question is whether a package exists for the target version: the manual warns that shared object files "must be installed in the new cluster" first, and that you must not load the schema definitions because they come across from the old cluster.
  4. The inet/cidr index query from above, in every database. If it returns anything, 19 is off the table until they are rebuilt.
  5. pg_upgrade --check with the target binaries, old server still running. Read what it writes, including the extension-update script it generates when any are pending.
  6. A test restore of that database on another machine, stopwatch running. That number is your rollback plan; everything else is faith.

What we are not claiming

We have not taken a 19 into production: it came out yesterday. What we quote are the official migration notes and the manual, not our experience with that release, which does not exist yet. We do not know which extensions you have or whether the inet/cidr block applies to you: you may not have a single such index. There is no CVE here and nothing to exploit, so nobody should move a maintenance window over this tonight. And we resell nothing: 18 looks like the sensible target today, with these dates, not a permanent truth.

What we will stand behind: nothing broke on 12 November, and that is what makes it dangerous. A closed branch throws no error, turns on no light and shows up in no scanner until somebody publishes the first bug that will never be fixed. The useful question this week is not "when do we upgrade?" but "who decides the version of that database, and do they know it?". Every time we have asked that in a room, a good share of the databases turn out to live inside a third party's application, and nobody present had that decision on their list.

Sources (verified at origin): the first and final release dates of each branch, the current minors (15.20, 16.16, 17.12, 18.7, 19.0), 14.25 on 12/11/2026 and the five-year sentence — PostgreSQL versioning policy. The pg_upgrade block on btree_gist inet/cidr indexes, the ban on carriage returns in names, the removal of MULE_INTERNAL, the max_locks_per_transaction change and its sentence about doubling settings, JIT disabled by default, the recommended reindex for full text search and pg_trgm with its locale-provider condition, the removal of RADIUS support, the renaming of sync_error_count, standard_conforming_strings forced on, publishing sequences with ALL SEQUENCES, REFRESH SEQUENCES, pg_get_sequence_data(), sync_seq_error_count and enabling logical replication without a restart — PostgreSQL 19 release notes, released 19/11/2026. Supported sources from 9.2 onwards, pre-installing shared object files, the behaviour of --check, the extension-update script, the --link warning and the two follow-up vacuumdb runs — pg_upgrade manual. The sentence about inet_ops and why it is not the default class — GiST index manual. The eight hundred engagements and the four recoveries that came close to their RTO are from the Fenix24 State of Recoverability report, not ours; the reading is ours. The RDS dates (28/02/2027, 01/03/2027, 01/03/2029, 28/02/2030) — RDS for PostgreSQL release calendar; automatic enrolment, the "critical and high CVEs" scope, the three-year limit and the automatic upgrade on un-enrolment — RDS Extended Support documentation. The per-vCPU-hour rates vary by region and we do not reproduce them: they are on the AWS pricing page. Translations of the quotes are ours. Ours too: the reading of who the inet/cidr block lands on and why nobody chose that index, the pg_depend query, the point that sequence synchronisation is written on the publisher and therefore does not help you leaving a 14, the target criterion and the twenty-minute check. Photograph by Jemimus, CC BY 2.0 via Wikimedia Commons.

Do you know which database version holds up your application, and until when?

Inventorying versions, extensions and owners for every database is half a morning of work that stops you discovering the blocker on the night of the window. We do it as part of data and applications, with the test restore up front, which is what turns a recovery plan into something real. If you want us to look at yours, write to us.

Talk to everyWAN

Tags:

Share:

Subscribe to our newsletter

To receive IT stories, everyWAN news and exclusive subscriber offers, sign up to our mailing list

Minorisa de Sistemas Informaticos y Gestión S.L. © 2026
everyWAN
everyWAN