Back to all posts

cat posts/postgresql-19-is-out-your-azure-upgrade-plan-before-31-jan.md --category "Database & Backend" --views 17

PostgreSQL 19 is out: your Azure upgrade plan before 31 Jan

PostgreSQL 19 shipped on 19 November 2026 with a non-blocking REPACK command, plan advice in core and several changed defaults, and Azure offers it as a preview in East Asia only. The nearer deadline is PostgreSQL 14: Azure standard support ends on 31 January 2027, after which Extended Support bills €0.0817 per vCore-hour in Sweden Central, so here is which version to target and a five-step upgrade runbook.

  • --author By Falak Mahmood
  • --date November 21, 2026
  • --read 13 min read
  • --views 17 views

PostgreSQL 19 was released on 19 November 2026, and Azure Database for PostgreSQL flexible server offered it in preview the same day. The preview runs in one region, East Asia. A week earlier, on 12 November, the community shipped the final release of PostgreSQL 14. Azure standard support for version 14 ends on 31 January 2027, and from 1 February every server still on it is enrolled in paid Extended Support automatically, at a retail price of €0.0817 per vCore-hour in Sweden Central.

So the release raises two separate questions for a team running Postgres on Azure. What in version 19 is worth planning for? And which version should a server that has to move before February actually land on? The answers are different, and the second one is the urgent one.

What PostgreSQL 19 changes for operations

The release announcement groups dozens of features. Four of them change how a production database is run.

REPACK replaces VACUUM FULL and CLUSTER

Reclaiming space from a bloated table has always meant either an ACCESS EXCLUSIVE lock for the whole rewrite or a third-party extension such as pg_repack. Version 19 adds a REPACK command that unifies VACUUM FULL and CLUSTER (both remain for compatibility) and accepts a CONCURRENTLY option. According to the documentation, the concurrent form runs the bulk of the work under a SHARE UPDATE EXCLUSIVE lock, captures changes through logical decoding, and takes the exclusive lock only for the final file swap.

-- Rewrite the table without blocking reads or writes
REPACK (CONCURRENTLY) employees;

-- Rewrite and reorder by an index (what CLUSTER used to do)
REPACK employees USING INDEX employees_ind;

-- Watch progress from another session
SELECT * FROM pg_stat_progress_repack;

Read the restrictions before you schedule it. The concurrent form refuses partitioned tables, unlogged tables, and tables without a primary key or index-based replica identity. It needs a free slot under the new max_repack_replication_slots setting. It needs free disk "at least equal to the sum of the table size and the index sizes", plus room for the changes captured while it runs. The documentation also states that it "is not MVCC-safe": a transaction holding a snapshot from before the repack will see the table as empty afterwards. And it "can fail after most of the work is done, especially with CONCURRENTLY on a busy table".

Plan advice arrives in core

Two new modules address the query that was fast on Tuesday and slow on Wednesday. pg_plan_advice lets EXPLAIN print the decisions behind a plan as a short advice string, and lets you feed that string back to the planner. pg_stash_advice stores advice per query identifier and applies it automatically, which means a bad plan can be pinned without an application release.

EXPLAIN (COSTS OFF, PLAN_ADVICE)
  SELECT * FROM join_fact f JOIN join_dim d ON f.dim_id = d.id;

--  Generated Plan Advice:
--    JOIN_ORDER(f d)
--    HASH_JOIN(d)
--    SEQ_SCAN(f d)
--    NO_GATHER(f d)

SET pg_plan_advice.advice = 'JOIN_ORDER(f d)';

The documentation is blunt about the cost. Advice works by telling the planner what not to do, so it cannot produce a plan the planner would never consider. It has no control over aggregation or set operations such as UNION. And the warning at the top of the page applies to every pinned plan: "if the distribution of the underlying data changes, the planner normally has the option to adjust the plan", and advice takes that option away. Stash advice for the few queries with a history of regressions, and review the stash when data volumes shift.

Autovacuum gets parallel workers and a priority score

Autovacuum can now vacuum a table's indexes with parallel workers, capped by autovacuum_max_parallel_workers, and a new scoring system decides which table is processed first. The scores are visible in pg_stat_autovacuum_scores. One related change can slow things down: parallel vacuum leaders and workers now share the cost-based delay budget, where previously each worker had its own. The release notes say a parallel VACUUM with cost-based delay enabled "might run slower than in previous releases".

Replication without the restart

Creating the first logical replication slot now raises the effective WAL level to logical on its own, so enabling logical replication no longer requires a restart when wal_level is replica. Sequence values can be replicated with CREATE PUBLICATION ... FOR ALL SEQUENCES, which removes a manual step from every logical-replication cutover. On standbys, the new WAIT FOR LSN command lets a session wait until the replica has replayed a given position before it reads, which is what read-your-writes on a read replica needs.

For application developers the headline is smaller and more pleasant. INSERT ... ON CONFLICT DO SELECT ... RETURNING returns the existing row on a conflict, so the get-or-create pattern becomes one statement and one round trip. The announcement also reports that reworked foreign key checks "in testing made bulk inserts nearly 2x faster". That is the only performance number in the announcement, and it comes from the project's own testing.

Defaults and removals that can bite

The migration section of the release notes is longer than usual. These are the entries most likely to affect an existing application.

Change in 19 Who notices What to do now
JIT is disabled by default Sites "doing many large analytical queries" Benchmark reporting queries with jit = on and off; set it explicitly
A warning follows every successful MD5 password login Roles whose password hash predates SCRAM Reset those passwords under SCRAM; MD5 "will be removed in a future release"
standard_conforming_strings is always on Legacy code that relies on backslash escapes in plain string literals Turn the setting on in test and run the suite
btree_gist indexes on inet and cidr block pg_upgrade Network inventory and IPAM schemas Find and rebuild those indexes with the GiST opclass before upgrading
Full text search and pg_trgm classify characters with the database's locale provider Databases on ICU or the builtin provider Plan a reindex of those indexes after the upgrade
io_workers is removed Anyone who tuned async I/O on version 18 Move to io_min_workers and io_max_workers
json_array() over zero rows returns an empty array Code that tests the result for NULL Search for the pattern and fix the check
RADIUS authentication is removed Self-managed servers only Switch method before upgrading

Two smaller defaults also moved. TOAST compression now defaults to lz4 where the build supports it, and max_locks_per_transaction went from 64 to 128 because lock allocation changed; the notes say existing settings "must now be doubled to match their capacity in previous releases".

Where Azure stands today

Microsoft's documentation, updated on 19 November, lists PostgreSQL 19 as a preview at minor version 19.0, "available only in the East Asia region". The accompanying blog post says more regions are "coming soon" and gives no date for general availability. In-place major version upgrade to 19 works from day one, again only for servers in East Asia, and the pre-upgrade validation checks accept 19 as a target.

The extension table for version 19 is already well populated: pgvector 0.8.7, PostGIS 3.7.0, pg_cron 1.6, pgaudit 19.0, pg_diskann 0.6.6 and azure_ai 2.5.6 are listed. TimescaleDB is marked not supported. One gap deserves a check before you plan around it. Microsoft's blog names pg_plan_advice and pg_stash_advice as engine capabilities, but neither appeared in the part of the version 19 extension table we could verify. Confirm against the allowlist on a preview server before promising plan pinning to anyone. The same goes for REPACK (CONCURRENTLY), which depends on a server parameter the managed service has to expose.

Version 18 remains the newest generally available release, at 18.6. It carries one Azure limitation: io_method = io_uring cannot be configured.

The clock that is actually running: PostgreSQL 14

Azure follows the community lifecycle and then adds a paid bridge. The dates below come from Microsoft's version policy and Extended Support pages.

Version Azure standard support ends Paid Extended Support
11, 12, 13 31 July 2026 (passed) Billing since 1 September 2026
14 31 January 2027 From 1 February 2027, until 11 November 2029
15 11 November 2027 Not yet listed
16 9 November 2028 Not yet listed
17 8 November 2029 Not yet listed
18 14 November 2030 Not yet listed

Enrolment is automatic and there is no opt-out. Microsoft's FAQ answers the question "Can I continue using my PostgreSQL instance without Extended Support?" with "No". The page mentions a one-month grace period for versions 11, 12 and 13 and none for 14. Charges apply while a server is running and stop when it is stopped or upgraded.

What staying on 14 costs

The Azure Retail Prices API returns one Extended Support meter for Sweden Central: €0.0817 per vCore per hour. The Ddsv5 General Purpose compute meter in the same region is €0.0839 per vCore-hour. Extended Support therefore costs about as much as the compute it sits on.

Server (Ddsv5, Sweden Central) Compute per month Extended Support per month Extended Support per year
4 vCores €245 €239 €2,863
8 vCores €490 €477 €5,726
16 vCores €980 €954 €11,451

Monthly figures assume 730 hours of pay-as-you-go retail pricing, before VAT and any negotiated discount. Storage, backup and a high-availability standby are extra, and the documentation we read does not say whether the standby's vCores are metered for Extended Support. Ask your Microsoft contact before you budget an HA server.

Which version to land on

  • From 14, without TimescaleDB: go to 18. It is generally available in European regions, the upgrade can skip versions, and standard support runs to November 2030. Microsoft's Extended Support page still suggests "PostgreSQL 15 or 16", but a move to 15 buys less than a year before the next deadline.
  • From 14, with TimescaleDB: go to 16 first. The in-place upgrade matrix allows TimescaleDB servers on 14 to target only 15 or 16. From 16 the supported targets are 17 and 18. Budget two maintenance windows, or use the side-by-side logical replication route Microsoft documents.
  • From 15: schedule it for 2027. Nothing forces a move this winter, and by the time you plan it version 19 may be generally available in your region.
  • On 16, 17 or 18: stay. Use the preview to learn what 19 changes for your workload.
  • New projects: start on 18. A preview in one Asian region is a test bench. Production data belongs on a GA version in the region your architecture already uses.

A runbook for the upgrade

1. Find every server and its version

Run this in Azure Resource Graph across all subscriptions. Old versions tend to survive in the subscriptions nobody opens.

resources
| where type == "microsoft.dbforpostgresql/flexibleservers"
| project name, resourceGroup, subscriptionId, location,
          version = tostring(properties.version), sku = tostring(sku.name)
| order by version asc

2. Run the validation checks

The checks became generally available in August 2026. They do not restart the server or change its version. They need Azure CLI 2.89.0 or later.

az postgres flexible-server upgrade \
  --resource-group my-resource-group \
  --name my-server \
  --version 18 \
  --validate-only

3. Clear the known blockers

  • Drop pg_repack, hypopg and pg_partman before the upgrade and re-create them afterwards. Microsoft lists them as non-persistent on every upgrade path.
  • For a target of 18, also remove azure_ai, azure_storage, pg_diskann, azure_local_ai, pgrouting and pg_failover_slots if present. Vector workloads on DiskANN indexes need a rebuild plan.
  • Drop event triggers and recreate them after.
  • Delete read replicas, including cascading ones. They have to be re-created after the primary is upgraded.
  • Check for logical replication slots and for views that depend on pg_stat_activity.
  • Keep 10 to 20 percent of storage free.

4. Rehearse on a restored copy

Restore the production server to a new one with point-in-time restore and upgrade the copy. That gives you the real duration for your object count and tells you whether a Burstable server needs a temporary scale-up. The upgrade uses pg_upgrade and requires downtime. On a high-availability server the service disables HA, upgrades the primary and re-enables HA afterwards, which needs capacity for a new standby.

5. Upgrade, then analyze

Run ANALYZE in every database as soon as the upgrade finishes, because planner statistics do not carry over and the first hour of queries will otherwise run on guesses. Update non-core extensions with ALTER EXTENSION ... UPDATE. There is no automated downgrade. The fallback is a point-in-time restore to a new server from before the upgrade, so note the timestamp and keep the application's connection configuration easy to switch.

The Swedish and EU angle

The preview region matters more than it looks. East Asia is Hong Kong. Restoring a copy of a production database there to try REPACK is a transfer of personal data outside the EU/EEA under GDPR Chapter V, and a test is a weak justification for one. Use synthetic or anonymised data for anything you run in the preview, and wait for a European region before real data goes near version 19.

For organisations covered by cybersäkerhetslagen (2025:1506), Sweden's implementation of NIS2, an engine that no longer receives security patches is hard to defend as an appropriate risk management measure. Extended Support does include "security patches and critical bug fixes", so it works as a compliance bridge. It is an expensive one, and Microsoft itself describes it as "a temporary bridge, not a long-term solution". An auditor who asks why the database tier costs twice what it did in January will want to see the upgrade date next to the invoice. Our earlier piece on Azure defaults that are wrong once you have auditors covers the adjacent configuration questions.

There is also a calendar problem particular to this deadline. Many Swedish organisations freeze changes from mid-December until after Trettondagen on 6 January. Counted from today, that leaves roughly six working weeks before 31 January, and a rehearsal plus a production window per server fits into that only if the inventory starts now.

What to do this week

  1. Run the Resource Graph query and list every flexible server on version 14 or older.
  2. Multiply the vCores on that list by €0.0817 and by 730 to get the monthly cost of doing nothing from February.
  3. Run --validate-only against version 18 for each server and record the blockers.
  4. Book a rehearsal on a restored copy before the December change freeze, and a production window in January.
  5. On servers that are staying put, turn standard_conforming_strings on in test, reset any MD5 passwords and measure your heaviest reports with JIT off. Those three checks remove most of the surprises version 19 will bring later.
  6. If you want hands-on time with 19, create a preview server in East Asia with synthetic data and check which extensions and parameters are actually exposed.

subscribe # the AI news that matters, minus the noise

Book a Call

Sources

Tags

Related posts