Data

How to Apply the PostgreSQL 18.7 Update: 52 Security Fixes and Reindex Steps

The November 12 minor releases fix 52 security issues and several index corruption bugs. Here is the update order and the reindex queries to run afterward.

Paige Donnelly

Senior Backend Engineer

Published 7 min read
Rows of servers in a data rack, the kind of hardware that runs production databases.
On this page 6 sections

Install PostgreSQL 18.7, 17.12, 16.16 or 15.20 by swapping binaries and restarting. No dump and restore is needed. The November 12, 2026 update fixes 52 security vulnerabilities and over 140 bugs. Afterward, reindex any affected indexes, take a fresh full backup, and plan your exit from PostgreSQL 14, which is now end-of-life.

This guide to the PostgreSQL 18.7 update is for backend engineers and database owners who run self-managed Postgres, or who need to check what a managed provider has applied. It covers what the release fixes, which versions are still supported, the exact upgrade steps, and the reindex queries that turn the release notes into a to-do list.

Backtrace read the full announcement and the 18.7 release notes. The short version is that the binary swap is the easy part. The post-update steps are where teams get hurt, because several fixes only help once you rebuild an index or take a new backup.

What Does the November 2026 PostgreSQL Update Fix?

Hands typing on a laptop that shows cybersecurity graphics in purple light.

The release fixes 52 security vulnerabilities and more than 140 bugs across all supported versions. Many of the security entries allow arbitrary code execution or SQL injection through server features and client tools. Several of the bug fixes address silent index corruption, wrong query results and lost rows.

According to the PostgreSQL project's release announcement, the security list includes CVE-2026-6460, a type confusion after ALTER ... SET DATA TYPE that executes arbitrary code. It also lists a pg_restore flaw (CVE-2026-116314) that runs arbitrary code because non-plain archives are not validated. Several entries score 8.8 on the CVSS scale, and their vectors show network access, low complexity and no user interaction.

The table below groups the data-safety fixes by what you need to do afterward.

What Does the November 2026 PostgreSQL Update Fix?
Fix areaWho is affectedAction after update
GIN index corruptionAnyone with GIN indexesReindex if you suspect damage
pg_trgm GiST corruptionIndexes using gist_trgm_opsReindex
B-tree deduplication on bpcharColumns declared as bpchar with no lengthReindex (char(n) is not affected)
Missing chunk number errorsTables whose TOAST index was rebuilt concurrentlyReindex the table
Incremental backup bugsAnyone using incremental backupsTake a new full backup
NOT NULL NO INHERIT constraintsPartitioned tablesFind and repair constraints

The same release also fixes possible row loss during a table rewrite, such as CLUSTER or VACUUM FULL, when a subtransaction that updated a row later aborted. It fixes partition pruning bugs that could miss rows, and planner bugs that could return wrong results. None of those leave an error message behind, which is why the update matters even when nothing looks broken.

Which PostgreSQL Versions Are Still Supported After This Update?

A green wall calendar with a pen and push pin, used for planning upgrade dates.

Versions 15 through 18 are supported, and version 14 just received its last release. The PostgreSQL project supports a major version for five years after its first release. After that, it ships a final minor version and the software becomes end-of-life.

The PostgreSQL versioning policy page lists current minors and final release dates. This table shows the supported lines as of November 2026.

Which PostgreSQL Versions Are Still Supported After This Update?
Major versionCurrent minorFinal release date
1818.7November 14, 2030
1717.12November 8, 2029
1616.16November 9, 2028
1515.20November 11, 2027
1414.25November 12, 2026

The same page says the community considers minor upgrades less risky than running an old minor version. Its advice is to always run the current minor release for your major version. That sentence is the best argument for scheduling this update rather than deferring it.

PostgreSQL 19 is a separate question. The announcement ships its second release candidate and says general availability is planned for November 19, 2026, barring a new problem. For the schedule history, see our explainer on the Postgres 19 delay and what it means for your upgrade plan.

How to Apply the PostgreSQL 18.7 Update Step by Step

An administrator concentrating on a computer screen while working on a server update.

A minor update is a stop, install and start. The risk lives in the order you do it and in what you check afterward. Follow these steps for each cluster, and start with a non-production copy.

  1. Record the current version with SELECT version(); and note how many minor releases you skipped.
  2. Read the PostgreSQL 18.7 release notes and the notes for every skipped minor, because skipped releases can add post-update steps.
  3. Take a full backup and confirm you can restore it.
  4. Update standby servers first, then the primary, using your normal package manager.
  5. Restart each server and confirm the new version with SHOW server_version;.
  6. Run the post-update reindex and backup steps in the next sections.

Plan the restart window like any other brief outage. If your team has trouble with rolling restarts, our guide to running schema migrations without downtime covers the same habits: small steps, a way back and a check after each one. After the restart, run a few basic smoke tests against the application, so a bad connection setting shows up before users report it.

On a managed service, the provider owns the binary swap, but you still own the post-update steps. Check which minor your instance reports with SHOW server_version;. Then ask whether the provider applied 18.7 or an earlier build, because the reindex advice only applies once the fixes are in place. Index rebuilds and backup changes are almost always your job, not theirs.

Keep the old binaries available until the new version has handled a normal day of traffic. Roll back only if you see a concrete failure, since the old minor still has the known bugs.

Which Indexes and Tables Need Work After the Update?

Start with the index types named in the release notes. List the candidates first, then rebuild them one at a time. The queries below find GIN indexes, pg_trgm GiST indexes and B-tree indexes on bpchar columns with no declared length.

text
SELECT schemaname, indexname FROM pg_indexes WHERE indexdef ILIKE '%USING gin%';
SELECT schemaname, indexname FROM pg_indexes WHERE indexdef ILIKE '%gist_trgm_ops%';

SELECT i.indexrelid::regclass AS index_name, a.attrelid::regclass AS table_name, a.attname
FROM pg_index i
JOIN pg_attribute a ON a.attrelid = i.indrelid AND a.attnum = ANY (i.indkey)
JOIN pg_class ic ON ic.oid = i.indexrelid
JOIN pg_am am ON am.oid = ic.relam
WHERE am.amname = 'btree' AND a.atttypid = 'bpchar'::regtype AND a.atttypmod = -1;

SELECT conrelid::regclass, conname FROM pg_constraint
WHERE contype = 'n' AND connoinherit
AND conrelid IN (SELECT oid FROM pg_class WHERE relkind = 'p');

The last query finds NOT NULL NO INHERIT constraints on partitioned tables, which the release now disallows.

Drop the ones you do not want. For ones you keep, the announcement says to use ALTER TABLE ... ALTER CONSTRAINT ... INHERIT, which fails if a partition already holds NULL values.

Rebuild each flagged index with REINDEX INDEX CONCURRENTLY index_name; on busy tables, or plain REINDEX INDEX index_name; where a lock is acceptable. If you see missing chunk number errors, run REINDEX TABLE table_name;, which also rebuilds the TOAST index. Reindexing is also a good moment to review which indexes you still need, and our list of database indexing mistakes that slow down queries is a useful checklist.

Work through large tables in off-peak hours and watch disk space. A concurrent rebuild needs room for the old and new index at the same time.

What Should You Do About Backups, Standbys and PostgreSQL 14?

An external hard drive connected to a laptop with a USB cable on a desk.

Take a new full backup after updating if you use incremental backups, and check any dump taken from a standby. The release fixes several bugs that could produce corrupt incremental backups. It also fixes snapshot export and import on standby servers, which affected parallel pg_dump run against a standby.

That second fix has a practical consequence. A parallel dump taken from a standby on an affected version could be corrupt, so treat those dumps as suspect and re-run them once the standby is patched. Base backups also got fixes for a torn pg_control copy and for truncated copies of files such as postgresql.auto.conf.

If you still run PostgreSQL 14, this is the last patch you will get. Start a major upgrade plan now, using pg_upgrade or dump and restore. The versioning page says major upgrades need one of those two methods. Target a supported version with a long window, such as 18, unless an extension you depend on is not ready for it yet.

One more detail affects anyone with date-heavy data. The release updates time zone data to tzdata 2026f, including year-round offsets for Manitoba and the Northwest Territories starting in November 2026. Check timestamp-sensitive reports after the restart.

Patch Now, Then Finish the Post-Update Checklist

The answer is simple. Move each cluster to the current minor for its major version, then work through the reindex, backup and constraint steps above. Do not stop after the restart. A patched server with an unrebuilt index can still return wrong answers.

Put PostgreSQL 14 on your upgrade calendar today, and decide your target before the PostgreSQL 19 launch on November 19 changes the conversation. Backtrace will keep covering Postgres releases with the steps that come after the install.

Do I need pg_upgrade to install PostgreSQL 18.7?
No. PostgreSQL minor releases do not require a dump and restore or pg_upgrade. You stop the server, install the updated binaries and restart. You may still have post-update steps, such as reindexing certain indexes, so read the release notes first, especially if you skipped earlier minor releases.
Which indexes should I reindex after the November 2026 update?
Reindex GIN indexes if you suspect corruption, GiST indexes that use gist_trgm_ops, and B-tree indexes on bpchar columns declared without a length. Columns declared as char(n) are not affected. If you see missing chunk number errors, reindex the whole table so its TOAST index is rebuilt too.
Is PostgreSQL 14 still supported?
No. PostgreSQL 14.25, released November 12, 2026, is the final release of that major version. The project supports each major version for five years, then ships a last minor and ends support. Plan a major upgrade with pg_upgrade or dump and restore, and pick a version with a long remaining window.
Do I need a new backup after updating PostgreSQL?
If you use incremental backups, yes. The release fixes several bugs that could produce corrupt incremental backups, so take a fresh full backup after updating and base later incrementals on it. Also re-run any parallel pg_dump that was taken from a standby on an affected version.

Written by

Paige Donnelly

Senior Backend Engineer

8+ years experience

Paige Donnelly is a senior backend engineer who has spent the last eight years working on distributed systems, first at a mid-size fintech and then leading a payments infrastructure team through a migration from a monolith to event-driven services. She's on the losing end of more 3am pages than she'd like to admit, which is why she writes about observability, deployment safety, and API design with an eye toward what actually breaks in production rather than what looks good in a conference talk. She contributes to a couple of open-source CLI tools in her spare time and still refuses to use a debugger for anything she can solve with well-placed logs.

Credentials

  • 8 years in backend and distributed systems engineering
  • Former tech lead, payments infrastructure at a Series D fintech
  • Contributor to several open-source developer tooling projects