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.
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?
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.
| Fix area | Who is affected | Action after update |
|---|---|---|
| GIN index corruption | Anyone with GIN indexes | Reindex if you suspect damage |
| pg_trgm GiST corruption | Indexes using gist_trgm_ops | Reindex |
| B-tree deduplication on bpchar | Columns declared as bpchar with no length | Reindex (char(n) is not affected) |
| Missing chunk number errors | Tables whose TOAST index was rebuilt concurrently | Reindex the table |
| Incremental backup bugs | Anyone using incremental backups | Take a new full backup |
| NOT NULL NO INHERIT constraints | Partitioned tables | Find 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?
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.
| Major version | Current minor | Final release date |
|---|---|---|
| 18 | 18.7 | November 14, 2030 |
| 17 | 17.12 | November 8, 2029 |
| 16 | 16.16 | November 9, 2028 |
| 15 | 15.20 | November 11, 2027 |
| 14 | 14.25 | November 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
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.
- Record the current version with
SELECT version();and note how many minor releases you skipped. - Read the PostgreSQL 18.7 release notes and the notes for every skipped minor, because skipped releases can add post-update steps.
- Take a full backup and confirm you can restore it.
- Update standby servers first, then the primary, using your normal package manager.
- Restart each server and confirm the new version with
SHOW server_version;. - 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.
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?
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.