↑↓ 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.1 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.1

2020-11-12

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

13.1 HistoricalSupport ends 2025-11-13

Security records mentioned in this release 3 CVEs
CVEs mentioned in these notes, including possible follow-up fixes for earlier vulnerabilities
CVE / issueSeverityFixed version
CVE-2020-25695

Block DECLARE CURSOR ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries

8.813.1
CVE-2020-25694

Fix usage of complex connection-string parameters in pg_dump, pg_restore, clusterdb, reindexdb, and vacuumdb

8.113.1
CVE-2020-25696

Prevent psql's \gset command from modifying specially-treated variables

7.513.1

PostgreSQL 13.1

Migration and compatibility

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

SecurityBlock DECLARE CURSOR ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries

Changes

Block DECLARE CURSOR ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries (Noah Misch) §

This is essentially a leak in the “security restricted operation” sandbox mechanism. An attacker having permission to create non-temporary SQL objects could parlay this leak to execute arbitrary SQL code as a superuser.

The PostgreSQL Project thanks Etienne Stalmans for reporting this problem. (CVE-2020-25695)

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.

SecurityFix usage of complex connection-string parameters in pg_dump, pg_restore, clusterdb, reindexdb, and vacuumdb

Changes

Fix usage of complex connection-string parameters in pg_dump, pg_restore, clusterdb, reindexdb, and vacuumdb (Tom Lane) § §

The -d parameter of pg_dump and pg_restore, or the --maintenance-db parameter of the other programs mentioned, can be a “connection string” containing multiple connection parameters rather than just a database name. In cases where these programs need to initiate additional connections, such as parallel processing or processing of multiple databases, the connection string was forgotten and just the basic connection parameters (database name, host, port, and username) were used for the additional connections. This could lead to connection failures if the connection string included any other essential information, such as non-default SSL or GSS parameters. Worse, the connection might succeed but not be encrypted as intended, or be vulnerable to man-in-the-middle attacks that the intended connection parameters would have prevented. (CVE-2020-25694)

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.

SecurityWhen psql's \connect command re-uses connection parameters, ensure that all non-overridden parameters from a previous connection string are re-used

Changes

When psql's \connect command re-uses connection parameters, ensure that all non-overridden parameters from a previous connection string are re-used (Tom Lane) §

This avoids cases where reconnection might fail due to omission of relevant parameters, such as non-default SSL or GSS options. Worse, the reconnection might succeed but not be encrypted as intended, or be vulnerable to man-in-the-middle attacks that the intended connection parameters would have prevented. This is largely the same problem as just cited for pg_dump et al, although psql's behavior is more complex since the user may intentionally override some connection parameters. (CVE-2020-25694)

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.

SecurityPrevent psql's \gset command from modifying specially-treated variables

Changes

Prevent psql's \gset command from modifying specially-treated variables (Noah Misch) §

\gset without a prefix would overwrite whatever variables the server told it to. Thus, a compromised server could set specially-treated variables such as PROMPT1, giving the ability to execute arbitrary shell code in the user's session.

The PostgreSQL Project thanks Nick Cleaton for reporting this problem. (CVE-2020-25696)

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 unintended breakage of the replication protocol

Changes

Fix unintended breakage of the replication protocol (Álvaro Herrera) § §

A walsender reports two command-completion events for START_REPLICATION. This was undocumented and apparently unintentional; so we failed to notice that a late 13.0 change removed the duplicate event. However it turns out that walreceivers require the extra event in some code paths. The most practical fix is to decree that the extra event is part of the protocol and resume generating it.

ImprovementsEnsure that SLRU directories are properly fsync'd during checkpoints

Changes

Ensure that SLRU directories are properly fsync'd during checkpoints (Thomas Munro) §

This prevents possible data loss in a subsequent operating system crash.

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 ALTER ROLE for users with the BYPASSRLS attribute

Changes

Fix ALTER ROLE for users with the BYPASSRLS attribute (Tom Lane, Stephen Frost) §

The BYPASSRLS attribute is only allowed to be changed by superusers, but other ALTER ROLE operations, such as password changes, should be allowed with only ordinary permission checks. The previous coding erroneously restricted all changes on such a role to superusers.

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 ALTER TABLE ONLY ... DROP EXPRESSION when there are child tables

Changes

Disallow ALTER TABLE ONLY ... DROP EXPRESSION when there are child tables (Peter Eisentraut) §

The current implementation cannot handle this case correctly, so just forbid it for now.

ImprovementsEnsure that ALTER TABLE ONLY ... ENABLE/DISABLE TRIGGER does not recurse to child tables

Changes

Ensure that ALTER TABLE ONLY ... ENABLE/DISABLE TRIGGER does not recurse to child tables (Álvaro Herrera) §

Previously the ONLY flag was ignored.

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.

ImprovementsAllow LOCK TABLE to succeed on a self-referential view

Changes

Allow LOCK TABLE to succeed on a self-referential view (Tom Lane) §

It previously threw an error complaining about infinite recursion, but there seems no need to disallow the case.

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.

ImprovementsRetain statistics about an index across REINDEX CONCURRENTLY

Changes

Retain statistics about an index across REINDEX CONCURRENTLY (Michael Paquier, Fabrízio de Royes Mello) §

Non-concurrent reindexing has always preserved such statistics.

Related records (1)

“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 progress reporting from REINDEX CONCURRENTLY

Changes

Fix incorrect progress reporting from REINDEX CONCURRENTLY (Matthias van de Meent, Michael Paquier) §

Related records (1)

“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 GENERATED columns are updated when the column(s) they depend on are updated via a rule or an updatable view

Changes

Ensure that GENERATED columns are updated when the column(s) they depend on are updated via a rule or an updatable view (Tom Lane) §

This fix also takes care of possible failure to fire a column-specific trigger in such cases.

Related records (1)

“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 failures with collation-dependent partition bound expressions

Changes

Fix failures with collation-dependent partition bound expressions (Tom Lane) §

Related records (1)

“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.

ImprovementsSupport hashing of text arrays

Changes

Support hashing of text arrays (Peter Eisentraut) §

Array hashing failed if the array element type is collatable. Notably, this prevented using hash partitioning with a text array column as partition key.

Related records (1)

“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 internal overflows in cross-type datetime comparisons

Changes

Prevent internal overflows in cross-type datetime comparisons (Nikita Glukhov, Alexander Korotkov, Tom Lane) §

Previously, comparing a date to a timestamp would fail if the date is past the valid range for timestamps. There were also corner cases involving overflow of close-to-the-limit timestamp values during timezone rotation.

Bug fixesFix off-by-one conversion of negative years to BC dates in to_date() and to_timestamp()

Changes

Fix off-by-one conversion of negative years to BC dates in to_date() and to_timestamp() (Dar Alathar-Yemen, Tom Lane) §

Also, arrange for the combination of a negative year and an explicit “BC” marker to cancel out and produce AD.

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.

ImprovementsAllow the jsonpath .datetime() method to accept ISO 8601-format timestamps

Changes

Allow the jsonpath .datetime() method to accept ISO 8601-format timestamps (Nikita Glukhov) § §

This is not required by SQL, but it seems appropriate since our to_json() functions generate that timestamp format for Javascript compatibility.

ImprovementsEnsure that standby servers will archive WAL timeline history files when archive_mode is set to always

Changes

Ensure that standby servers will archive WAL timeline history files when archive_mode is set to always (Grigory Smolkin, Fujii Masao) §

This oversight could lead to failure of subsequent PITR recovery attempts.

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 edge cases in detecting premature death of the postmaster on platforms that use kqueue()

Changes

Fix edge cases in detecting premature death of the postmaster on platforms that use kqueue() (Thomas Munro) § §

ImprovementsAvoid generating an incorrect incremental-sort plan when the sort key is a volatile expression

Changes

Avoid generating an incorrect incremental-sort plan when the sort key is a volatile expression (James Coleman) §

Bug fixesFix possible crash when considering partition-wise joins during GEQO planning

Changes

Fix possible crash when considering partition-wise joins during GEQO planning (Tom Lane) §

Related records (1)

“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 possible infinite loop or corrupted output data in TOAST decompression

Changes

Fix possible infinite loop or corrupted output data in TOAST decompression (Tom Lane) § §

Bug fixesFix counting of the number of entries in B-tree indexes during cleanup-only VACUUMs

Changes

Fix counting of the number of entries in B-tree indexes during cleanup-only VACUUMs (Peter Geoghegan) §

ImprovementsEnsure that data is detoasted before being inserted into a BRIN index

Changes

Ensure that data is detoasted before being inserted into a BRIN index (Tomas Vondra) §

Index entries are not supposed to contain out-of-line TOAST pointers, but BRIN didn't get that memo. This could lead to errors like “missing chunk number 0 for toast value NNN”. (If you are faced with such an error from an existing index, REINDEX should be enough to fix it.)

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 buffered GiST index builds to work when the index has included columns

Changes

Fix buffered GiST index builds to work when the index has included columns (Pavel Borisov) §

Related records (1)

“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 unportable use of getnameinfo() in pg_hba_file_rules view

Changes

Fix unportable use of getnameinfo() in pg_hba_file_rules view (Tom Lane) §

On FreeBSD 11, and possibly other platforms, the view's address and netmask columns were always null due to this error.

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 fixesAvoid crash if debug_query_string is NULL when starting a parallel worker

Changes

Avoid crash if debug_query_string is NULL when starting a parallel worker (Noah Misch) §

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.

ImprovementsAvoid failures when a BEFORE ROW UPDATE trigger returns the “old” row of a table having dropped or “missing” columns

Changes

Avoid failures when a BEFORE ROW UPDATE trigger returns the “old” row of a table having dropped or “missing” columns (Amit Langote, Tom Lane) § §

This method of suppressing an update could result in crashes, unexpected CHECK constraint failures, or incorrect RETURNING output, because “missing” columns would read as NULLs for those purposes. (A column is “missing” for this purpose if it was added by ALTER TABLE ADD COLUMN with a non-NULL, but constant, default value.) Dropped columns could cause trouble as well.

Related records (1)

“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 EXPLAIN's output for incremental sort plans to have correct tag nesting in XML output mode

Changes

Fix EXPLAIN's output for incremental sort plans to have correct tag nesting in XML output mode (Daniel Gustafsson) §

ImprovementsAvoid unnecessary failure when transferring very large payloads through shared memory queues

Changes

Avoid unnecessary failure when transferring very large payloads through shared memory queues (Markus Wanner) §

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 omission of result data type coercion in some cases in SQL-language functions

Changes

Fix omission of result data type coercion in some cases in SQL-language functions (Tom Lane) §

This could lead to wrong results or crashes, depending on the data types involved.

Bug fixesFix incorrect handling of template function attributes in JIT code generation

Changes

Fix incorrect handling of template function attributes in JIT code generation (Andres Freund) § §

This has been shown to cause crashes on s390x, and very possibly there are other cases on other platforms.

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.

ImprovementsImprove code generated for compare_exchange and fetch_add operations on PPC

Changes

Improve code generated for compare_exchange and fetch_add operations on PPC (Noah Misch) § §

Bug fixesFix relation cache memory leaks with RLS policies

Changes

Fix relation cache memory leaks with RLS policies (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.

Bug fixesFix edge-case memory leak in index_get_partition()

Changes

Fix edge-case memory leak in index_get_partition() (Justin Pryzby) §

Related records (1)

“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 small memory leak when SIGHUP processing decides that a new GUC variable value cannot be applied without a restart

Changes

Fix small memory leak when SIGHUP processing decides that a new GUC variable value cannot be applied without a restart (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.

Bug fixesFix memory leaks in PL/pgsql's CALL processing

Changes

Fix memory leaks in PL/pgsql's CALL processing (Pavel Stehule, Tom Lane) §

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 libpq for Windows, call WSAStartup() once per process and WSACleanup() not at all

Changes

In libpq for Windows, call WSAStartup() once per process and WSACleanup() not at all (Tom Lane, Alexander Lakhin) §

Previously, libpq invoked WSAStartup() at connection start and WSACleanup() at connection cleanup. However, it appears that calling WSACleanup() can interfere with other program operations; notably, we have observed rare failures to emit expected output to stdout. There appear to be no ill effects from omitting the call, so do that. (This also eliminates a performance issue from repeated DLL loads and unloads when a program performs a series of database connections.)

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 ecpg library's per-thread initialization logic for Windows

Changes

Fix ecpg library's per-thread initialization logic for Windows (Tom Lane, Alexander Lakhin) §

Multi-threaded ecpg applications could suffer rare misbehavior due to incorrect locking.

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 ecpg's mis-processing of B'...' and X'...' literals

Changes

Fix ecpg's mis-processing of B'...' and X'...' literals (Shenhao Wang) § §

ImprovementsOn Windows, make psql read the output of a backtick command in text mode, not binary mode

Changes

On Windows, make psql read the output of a backtick command in text mode, not binary mode (Tom Lane) §

This ensures proper handling of newlines.

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.

ImprovementsEnsure that pg_dump collects per-column information about extension configuration tables

Changes

Ensure that pg_dump collects per-column information about extension configuration tables (Fabrízio de Royes Mello, Tom Lane) § §

Failure to do this led to crashes when specifying --inserts, or underspecified (though usually correct) COPY commands when using COPY to reload the tables' data.

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.

ImprovementsMake pg_upgrade check for pre-existence of tablespace directories in the target cluster

Changes

Make pg_upgrade check for pre-existence of tablespace directories in the target cluster (Bruce Momjian) § §

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 potential memory leak in contrib/pgcrypto

Changes

Fix potential memory leak in contrib/pgcrypto (Michael Paquier) §

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 check for an unlikely failure case in contrib/pgcrypto

Changes

Add check for an unlikely failure case in contrib/pgcrypto (Daniel Gustafsson) §

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 recently-added timetz test case so it works when the USA is not observing daylight savings time

Changes

Fix recently-added timetz test case so it works when the USA is not observing daylight savings time (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.

ImprovementsUpdate time zone data files to tzdata release 2020d for DST law changes in Fiji, Morocco, Palestine, the Canadian Yukon, Macquarie Island, and Casey Station (Antarctica); plus historical corrections for France, Hungary, Monaco, and Palestine.

Changes

Update time zone data files to tzdata release 2020d for DST law changes in Fiji, Morocco, Palestine, the Canadian Yukon, Macquarie Island, and Casey Station (Antarctica); plus historical corrections for France, Hungary, Monaco, and Palestine. (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.

ImprovementsSync our copy of the timezone library with IANA tzcode release 2020d

Changes

Sync our copy of the timezone library with IANA tzcode release 2020d (Tom Lane) § §

This absorbs upstream's change of zic's default output option from “fat” to “slim”. That's just cosmetic for our purposes, as we continue to select the “fat” mode in pre-v13 branches. This change also ensures that strftime() does not change errno unless it fails.

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.