↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

DocumentationVersion comparison

POSTGRESQL · VERSION COMPARE

PostgreSQL 12.13 release changes

All features, fixes, and compatibility notes in this release, with related records from other versions.

All changes in this release
All changes in this release

Includes changes after the source version through the target. A major version name means its initial release.

From PostgreSQL 9.0 onward: 17 major branches and 352 release notes. Updated 2026-09-26.

Complete release changes

12.13

2022-11-10

Export JSON
38changesFeatures, fixes, improvements
1releaseGrouped by release
0CVEsVulnerability IDs mentioned in these notes

12.13 HistoricalSupport ends 2024-11-21

PostgreSQL 12.13

Migration and compatibility

A dump/restore is not required for those running 12.X.

However, if you are upgrading from a version earlier than 12.10, see Section E.13.

ImprovementsAvoid rare PANIC during updates occurring concurrently with VACUUM

Changes

Avoid rare PANIC during updates occurring concurrently with VACUUM (Tom Lane, Jeff Davis) § §

If a concurrent VACUUM sets the all-visible flag bit in a page that UPDATE or DELETE is in process of modifying, the updating command needs to clear that bit again; but some code paths failed to do so, ending in a PANIC exit and database restart.

This is known to be possible in versions 14 and 15. It may be only latent in previous branches.

Related records (2)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix VACUUM to press on if an attempted page deletion in a btree index fails to find the page's parent downlink

Changes

Fix VACUUM to press on if an attempted page deletion in a btree index fails to find the page's parent downlink (Peter Geoghegan) §

Rather than throwing an error, just log the issue and continue without deleting the empty page. Previously, a buggy operator class or corrupted index could indefinitely prevent completion of vacuuming of the index, eventually leading to transaction wraparound problems.

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix handling of DEFAULT tokens that appear in a multi-row VALUES clause of an INSERT on an updatable view

Changes

Fix handling of DEFAULT tokens that appear in a multi-row VALUES clause of an INSERT on an updatable view (Tom Lane) §

This oversight could lead to “cache lookup failed for type” errors, or in older branches even to crashes.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsDisallow rules named _RETURN that are not ON SELECT

Changes

Disallow rules named _RETURN that are not ON SELECT (Tom Lane) §

This avoids confusion between a view's ON SELECT rule and any other rules it may have.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix resource management bug in saving tuples for AFTER triggers

Changes

Fix resource management bug in saving tuples for AFTER triggers (Tom Lane) §

Given the right circumstances, this manifested as a “tupdesc reference NNNN is not owned by resource owner” error followed by a PANIC exit.

Related records (2)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesRepair rare failure of MULTIEXPR_SUBLINK subplans in inherited updates

Changes

Repair rare failure of MULTIEXPR_SUBLINK subplans in inherited updates (Tom Lane) § § §

Use of the syntax UPDATE tab SET (c1, ...) = (SELECT ...) with an inherited or partitioned target table could result in failure if the child tables are sufficiently dissimilar. This typically manifested as failure of consistency checks in the executor; but a crash or incorrect data updates are also possible.

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix construction of per-partition foreign key constraints while doing ALTER TABLE ATTACH PARTITION

Changes

Fix construction of per-partition foreign key constraints while doing ALTER TABLE ATTACH PARTITION (Jehan-Guillaume de Rorthais, Álvaro Herrera) § §

Previously, incorrect or duplicate constraints could be constructed for the newly-added partition.

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix generation of constraint names for per-partition foreign key constraints

Changes

Fix generation of constraint names for per-partition foreign key constraints (Jehan-Guillaume de Rorthais) §

If the initially-given name is already in use for some constraint of the partition, a new one is selected; but it wasn't being spelled as intended.

Related records (2)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix incorrect matching of index expressions and predicates when creating a partitioned index

Changes

Fix incorrect matching of index expressions and predicates when creating a partitioned index (Richard Guo, Tom Lane) §

While creating a partitioned index, we try to identify any existing indexes on the partitions that match the partitioned index, so that we can absorb those as child indexes instead of building new ones. Matching of expressions was not done right, so that a usable child index might be ignored, leading to creation of a duplicative index.

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesPrevent WAL corruption after a standby promotion

Changes

Prevent WAL corruption after a standby promotion (Dilip Kumar, Robert Haas) §

When a PostgreSQL instance performing archive recovery (but not using standby mode) is promoted, and the last WAL segment that it attempted to read ended in a partial record, the instance would write an invalid WAL segment on the new timeline.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix mis-ordering of WAL operations in fast insert path for GIN indexes

Changes

Fix mis-ordering of WAL operations in fast insert path for GIN indexes (Matthias van de Meent, Zhang Mingli) §

This mistake is not known to have any negative consequences within core PostgreSQL, but it did cause issues for some extensions.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix bugs in logical decoding when replay starts from a point between the beginning of a transaction and the beginning of its subtransaction

Changes

Fix bugs in logical decoding when replay starts from a point between the beginning of a transaction and the beginning of its subtransaction (Masahiko Sawada, Kuroda Hayato) § §

These errors could lead to assertion failures in debug builds, and otherwise to memory leaks.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsPrevent examining system catalogs with the wrong snapshot during logical decoding

Changes

Prevent examining system catalogs with the wrong snapshot during logical decoding (Masahiko Sawada) §

If decoding begins partway through a transaction that modifies system catalogs, the decoder may not recognize that, causing it to fail to treat that transaction as in-progress for catalog lookups.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAccept interrupts in more places during logical decoding

Changes

Accept interrupts in more places during logical decoding (Amit Kapila, Masahiko Sawada) § §

This ameliorates problems with slow shutdown of replication workers.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesAvoid crash after function syntax error in replication workers

Changes

Avoid crash after function syntax error in replication workers (Maxim Orlov, Anton Melnikov, Masahiko Sawada, Tom Lane) §

If a syntax error occurred in a SQL-language or PL/pgSQL-language CREATE FUNCTION or DO command executed in a logical replication worker, the worker process would crash with a null pointer dereference or assertion failure.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix handling of read-write expanded datums that are passed to SQL functions

Changes

Fix handling of read-write expanded datums that are passed to SQL functions (Tom Lane) §

If a non-inlined SQL function uses a parameter in more than one place, and one of those functions expects to be able to modify read-write datums in place, then later uses of the parameter would observe the wrong value. (Within core PostgreSQL, the expanded-datum mechanism is only used for array and composite-type values; but extensions might use it for other structured types.)

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix type circle's equality comparator to handle NaNs properly

Changes

Fix type circle's equality comparator to handle NaNs properly (Ranier Vilela) §

If the left-hand circle had a floating-point NaN for its radius, it would be considered equal to a circle with the same center and any radius.

Related records (2)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsIn Snowball dictionaries, don't try to stem excessively-long words

Changes

In Snowball dictionaries, don't try to stem excessively-long words (Olly Betts, Tom Lane) §

If the input word exceeds 1000 bytes, return it as-is after case folding, rather than trying to run it through the Snowball code. This restriction protects against a known recursion-to-stack-overflow problem in the Turkish stemmer, and it seems like good insurance against any other safety or performance issues that may exist in the Snowball stemmers. Such a long string is surely not a word in any human language, so it's doubtful that the stemmer would have done anything desirable with it anyway.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix use-after-free hazard in string comparisons

Changes

Fix use-after-free hazard in string comparisons (Tom Lane) §

Improper memory management in the string comparison functions could result in scribbling on no-longer-allocated buffers, potentially breaking things for whatever is using that memory now. This would only happen with fairly long strings (more than 1kB), and only if an ICU collation is in use.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAdd plan-time check for attempted access to a table that has no table access method

Changes

Add plan-time check for attempted access to a table that has no table access method (Tom Lane) §

This prevents a crash in some catalog-corruption scenarios, for example use of a view whose ON SELECT rule is missing.

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesPrevent postmaster crash when shared-memory state is corrupted

Changes

Prevent postmaster crash when shared-memory state is corrupted (Tom Lane) §

The postmaster process is supposed to survive and initiate a database restart if shared memory becomes corrupted, but one bit of code was being insufficiently cautious about that.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAdd some more defenses against recursion till stack overrun

Changes

Add some more defenses against recursion till stack overrun (Richard Guo, Tom Lane) § §

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesAvoid long-term memory leakage in the autovacuum launcher process

Changes

Avoid long-term memory leakage in the autovacuum launcher process (Reid Thompson) §

The lack of field reports suggests that this problem is only latent in pre-v15 branches; but it's not very clear why, so back-patch the fix anyway.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsImprove PL/pgSQL's ability to handle parameters declared as RECORD

Changes

Improve PL/pgSQL's ability to handle parameters declared as RECORD (Tom Lane) §

Build a separate function cache entry for each concrete type passed to the RECORD parameter during a session, much as we do for polymorphic parameters. This allows some usages to work that previously failed with errors such as “type of parameter does not match that when preparing the plan”.

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAdd missing guards for NULL connection pointer in libpq

Changes

Add missing guards for NULL connection pointer in libpq (Daniele Varrazzo, Tom Lane) §

There's a convention that libpq functions should check for a NULL PGconn argument, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo, so fix them.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesIn ecpg, fix omission of variable storage classes when multiple varchar or bytea variables are declared in the same declaration

Changes

In ecpg, fix omission of variable storage classes when multiple varchar or bytea variables are declared in the same declaration (Andrey Sokolov) §

For example, ecpg translated static varchar str1[10], str2[20], str3[30]; in such a way that only str1 was marked static.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAllow cross-platform tablespace relocation in pg_basebackup

Changes

Allow cross-platform tablespace relocation in pg_basebackup (Robert Haas) §

Allow the remote path in --tablespace-mapping to be either a Unix-style or Windows-style absolute path, since the source server could be on a different OS than the local system.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesIn pg_stat_statements, fix access to already-freed memory

Changes

In pg_stat_statements, fix access to already-freed memory (zhaoqigui) §

This occurred if pg_stat_statements tracked a ROLLBACK command issued via extended query protocol. In debug builds it consistently led to an assertion failure. In production builds there would often be no visible ill effect; but if the freed memory had already been reused, the likely result would be to store garbage for the query string.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsIn postgres_fdw, ensure that target lists constructed for EvalPlanQual plans will have all required columns

Changes

In postgres_fdw, ensure that target lists constructed for EvalPlanQual plans will have all required columns (Richard Guo, Etsuro Fujita) §

This avoids “variable not found in subplan target list” errors in rare cases.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsReject unwanted output from the platform's uuid_create() function

Changes

Reject unwanted output from the platform's uuid_create() function (Nazir Bilal Yavuz) §

The uuid-ossp module expects libc's uuid_create() to produce a version-1 UUID, but recent NetBSD releases produce a version-4 (random) UUID instead. Check for that, and complain if so. Drop the documentation's claim that the NetBSD implementation is usable for uuid-ossp. (If a version-4 UUID is okay for your purposes, you don't need uuid-ossp at all; just use gen_random_uuid().)

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsInclude new Perl test modules in standard installations

Changes

Include new Perl test modules in standard installations (Álvaro Herrera) §

Add PostgreSQL/Test/Cluster.pm and PostgreSQL/Test/Utils.pm to the standard installation file set in pre-version-15 branches. This is for the benefit of extensions that want to use newly-written test code in older branches.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsOn NetBSD, force dynamic symbol resolution at postmaster start

Changes

On NetBSD, force dynamic symbol resolution at postmaster start (Andres Freund, Tom Lane) §

This avoids a risk of deadlock in the dynamic linker on NetBSD 10.

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

Bug fixesFix incompatibilities with LLVM 15

Changes

Fix incompatibilities with LLVM 15 (Thomas Munro, Andres Freund) §

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAllow use of __sync_lock_test_and_set() for spinlocks on any machine

Changes

Allow use of __sync_lock_test_and_set() for spinlocks on any machine (Tom Lane) §

This eases porting to new machine architectures, at least if you're using a compiler that supports this GCC builtin function.

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsRename symbol REF to REF_P to avoid compile failure on recent macOS

Changes

Rename symbol REF to REF_P to avoid compile failure on recent macOS (Tom Lane) §

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsAvoid using sprintf, to avoid compile-time deprecation warnings

Changes

Avoid using sprintf, to avoid compile-time deprecation warnings (Tom Lane) §

Related records (3)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsSilence assorted compiler warnings from clang 15 and later

Changes

Silence assorted compiler warnings from clang 15 and later (Tom Lane) § § §

Related records (4)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

ImprovementsUpdate time zone data files to tzdata release 2022f for DST law changes in Chile, Fiji, Iran, Jordan, Mexico, Palestine, and Syria, plus historical corrections for Chile, Crimea, Iran, and Mexico.

Changes

Update time zone data files to tzdata release 2022f for DST law changes in Chile, Fiji, Iran, Jordan, Mexico, Palestine, and Syria, plus historical corrections for Chile, Crimea, Iran, and Mexico. (Tom Lane) §

Also, the Europe/Kiev zone has been renamed to Europe/Kyiv. Also, the following zones have been merged into nearby, more-populous zones whose clocks have agreed with them since 1970: Antarctica/Vostok, Asia/Brunei, Asia/Kuala_Lumpur, Atlantic/Reykjavik, Europe/Amsterdam, Europe/Copenhagen, Europe/Luxembourg, Europe/Monaco, Europe/Oslo, Europe/Stockholm, Indian/Christmas, Indian/Cocos, Indian/Kerguelen, Indian/Mahe, Indian/Reunion, Pacific/Chuuk, Pacific/Funafuti, Pacific/Majuro, Pacific/Pohnpei, Pacific/Wake and Pacific/Wallis. (This indirectly affects zones that were already links to one of these: Arctic/Longyearbyen, Atlantic/Jan_Mayen, Iceland, Pacific/Ponape, Pacific/Truk, and Pacific/Yap.) America/Nipigon, America/Rainy_River, America/Thunder_Bay, Europe/Uzhgorod, and Europe/Zaporozhye were also merged into nearby zones after discovering that their claimed post-1970 differences from those zones seem to have been errors. In all these cases, the previous zone name remains as an alias; but the actual data is that of the zone that was merged into.

These zone mergers result in loss of pre-1970 timezone history for the merged zones, which may be troublesome for applications expecting consistency of timestamptz display. As an example, the stored value 1944-06-01 12:00 UTC would previously display as 1944-06-01 13:00:00+01 if the Europe/Stockholm zone is selected, but now it will read out as 1944-06-01 14:00:00+02.

It is possible to build the time zone data files with options that will restore the older zone data, but that choice also inserts a lot of other old (and typically poorly-attested) zone data, resulting in more total changes from the previous release than accepting these upstream changes does. PostgreSQL has chosen to ship the tzdb data as-recommended, and so far as we are aware most major operating system distributions are doing likewise. However, if these changes cause significant problems for your application, a possible solution is to install a local build of the time zone data files using tzdb's backwards-compatibility options (see their PACKRATDATA and PACKRATLIST options).

Related records (5)

“Same change” requires complete matching evidence. “Related commits” can cover independent changes, a partial backport, or a follow-up correction; each release keeps its own explanation.

How is this comparison generated?

The comparison follows PostgreSQL release notes from just after the source through the target version. For a major upgrade, maintenance releases from each older branch are included only up to the next major release date, and never after the target date. A major version such as 18 means its initial release, 18.0. Previews and development snapshots are labeled separately.

Entries come from the original English manuals. Release coverage and commit evidence are verified against upstream sources. Every entry retains its complete explanation and source link. Categories aid browsing; read the full notes for impact, conditions, and migration steps.

Fixes can be backported to several branches. Confirmed duplicates are merged conservatively, with every branch explanation retained. A note describing several independent fixes is excluded only when all are already present in the source. Major-release features remain distinct from related maintenance patches unless their complete original descriptions match. Uncertain matches are retained. This is a release-note history, not an exhaustive comparison of compiled binaries.

CVE results are calculated independently from the PostgreSQL security registry and vulnerability records. A CVE counts as gained protection only when the source is affected and the target is fixed or unaffected. Remaining vulnerabilities are listed separately. Security entries and distinct CVEs are counted separately.

Interaction inspired by pgversions.com and pgversionreport. Content comes from PostgreSQL release notes. See the release notes archive.