↑↓ 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 13.16 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

13.16

2024-08-08

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

13.16 HistoricalSupport ends 2025-11-13

Security records mentioned in this release 2 CVEs
CVEs mentioned in these notes, including possible follow-up fixes for earlier vulnerabilities
CVE / issueSeverityFixed version
CVE-2024-7348

Prevent unauthorized code execution during pg_dump

8.813.16
CVE-2023-5869

Detect another integer overflow case while computing new array dimensions

8.813.13

PostgreSQL 13.16

Migration and compatibility

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

However, if you are upgrading from a version earlier than 13.14, see Section E.10.

SecurityPrevent unauthorized code execution during pg_dump

Changes

Prevent unauthorized code execution during pg_dump (Masahiko Sawada) §

An attacker able to create and drop non-temporary objects could inject SQL code that would be executed by a concurrent pg_dump session with the privileges of the role running pg_dump (which is often a superuser). The attack involves replacing a sequence or similar object with a view or foreign table that will execute malicious code. To prevent this, introduce a new server parameter restrict_nonsystem_relation_kind that can disable expansion of non-builtin views as well as access to foreign tables, and teach pg_dump to set it when available. Note that the attack is prevented only if both pg_dump and the server it is dumping from are new enough to have this fix.

The PostgreSQL Project thanks Noah Misch for reporting this problem. (CVE-2024-7348)

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 failure after attaching a table as a partition, if the table had previously had inheritance children

Changes

Fix failure after attaching a table as a partition, if the table had previously had inheritance children (Álvaro Herrera) §

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 ALTER TABLE DETACH PARTITION for cases involving inconsistent index-based constraints

Changes

Fix ALTER TABLE DETACH PARTITION for cases involving inconsistent index-based constraints (Álvaro Herrera, Tender Wang) § §

When a partitioned table has an index that is not associated with a constraint, but a partition has an equivalent index that is, then detaching the partition would misbehave, leaving the ex-partition's constraint with an incorrect coninhcount value. This would cause trouble during any further manipulations of that constraint.

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 handling of polymorphic output arguments for procedures

Changes

Fix handling of polymorphic output arguments for procedures (Tom Lane) § §

The SQL CALL statement did not resolve the correct data types for such arguments, leading to errors such as “cannot display a value of type anyelement”, or even outright crashes. (But CALL in PL/pgSQL worked correctly.)

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 behavior of stable functions called from a CALL statement's argument list

Changes

Fix behavior of stable functions called from a CALL statement's argument list (Tom Lane) §

If the CALL is within an atomic context (e.g. there's an outer transaction block), such functions were passed the wrong snapshot, causing them to see stale values of rows modified since the start of the outer transaction.

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.

ImprovementsDetect integer overflow in money calculations

Changes

Detect integer overflow in money calculations (Joseph Koshakow) §

None of the arithmetic functions for the money type checked for overflow before, so they would silently give wrong answers for overflowing 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.

Bug fixesFix over-aggressive clamping of the scale argument in round(numeric) and trunc(numeric)

Changes

Fix over-aggressive clamping of the scale argument in round(numeric) and trunc(numeric) (Dean Rasheed) §

These functions clamped their scale argument to +/-2000, but there are valid use-cases for it to be larger; the functions returned incorrect results in such cases. Instead clamp to the actual allowed range of type numeric.

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.

ImprovementsPrevent pg_sequence_last_value() from failing on unlogged sequences on standby servers and on temporary sequences of other sessions

Changes

Prevent pg_sequence_last_value() from failing on unlogged sequences on standby servers and on temporary sequences of other sessions (Nathan Bossart) §

Make it return NULL in these cases instead of throwing an error.

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 parsing of ignored operators in websearch_to_tsquery()

Changes

Fix parsing of ignored operators in websearch_to_tsquery() (Tom Lane) §

Per the manual, punctuation in the input of websearch_to_tsquery() is ignored except for the special cases of dashes and quotes. However, parentheses and a few other characters appearing immediately before an or could cause or to be treated as a data word, rather than as an OR operator as expected.

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.

SecurityDetect another integer overflow case while computing new array dimensions

Changes

Detect another integer overflow case while computing new array dimensions (Joseph Koshakow) §

Reject applying array dimensions [-2147483648:2147483647] to an empty array. This is closely related to CVE-2023-5869, but appears harmless since the array still ends up empty.

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.

ImprovementsDetect another case of a new catalog cache entry becoming stale while detoasting its fields

Changes

Detect another case of a new catalog cache entry becoming stale while detoasting its fields (Noah Misch) §

An in-place update occurring while we expand out-of-line fields in a catalog tuple could be missed, leading to a catalog cache entry that lacks the in-place change but is not known to be stale. This is only possible in the pg_database catalog, so the effects are narrow, but misbehavior is possible.

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.

ImprovementsCorrectly check updatability of view columns targeted by INSERT ... DEFAULT

Changes

Correctly check updatability of view columns targeted by INSERT ... DEFAULT (Tom Lane) §

If such a column is non-updatable, we should give an error reporting that. But the check was missed and then later code would report an unhelpful error such as “attribute number N not found in view targetlist”.

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.

ImprovementsAvoid reporting an unhelpful internal error for incorrect recursive queries

Changes

Avoid reporting an unhelpful internal error for incorrect recursive queries (Tom Lane) §

Rearrange the order of error checks so that we throw an on-point error when a WITH RECURSIVE query does not have a self-reference within the second arm of the UNION, but does have one self-reference in some other place such as ORDER BY.

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.

ImprovementsDon't throw an error if a queued AFTER trigger no longer exists

Changes

Don't throw an error if a queued AFTER trigger no longer exists (Tom Lane) §

It's possible for a transaction to execute an operation that queues a deferred AFTER trigger for later execution, and then to drop the trigger before that happens. Formerly this led to weird errors such as “could not find trigger NNNN”. It seems better to silently do nothing if the trigger no longer exists at the time when it would have been executed.

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 failure to remove pg_init_privs entries for column-level privileges when their table is dropped

Changes

Fix failure to remove pg_init_privs entries for column-level privileges when their table is dropped (Tom Lane) §

If an extension grants some column-level privileges on a table it creates, relevant catalog entries would remain behind after the extension is dropped. This was harmless until/unless the table's OID was re-used for another relation, when it could interfere with what pg_dump dumps for that relation.

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 selection of an arbiter index for ON CONFLICT when the desired index has expressions or predicates

Changes

Fix selection of an arbiter index for ON CONFLICT when the desired index has expressions or predicates (Tom Lane) §

If a query using ON CONFLICT accesses the target table through an updatable view, it could fail with “there is no unique or exclusion constraint matching the ON CONFLICT specification”, even though a matching index does exist.

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.

ImprovementsRefuse to modify a temporary table of another session with ALTER TABLE

Changes

Refuse to modify a temporary table of another session with ALTER TABLE (Tom Lane) §

Permissions checks normally would prevent this case from arising, but it is possible to reach it by altering a parent table whose child is another session's temporary table. Throw an error if we discover that such a child table belongs to another session.

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 failure to recalculate sub-queries generated from MIN() or MAX() aggregates

Changes

Fix failure to recalculate sub-queries generated from MIN() or MAX() aggregates (Tom Lane) §

In some cases the aggregate result computed at one row of the outer query could be re-used for later rows when it should not be. This has only been seen to happen when the outer query uses DISTINCT that is implemented with hash aggregation, but other cases may exist.

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 crashing when a JIT-inlined backend function throws an error

Changes

Avoid crashing when a JIT-inlined backend function throws an error (Tom Lane) §

The error state can include pointers into the dynamically loaded module holding the JIT-compiled code (for error location strings). In some code paths the module could get unloaded before the error report is processed, leading to SIGSEGV when the location strings are accessed.

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.

ImprovementsCope with behavioral changes in libxml2 version 2.13.x

Changes

Cope with behavioral changes in libxml2 version 2.13.x (Erik Wienhold, Tom Lane) §

Notably, we now suppress “chunk is not well balanced” errors from libxml2, unless that is the only reported error. This is to make error reports consistent between 2.13.x and earlier libxml2 versions. In earlier versions, that message was almost always redundant or outright incorrect, so 2.13.x substantially reduced the number of cases in which it's reported.

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 handling of subtransactions of prepared transactions when starting a hot standby server

Changes

Fix handling of subtransactions of prepared transactions when starting a hot standby server (Heikki Linnakangas) §

When starting a standby's replay at a shutdown checkpoint WAL record, transactions that had been prepared but not yet committed on the primary are correctly understood as being still in progress. But subtransactions of a prepared transaction (created by savepoints or PL/pgSQL exception blocks) were not accounted for and would be treated as aborted. That led to inconsistency if the prepared transaction was later committed.

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.

ImprovementsPrevent incorrect initialization of logical replication slots

Changes

Prevent incorrect initialization of logical replication slots (Masahiko Sawada) §

In some cases a replication slot's start point within the WAL stream could be set to a point within a transaction, leading to assertion failures or incorrect decoding results.

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 memory leakage after servicing a notify or sinval interrupt

Changes

Avoid memory leakage after servicing a notify or sinval interrupt (Tom Lane) §

The processing functions for these events could switch the current memory context to TopMemoryContext, resulting in session-lifespan leakage of any data allocated before the incorrect setting gets replaced. There were observable leaks associated with (at least) encoding conversion of incoming queries and parameters attached to Bind messages.

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.

ImprovementsAvoid possibly missing end-of-input events on Windows sockets

Changes

Avoid possibly missing end-of-input events on Windows sockets (Thomas Munro) §

Windows reports an FD_CLOSE event only once after the remote end of the connection disconnects. With unlucky timing, we could miss that report and wait indefinitely, or at least until a timeout elapsed, expecting more input.

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 buffer overread in JSON parse error reports for incomplete byte sequences

Changes

Fix buffer overread in JSON parse error reports for incomplete byte sequences (Jacob Champion) §

It was possible to walk off the end of the input buffer by a few bytes when the last bytes comprise an incomplete multi-byte character. While usually harmless, in principle this could cause a crash.

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.

ImprovementsDisable creation of stateful TLS session tickets by OpenSSL

Changes

Disable creation of stateful TLS session tickets by OpenSSL (Daniel Gustafsson) § § §

This avoids possible failures with clients that think receipt of a session ticket means that TLS session resumption is supported.

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.

ImprovementsWhen replanning a PL/pgSQL “simple expression”, check it's still simple

Changes

When replanning a PL/pgSQL “simple expression”, check it's still simple (Tom Lane) §

Certain fairly-artificial cases, such as dropping a referenced function and recreating it as an aggregate, could lead to surprising failures such as “unexpected plan node type”.

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 incompatibility between PL/Perl and Perl 5.40

Changes

Fix incompatibility between PL/Perl and Perl 5.40 (Andrew Dunstan) §

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 recursive RECORD-returning PL/Python functions

Changes

Fix recursive RECORD-returning PL/Python functions (Tom Lane) §

If we recurse to a new call of the same function that passes a different column definition list (AS clause), it would fail because the inner call would overwrite the outer call's idea of what rowtype to return.

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.

ImprovementsDon't corrupt PL/Python's TD dictionary during a recursive trigger call

Changes

Don't corrupt PL/Python's TD dictionary during a recursive trigger call (Tom Lane) §

If a PL/Python-language trigger caused another one to be invoked, the TD dictionary created for the inner one would overwrite the outer one's TD dictionary.

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 PL/Tcl's reporting of invalid list syntax in the result of a function returning tuple

Changes

Fix PL/Tcl's reporting of invalid list syntax in the result of a function returning tuple (Erik Wienhold, Tom Lane) §

Such a case could result in a crash, or in emission of misleading context information that actually refers to the previous Tcl error.

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.

ImprovementsAvoid non-thread-safe usage of strerror() in libpq

Changes

Avoid non-thread-safe usage of strerror() in libpq (Peter Eisentraut) §

Certain error messages returned by OpenSSL could become garbled in multi-threaded applications.

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.

ImprovementsEnsure that pg_restore -l reports dependent TOC entries correctly

Changes

Ensure that pg_restore -l reports dependent TOC entries correctly (Tom Lane) §

If -l was specified together with selective-restore options such as -n or -N, dependent TOC entries such as comments would be omitted from the listing, even when an actual restore would have selected 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.

ImprovementsIn contrib/postgres_fdw, do not send FETCH FIRST WITH TIES clauses to the remote server

Changes

In contrib/postgres_fdw, do not send FETCH FIRST WITH TIES clauses to the remote server (Japin Li) §

The remote server might not implement this clause, or might interpret it differently than we would locally, so don't risk attempting remote execution.

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.

ImprovementsAvoid clashing with system-provided <regex.h> headers

Changes

Avoid clashing with system-provided <regex.h> headers (Thomas Munro) §

This fixes a compilation failure on macOS version 15 and up.

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 otherwise-harmless assertion failures in REINDEX CONCURRENTLY applied to an SP-GiST index

Changes

Fix otherwise-harmless assertion failures in REINDEX CONCURRENTLY applied to an SP-GiST index (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.

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.