PostgreSQL 19 became generally available on 19 November 2026. We read it as an operations release: the changes that matter most remove maintenance windows, hold query plans steady and take a restart out of enabling logical replication. This post sets out what changed, how we run a PostgreSQL 19 PoC, the PostgreSQL 19 upgrade strategy we recommend by source version, how we train teams, and how to measure the return. It also explains where MinervaDB PostgreSQL 19 Consulting and PostgreSQL 19 Support fit, and where we advise waiting.
Our position is the same for every client. Run PostgreSQL 19 on a production-size staging copy now, and move critical systems after the first minor release. PostgreSQL 18.7 stays the production upgrade target until then. Features were still being reverted late in the beta cycle, SQL/PGQ among them, and a .0 release has not yet met every workload.
What the PostgreSQL 19 release changes for the teams who run it
The PostgreSQL 19 release announcement and the release notes list several hundred changes. Four groups decide whether an estate should move and what it has to test first. A fifth list, the removals, decides whether pg_upgrade will run at all.
Maintenance without the window
REPACK rewrites a table to reclaim space and supersedes VACUUM FULL and CLUSTER, which remain for compatibility. REPACK (CONCURRENTLY) does the bulk of the work under SHARE UPDATE EXCLUSIVE, captures concurrent changes by logical decoding and takes ACCESS EXCLUSIVE only for the final swap.
The REPACK documentation is candid about the limits. The concurrent form needs a primary key or an index-based replica identity. It refuses partitioned parents, unlogged tables and tables on a non-heap access method. It is not MVCC-safe: a transaction holding a snapshot from before the repack can see the table as empty afterwards. It needs free disk for a full copy of the table and its indexes, and a slot under max_repack_replication_slots. Those limits are why REPACK belongs in a PoC before it replaces a pg_repack job.
Plan stability in core
pg_plan_advice prints an advice string for a plan through EXPLAIN (PLAN_ADVICE) and applies one through the pg_plan_advice.advice setting. pg_stash_advice stores advice by query identifier in shared memory and applies it to every session that selects the stash. Advice can only constrain choices the planner already considers, and the documentation warns that applying it has a cost even when the plan does not change. We treat it as a temporary control with a removal date, not as a tuning method.
Autovacuum you can read
Autovacuum in PostgreSQL 19 orders tables by a score, exposed in pg_stat_autovacuum_scores, and can vacuum indexes in parallel under autovacuum_max_parallel_workers with a per-table autovacuum_parallel_workers storage parameter. Parallel workers share one vacuum_cost_limit budget, so more workers do not mean more I/O unless the budget is raised. Per-table overrides written for older majors deserve a review, not a copy.
Replication and standbys
The WAL level now rises to logical when the first logical slot is created, and effective_wal_level reports the level in use. CREATE PUBLICATION ... FOR ALL SEQUENCES closes a long-standing gap in blue-green upgrades. WAIT FOR LSN lets a standby session wait for replay before it reads, which gives read-your-writes without routing every read to the primary.
Defaults and removals
jit is off by default. default_toast_compression moves from pglz to lz4. max_locks_per_transaction doubles to 128 with changed allocation, so an explicit setting carried over from an older major needs a second look. io_workers is gone, replaced by io_min_workers and io_max_workers. RADIUS authentication and the MULE_INTERNAL encoding are removed, and md5 logins now raise a warning.
PostgreSQL 19 PoC: four weeks, a production-size copy and written exit criteria
A PoC that ends with "it worked" has proved nothing. Ours ends with a table of exit criteria agreed before week one, each tied to a system view, and a recommendation that can be defended in front of a change board.
Week one captures the baseline on the current major. Week two upgrades a clone and replays the captured workload. Week three exercises the features that justify the move, and week four writes the decision. The first query we run in week three lists the tables the concurrent repack will refuse, largest first, so nobody discovers the limit during a production change.
-- PostgreSQL 19 PoC: tables that REPACK (CONCURRENTLY) will refuse.
-- Run on the staging copy, in every database. Read-only.
SELECT t.schema_name,
t.table_name,
pg_size_pretty(t.total_bytes) AS total_size,
t.blocker
FROM (
SELECT n.nspname AS schema_name,
c.relname AS table_name,
pg_total_relation_size(c.oid) AS total_bytes,
CASE
WHEN c.relkind = 'p' THEN 'partitioned parent: repack each partition'
WHEN c.relpersistence = 'u' THEN 'unlogged table'
WHEN am.amname <> 'heap' THEN 'access method is not heap'
WHEN NOT EXISTS (
SELECT 1
FROM pg_index AS i
WHERE i.indrelid = c.oid
AND (i.indisprimary OR i.indisreplident)
) THEN 'no primary key or index-based replica identity'
END AS blocker
FROM pg_class AS c
JOIN pg_namespace AS n ON n.oid = c.relnamespace
LEFT JOIN pg_am AS am ON am.oid = c.relam
WHERE c.relkind IN ('r', 'p')
AND n.nspname NOT IN ('pg_catalog', 'information_schema')
) AS t
WHERE t.blocker IS NOT NULL
ORDER BY t.total_bytes DESC;The repack itself is one statement. What the PoC measures is everything around it: seconds under ACCESS EXCLUSIVE at the swap, WAL generated, and lag on every replica while the rewrite runs.
-- Staging only. Needs free space for a full copy of the table and its
-- indexes, and a slot available under max_repack_replication_slots.
SHOW max_repack_replication_slots;
REPACK (CONCURRENTLY, VERBOSE) public.orders;
-- From a second session while it runs (new view: inspect all columns first)
SELECT * FROM pg_stat_progress_repack;
SELECT application_name,
state,
replay_lag
FROM pg_stat_replication
ORDER BY application_name;Plan advice is tested on the statements that regress in the before-and-after comparison, and only on those. The sequence below captures an accepted plan with its query identifier, holds it for one application role, and shows the removal step that every entry must have.
-- 1. Capture the accepted plan and its query ID.
LOAD 'pg_plan_advice';
EXPLAIN (VERBOSE, COSTS OFF, PLAN_ADVICE)
SELECT o.order_id,
c.region
FROM orders AS o
JOIN customers AS c ON c.customer_id = o.customer_id
WHERE o.created_at >= now() - interval '1 day';
-- 2. Hold it by query ID. Requires pg_stash_advice in
-- shared_preload_libraries (restart) and the extension created once.
CREATE EXTENSION IF NOT EXISTS pg_stash_advice;
SELECT pg_create_advice_stash('poc_orders');
SELECT pg_set_stashed_advice('poc_orders', ${QUERY_ID}::bigint,
'JOIN_ORDER(o c) HASH_JOIN(c)');
ALTER ROLE app_user SET pg_stash_advice.stash_name = 'poc_orders';
-- 3. Check that EXPLAIN reports the advice as matched, then remove the
-- entry when the cause (statistics, index, query text) is fixed.
SELECT pg_set_stashed_advice('poc_orders', ${QUERY_ID}::bigint, NULL);PostgreSQL 19 upgrade strategy: decide by source version, not by release date
The right PostgreSQL 19 upgrade plan depends on where an estate starts. A cluster on PostgreSQL 14 has a support problem today. A cluster on 18 has none, and should move only when a measured benefit says so.
Whatever the route, the pre-flight is the same. These are the items in the PostgreSQL 19 release notes that stop an upgrade or change behaviour after it, with the place we look for each.
| Check | Why it matters on PostgreSQL 19 | Where we look |
|---|---|---|
btree_gist indexes on inet or cidr | pg_upgrade refuses the cluster | pg_index joined to pg_opclass |
| Database, role or tablespace names containing CR or LF | pg_upgrade refuses the cluster | pg_database, pg_roles, pg_tablespace |
| MULE_INTERNAL encoding | Removed; the database must be dumped and restored into another encoding | pg_database.encoding |
io_workers in configuration | Parameter removed; replaced by io_min_workers and io_max_workers | postgresql.conf, Patroni configuration, automation templates |
RADIUS lines in pg_hba.conf | Authentication method removed | pg_hba_file_rules |
Explicit max_locks_per_transaction | Default is now 128 and allocation changed | pg_settings where source is not default |
| Statements that relied on JIT | jit is off by default | JIT counters in pg_stat_statements |
| Full text search, pg_trgm and fuzzystrmatch indexes | Reindex recommended after the upgrade; stored tsvector values recomputed | Index definitions per database |
-- PostgreSQL 19 upgrade pre-flight. Run on the OLD cluster. Read-only.
-- 1. Databases on the removed MULE_INTERNAL encoding
SELECT datname,
pg_encoding_to_char(encoding) AS encoding
FROM pg_database
WHERE pg_encoding_to_char(encoding) = 'MULE_INTERNAL';
-- 2. Names that pg_upgrade to 19 rejects
SELECT 'database' AS kind, datname AS name FROM pg_database WHERE datname ~ '[\r\n]'
UNION ALL
SELECT 'role', rolname FROM pg_roles WHERE rolname ~ '[\r\n]'
UNION ALL
SELECT 'tablespace', spcname FROM pg_tablespace WHERE spcname ~ '[\r\n]';
-- 3. RADIUS authentication still configured
SELECT line_number,
type,
database,
user_name,
address
FROM pg_hba_file_rules
WHERE auth_method = 'radius';
-- 4. inet / cidr indexes on btree_gist operator classes (every database)
SELECT i.indexrelid::regclass AS index_name,
i.indrelid::regclass AS table_name,
oc.opcname
FROM pg_index AS i
JOIN pg_opclass AS oc ON oc.oid = ANY (i.indclass::oid[])
WHERE oc.opcname IN ('gist_inet_ops', 'gist_cidr_ops');The dry run comes next. pg_upgrade --check changes nothing in either cluster, and it is run on a clone before it is run anywhere near production.
# Dry run only. Paths come from variables; nothing is hardcoded.
"${NEW_BIN}/pg_upgrade" \
--old-bindir="${OLD_BIN}" \
--new-bindir="${NEW_BIN}" \
--old-datadir="${OLD_PGDATA}" \
--new-datadir="${NEW_PGDATA}" \
--link \
--checkAfter the real cutover, the top statements from pg_stat_statements are re-planned and compared with the baseline before the change is declared complete. With link mode the old cluster is unusable once the new one starts, so the rollback is a restore, and the restore is timed in rehearsal. Where the availability target does not allow that, we use logical replication with a reverse subscription held open through the observation window.
PostgreSQL 19 education: three tracks, each ending in something the team ships
Training that ends with slides changes nothing on call. Each track in our PostgreSQL 19 education programme ends with an artefact the team keeps using. The tracks run through MinervaDB University, on the client's own staging data wherever the client permits it.
| Track | Audience | What the team leaves with |
|---|---|---|
| Operations | DBAs, SREs, platform engineers | A REPACK runbook with its limits, autovacuum score dashboards, lock and recovery views wired into alerting, and a reviewed configuration diff from 18 to 19 |
| Development | Backend and data engineers | WAIT FOR LSN for replica reads, INSERT ... ON CONFLICT DO SELECT, JSON output from COPY, and house rules for requesting plan advice |
| Leadership | CTOs, heads of platform, engineering managers | An upgrade calendar by source version, a risk register and the ROI model in this post filled in with the PoC numbers |
The development track spends most of its time on two patterns, because both remove application code that teams have written by hand for years.
-- Read-your-writes on a standby (PostgreSQL 19+)
-- On the primary, after the write commits: hand this LSN to the reader.
SELECT pg_current_wal_insert_lsn();
-- On the standby, before the read. Route to the primary on any status
-- other than 'success'.
WAIT FOR LSN '${LSN}' WITH (MODE 'standby_replay', TIMEOUT '200ms', NO_THROW);
-- Get-or-create in one statement (PostgreSQL 19+)
INSERT INTO customers (email)
VALUES ('${EMAIL}')
ON CONFLICT (email) DO SELECT
RETURNING customer_id;Maximum ROI from PostgreSQL 19: four lines to measure before and after
We do not quote a percentage for PostgreSQL 19 ROI. Any honest figure depends on the workload, and the only numbers that belong in a business case are the ones measured on it. The project reports bulk inserts with foreign keys running nearly twice as fast in its own testing; that is the project's number, and your PoC replaces it with yours.
| ROI line | PostgreSQL 19 change behind it | Metric | Measured from |
|---|---|---|---|
| Maintenance windows avoided | REPACK (CONCURRENTLY) | Windows per quarter; seconds under ACCESS EXCLUSIVE | Change calendar, pg_stat_progress_repack, pg_stat_lock |
| Engineer hours returned | pg_plan_advice, pg_stash_advice | Hours from ticket to a stable plan | Ticket history, pg_stat_statements |
| Infrastructure deferred | Parallel index vacuum, I/O worker scaling, lz4 TOAST | CPU seconds and reads per 1,000 transactions; bytes stored | pg_stat_io, pg_stat_statements, pg_total_relation_size() |
| Risk retired | A supported major; SCRAM in place of MD5 | Clusters past end of life; roles on MD5 | version(), pg_authid |
The first line is usually the largest and the easiest to defend, because a maintenance window has a cost the business already knows. The third line needs care. A lower CPU figure defers a hardware or instance purchase only if the estate was close to one, so we state the headroom before and after instead of claiming a saving. On a managed cloud service the same discipline applies to instance class and storage, which is where our Cloud FinOps practice joins the engagement.
How MinervaDB PostgreSQL 19 Consulting and PostgreSQL 19 Support engagements run
PostgreSQL consulting owns the readiness assessment, the PoC and the upgrade design, and stays through cutover and the observation window. The deliverable is a runbook with verification after every phase and a rollback that has been rehearsed, not a slide deck.
PostgreSQL support is 24×7 under a contractual response matrix of S1 15 min, S2 12 h, S3 24 h and S4 48 h. PostgreSQL 19 staging clusters are covered from today, so a regression found in the PoC goes to the same engineers who will carry the pager after go-live. Day-to-day administration, patching and capacity work sit with the PostgreSQL remote DBA service.
MinervaDB works with 900+ enterprises and sells no licences, so the advice is sometimes to wait. We recommend against moving to PostgreSQL 19 today in four situations:
- An extension the application depends on has not published support for 19.
- The estate runs on a managed service that has not released 19 for production use.
- The cluster is on PostgreSQL 14 or older; the support gap is closed faster and with less risk by landing on 18.7 first.
- The workload leans on JIT for large analytical queries and has not been re-measured with the new default.
PostgreSQL 19 questions we hear most
Is PostgreSQL 19 ready for production?
PostgreSQL 19.0 is a supported community release from 19 November 2026. We run it on staging for clients now and move critical systems after the first minor release, because a .0 release has not yet met every workload and features were still being reverted late in the beta cycle. PostgreSQL 18.7 is our production upgrade target until then.
Can we upgrade straight from PostgreSQL 14 to PostgreSQL 19?
A multi-major jump is technically possible with pg_upgrade or logical replication. For an estate on PostgreSQL 14, which left community support on 12 November 2026, we recommend landing on PostgreSQL 18.7 now and treating PostgreSQL 19 as a short second step once 19.1 is out and your extensions are certified on it.
Does REPACK in PostgreSQL 19 replace pg_repack?
For most tables, yes. REPACK (CONCURRENTLY) is built in and holds ACCESS EXCLUSIVE only for the final swap. It needs a primary key or an index-based replica identity, it does not accept a partitioned parent or an unlogged table, and it is not MVCC-safe, so we test it on a production-size copy before it replaces an existing pg_repack job.
Is PostgreSQL 19 available on Amazon RDS, Aurora, Cloud SQL, AlloyDB and Azure?
Each provider publishes its own date. On the day of the community release we had not confirmed general availability of PostgreSQL 19 on any of them, so check the provider release notes before planning. On managed services we plan the PostgreSQL 19 upgrade against the provider calendar, not the community one.
Plan your PostgreSQL 19 PoC with the engineers who will run it
Tell us your current versions, extensions and availability targets, and we will return a PoC plan with exit criteria. Book a PostgreSQL 19 consultation. Everything in this post should be tested on your own workload before it is applied to production, with a verified backup and a rehearsed restore in place.
Running this in production?
MinervaDB provides PostgreSQL Consulting, PostgreSQL Support and PostgreSQL Remote DBA with 24x7 coverage and a 15-minute S1 response. Talk to an engineer.