VersionDrift
Product

PostgreSQL 16.5 → 16.15

10 releases · 7 breaking changes · 62 security fixes · 39 advisories fixed

62security7breaking1deprecated40feature146fix

Vulnerabilities fixed by this upgrade

  • 8.1 CVE-2026-6464 Untrusted data inclusion in PostgreSQL psql COPY may allow a server administrator to elicit execution of data lines as psql commands, via error injection. If the "COPY FROM STDIN" or "\copy FROM S…
  • 3.8 CVE-2026-6469 Incorrect ownership assignment in PostgreSQL ALTER TABLE ALTER TYPE command reassigns ownership of dependent statistics objects to the current user. This wrongly allows the table owner to run DROP…
  • 4.3 CVE-2026-6470 Missing authorization in PostgreSQL DDL commands allows an object creator to achieve denial of service against ALTER and DROP of the type, via creating a dependency on the type. Many DDL operation…
  • 7.2 CVE-2026-6471 Missing authorization in PostgreSQL logical decoding allows a non-superuser holding REPLICATION privilege to dlopen any file visible to the operating system account running the server, via the choi…
  • 8.8 CVE-2026-18408 Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account runnin…
  • 8.8 CVE-2026-19385 Heap buffer overflow in PostgreSQL pg_dump of long function transform lists allows an object creator to execute arbitrary code as the operating system user running pg_dump, via a crafted transform…
  • 4.3 CVE-2026-18024 Buffer over-read in PostgreSQL ascii() SQL function allows a user to disclose up to 3 bytes after the end of a specific allocation, via a crafted text value. This is the same class of defect that…
  • 8.8 CVE-2026-15742 Integer wraparound in PostgreSQL fuzzystrmatch allows a user to direct writes to a huge range of addresses, executing arbitrary code as the operating system user running the database, via extreme i…
  • 8.8 CVE-2026-16238 Type confusion in PostgreSQL pg_restore_attribute_stats() allows an object creator to execute arbitrary code as the operating system user running the database, via conflation of range and multirang…
  • 8.8 CVE-2026-16239 Type confusion in PostgreSQL "portal"/cursor lifecycle allows a user to execute arbitrary code as the operating system user running the database, via re-creation of a cursor or other portal with di…
  • 3.8 CVE-2026-16241 Integer underflow in PostgreSQL ECPG allows a database server administrator to achieve temporary denial of service against the ECPG client via sending a bytea value lacking the mandatory prefix. T…
  • 8.8 CVE-2026-14677 Integer wraparound in PostgreSQL 32-bit builds of pltcl and plperl allows an object creator to cause the server to undersize an allocation and write out-of-bounds via crafted function bodies. This…
  • 4.3 CVE-2026-14678 Buffer over-read in PostgreSQL pg_trgm index picksplit function reads past end of a heap buffer. This might allow a table maintainer to infer limited memory values, via the lossy signal of index s…
  • 8.2 CVE-2026-14679 Stack buffer overflow in PostgreSQL argument name matching allows an object creator to achieve unknown impacts via OUT parameter count. The attack can write only 0x0 and 0x1 bytes. Versions befor…
  • 8.8 CVE-2026-14680 Type confusion with PostgreSQL "internal" data type arguments allows any user to execute arbitrary code as the operating system user running the database, via calls to functions with that argument…
  • 8.8 CVE-2026-15741 SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, i…
  • 8.1 CVE-2026-14668 Type confusion regarding input of PostgreSQL ctid data type selectivity estimator allows an object creator to view a calculation derived from the value of an arbitrary 4-byte span of memory, via a…
  • 8.8 CVE-2026-14669 Heap buffer overflow in PostgreSQL to_char(timestamptz) allows the party choosing the timezone to execute arbitrary code as the operating system user running the database, via a long POSIX timezone…
  • 8.8 CVE-2026-14670 Heap buffer overflow in PostgreSQL plperl return of a tied hash allows the function owner to execute arbitrary code as the operating system user running the database, via a crafted function body.…
  • 8.8 CVE-2026-14671 Type confusion in PostgreSQL module "refint" allows an object creator to execute arbitrary code as the operating system user running the database. The fix for this emerged as a non-security bug re…
  • 5.3 CVE-2026-14672 Observable response discrepancy in PostgreSQL SCRAM authentication allows an unauthenticated user to test the existence of a user via observing the SCRAM iteration count. This requires the probed…
  • 3.8 CVE-2026-14673 Untrusted search path in PostgreSQL amcheck allows a grantee of amcheck function EXECUTE privilege to execute arbitrary functions as the owners of expression indexes that depend on the search path,…
  • 8.8 CVE-2026-14662 Integer wraparound in PostgreSQL tsvector and tsquery data type functions allows an unprivileged database user to cause the server to undersize an allocation and write out-of-bounds, via crafted la…
  • 6.5 CVE-2026-14663 Cleartext storage in PostgreSQL pgcrypto disabled ciphers allows a user to recover cleartext, via direct observation of the faulty ciphertext. The OpenSSL version and OpenSSL configuration determi…
  • 8.8 CVE-2026-14664 Heap buffer overflow in PostgreSQL regexp allows the query author to execute arbitrary code as the operating system user running the database, via text that would not pass encoding validation. Thi…
  • 4.2 CVE-2026-14666 Incomplete tracking in PostgreSQL of changes to role membership, role attributes, and database ownership allows a query to continue using cached row-level security policies after those changes requ…
  • 8.8 CVE-2026-6475 Symlink following in PostgreSQL pg_basebackup plain format and in pg_rewind allows an origin superuser to overwrite local files, e.g. /var/lib/postgres/.bashrc, that hijack the operating system acc…
  • 8.8 CVE-2026-6477 Use of inherently dangerous function PQfn(..., result_is_int=0, ...) in PostgreSQL libpq lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions allows the server superuser to overwrite a c…
  • 6.5 CVE-2026-6478 Covert timing channel in comparison of MD5-hashed password in PostgreSQL authentication allows an attacker to recover user credentials sufficient to authenticate. This does not affect scram-sha-25…
  • 7.5 CVE-2026-6479 Uncontrolled recursion in PostgreSQL SSL and GSS negotiation allows an attacker able to connect to a PostgreSQL AF_UNIX socket to achieve sustained denial of service. If SSL and GSS are both disab…
  • 8.8 CVE-2026-6637 Stack buffer overflow in PostgreSQL module "refint" allows an unprivileged database user to execute arbitrary code as the operating system user running the database. A distinct attack is possible…
  • 3.7 CVE-2026-6638 SQL injection in PostgreSQL logical replication ALTER SUBSCRIPTION ... REFRESH PUBLICATION allows a subscriber table creator to execute arbitrary SQL with the subscription's publication-side creden…
  • 5.4 CVE-2026-6472 Missing authorization in PostgreSQL CREATE TYPE allows an object creator to hijack other queries that use search_path to find user-defined types, including extension-defined types. That is to say,…
  • 8.8 CVE-2026-6473 Integer wraparound in multiple PostgreSQL server features allows an unprivileged database user to cause the server to undersize an allocation and write out-of-bounds. This may execute arbitrary co…
  • 4.3 CVE-2026-6474 Externally-controlled format string in PostgreSQL timeofday() function allows an attacker to retrieve portions of server memory, via crafted timezone zones. Versions before PostgreSQL 18.4, 17.10,…
  • 4.3 CVE-2026-2003 Improper validation of type "oidvector" in PostgreSQL allows a database user to disclose a few bytes of server memory. We have not ruled out viability of attacks that arrange for presence of confi…
  • 8.8 CVE-2026-2004 Missing validation of type of input in PostgreSQL intarray extension selectivity estimator function allows an object creator to execute arbitrary code as the operating system user running the datab…
  • 8.8 CVE-2026-2005 Heap buffer overflow in PostgreSQL pgcrypto allows a ciphertext provider to execute arbitrary code as the operating system user running the database. Versions before PostgreSQL 18.2, 17.8, 16.12,…
  • 8.8 CVE-2026-2006 Missing validation of multibyte character length in PostgreSQL text manipulation allows a database user to issue crafted queries that achieve a buffer overrun. That suffices to execute arbitrary c…

Breaking changes

  • breaking Fix incomplete removal of relation references in RestrictInfo structs during join removal (Tom Lane) This oversight has been shown to result in planner failures such as unexpected “FULL JOIN is only supported with merge-joinable or hash-joinable join conditions” errors. It may also have caused… in 16.14
  • breaking Remove faulty assertion in btree index cleanup (Peter Geoghegan) in 16.11
  • breaking Remove the unfinished slot state file after failing to write a replication slot's state to disk (Michael Paquier) Previously, a failure such as out-of-disk-space resulted in leaving a temporary state.tmp file behind. That's problematic because it would block all subsequent attempts to write the… in 16.11
  • breaking Avoid premature removal of old WAL during checkpoints (Vitaly Davydov) If a replication slot's restart point is advanced while a checkpoint is in progress, no-longer-needed WAL segments could get removed too soon, leading to recovery failure if the database crashes immediately afterwards. Fix by… in 16.10
  • breaking Remove faulty assertion that a command tag must have been determined by the end of PortalRunMulti() (Álvaro Herrera) This failed in edge cases such as an empty prepared statement. in 16.10
  • breaking Remove incorrect assertion in pgstat_report_stat() (Michael Paquier) in 16.9
  • breaking Fix cases where a logical replication slot's restart_lsn could go backwards (Masahiko Sawada) Previously, restarting logical replication could sometimes cause the slot's restart point to be recomputed as an older value than had previously been advertised in pg_replication_slots. This is bad, since… in 16.6

Security changes

  • security Restrict logical decoding output plugins to the set specified by a new server parameter output_plugin_libraries (Jacob Champion) Previously, a replication user could select any loadable library for logical decoding, allowing exploits of various sorts. To allow locking this down without breaking… in 16.15
  • security Fix contrib/pgcrypto's PGP encryption to detect unsupported ciphers (Daniel Gustafsson) Previously, if OpenSSL rejected the requested cipher (for example, because it is running in FIPS mode, or the legacy provider hasn't been loaded), pgcrypto failed to notice the failure and simply XOR'd the… in 16.15
  • security Fix psql to skip in-line data following a scripted COPY ... FROM STDIN command, even if the COPY fails before sending PGRES_COPY_IN (Tom Lane) Previously, if a COPY command failed at startup (for instance, because the target table doesn't exist) psql would not realize that and would proceed to… in 16.15
  • security Cross-check the output row type of a portal running EXECUTE or FETCH (Robert Haas) EXECUTE and FETCH use two portals: an outer one for the statement itself, and an inner one running the query being executed on its behalf. It was previously possible to make the declared row types of the two portals… in 16.15
  • security Fix buffer overrun with long time zone abbreviation in to_char() (Tom Lane) This can easily crash the server, and exploits leading to arbitrary code execution have been reported. The PostgreSQL Project thanks Hcamael, Amjad Shahzad, Tan Zhen of AntAISecurityLab, Tomer Fichman, Zheng Yu, Amy… in 16.15
  • security Fix buffer overrun in regexp match/split functions (Masahiko Sawada) If passed invalidly-encoded data, these functions could write past the end of their conversion buffer. The PostgreSQL Project thanks Francesco Verardi for reporting this problem. (CVE-2026-14664) in 16.15
  • security Harden the ascii() function against invalid input (Michael Paquier) By supplying invalidly-encoded input, this function could be coaxed to read and return a few bytes of data that it shouldn't. In assert-enabled builds, its assertions could be triggered too. The PostgreSQL Project thanks Hcamael… in 16.15
  • security Fix multirange type handling in pg_restore_attribute_stats() (OpenAI Security Research Team) pg_restore_attribute_stats() treated multirange types just like their underlying range type. This works correctly for the bounds histogram, but it was wrong for all the other statistics kinds. The… in 16.15
  • security Make scalarineqsel() check that a constant it expects to be of type tid actually is (Tom Lane) This expectation will hold for all the built-in operators that use this estimator, but a maliciously-constructed operator could violate it, leading to a crash or server memory disclosure. The PostgreSQL… in 16.15
  • security Harden tsvector and tsquery code against overly long values (both individual lexemes and total vector/query length) (Tom Lane) The documented limits were not enforced in all code paths. The PostgreSQL Project thanks Yuhang Wu, Zhenpeng Lin, Zheng Yu, and Hcamael for reporting these problems.… in 16.15
  • security Fix various places that mistakenly assumed they would not have to deal with more than FUNC_MAX_ARGS function arguments (Tom Lane) Notably, the server's actual limit on the number of arguments to an aggregate function is FUNC_MAX_ARGS - 1, but the parser failed to enforce that, creating hazards… in 16.15
  • security Reject calls from SQL to functions that take or return type internal (Tom Lane) The existing defenses against doing this have been shown to be insufficient, so add more explicit checks. The PostgreSQL Project thanks Amy Burnett (OpenAI Codex Security) for reporting this problem. (CVE-2026-14680) in 16.15
  • security Preserve the ownership of extended statistics objects when they are rebuilt by ALTER TABLE (Masahiko Sawada) Previously, the role running ALTER TABLE gained ownership of such objects, but that seems inappropriate. The PostgreSQL Project thanks Noah Misch for reporting this problem. (CVE-2026-6469) in 16.15
  • security When deparsing an EXTRACT() function call, quote the field name if needed (Nathan Bossart) The parser accepts any string literal as a field name in EXTRACT(), deferring validation to execution. If the call is stored and deparsed (for example during pg_dump), the string body was regurgitated… in 16.15
  • security Check for USAGE privilege on data types in places that formerly failed to check that (Nathan Bossart) CREATE TYPE AS RANGE did not check, nor did ALTER TABLE OF, nor did commands that create stored expressions. These omissions allowed roles without USAGE privilege to nonetheless create objects… in 16.15
  • security Invalidate role-dependent cached plans after role changes (Ilya Staroverov, Shinya Kato, Nathan Bossart) Role membership, role attribute, and database ownership changes may impact the expected behavior of row-level security policies, but previously we'd continue to use cached plans that were made… in 16.15
  • security Reject GSSEncRequest after direct SSL connection (Michael Paquier) After establishing a TLS-encrypted connection, the server would still accept a request for GSSAPI encryption. If that succeeded, the connection would proceed using TLS encryption, but it would look like a GSS connection to the… in 16.15
  • security Make mock SCRAM authentication secrets more plausible (Nathan Bossart) If a SCRAM login is attempted against a role that doesn't exist or doesn't have a SCRAM secret, we generate a mock secret and carry out the authentication handshake anyway, to avoid revealing these facts to an attacker. But the… in 16.15
  • security Fix out-of-bounds writes in ecpg applications caused by invalid bytea data received from the server (Michael Paquier) ecpg assumed without checking that any bytea value must begin with \x. A broken or malicious server might send a string shorter than 2 bytes, resulting in memory clobber in the… in 16.15
  • security Do not do backquote expansion on the argument of psql's \unrestrict command (Nathan Bossart) This oversight in the fix for CVE-2025-8714 allows a malicious server to inject shell commands into plain-text dump output that will be run at restore time on the machine running psql, the exact scenario… in 16.15
  • security Remove pg_dump's assumption that pg_proc.protrftypes cannot have more than FUNC_MAX_ARGS entries (Tom Lane) Since there could be entries for both input and output arguments, it's feasible for this array's length to exceed FUNC_MAX_ARGS (which constrains only input arguments). Even if that were not… in 16.15
  • security Harden PL/Perl against “tied” Perl arrays and hashes (Tom Lane) A tied object that doesn't behave like a regular one could lead to memory overwrite, or to constructing a corrupt result array (which would likely cause problems later). The PostgreSQL Project thanks Hcamael for reporting this… in 16.15
  • security Fix integer overflows in memory-allocation calculations in PL/Perl and PL/Tcl (Heikki Linnakangas) This is the same type of problem as CVE-2026-6473, just in a different part of the code, and is fixed in the same way. The PostgreSQL Project thanks the Tulya Project (Team Dhiutsa, Bitecope… in 16.15
  • security Ensure that contrib/amcheck functions restrict search_path before executing index expressions (Noah Misch) Because amcheck will run such index expressions as the owner of their tables, a caller could potentially hijack search_path-dependent functions to run arbitrary code as the table owner. By… in 16.15
  • security Fix integer overflows in contrib/fuzzystrmatch's levenshtein() and levenshtein_less_equal() functions (Nathan Bossart) Passing large cost values to these functions could cause integer overflows, thereby producing nonsensical results, and even causing out-of-bounds writes in some cases. The… in 16.15
  • security Fix buffer overrun in contrib/pg_stat_statements (Álvaro Herrera) Query normalization didn't accurately account for the amount of space the normalized string would require. The PostgreSQL Project thanks Sajeeb Lohani (with TrendAI Zero Day Initiative) and Yuelin Wang for reporting this problem.… in 16.15
  • security Fix datatype error in contrib/pg_trgm's GiST picksplit function (Heikki Linnakangas) This mistake resulted in reading past the end of the buffer, typically causing bad split decisions; but a crash could ensue if you're very unlucky. The PostgreSQL Project thanks Mehmet D. Ince for reporting this… in 16.15
  • security Remove the plan cache in contrib/refint (Ayush Tiwari) This caching behavior has several serious bugs, notably that check_foreign_key() embeds the new key values in its cascade-UPDATE queries, so a cached plan reuses the originally-needed values rather than the key values that should be used. The… in 16.15
  • security Clean up quoting of string parameters within constructed replication commands (Tom Lane) Various places that generate replication commands were not being adequately careful about quoting replication slot names and other parameters that need to be inserted into those commands. This could result in… in 16.15
  • security Avoid NULL-pointer dereference in contrib/refint's check_foreign_key() (Ayush Tiwari) In the on-update-cascade case, a null value of a referenced column led to a crash. This is an oversight in the fix for CVE-2026-6637, but the code that was there before that wasn't really right either. in 16.15
  • security Prevent unbounded recursion while processing startup packets (Michael Paquier) A malicious client could crash the connected backend by alternating rejected SSL and GSS encryption requests indefinitely. The PostgreSQL Project thanks Calif.io (in collaboration with Claude and Anthropic Research) for… in 16.14
  • security Fix assorted integer overflows in memory-allocation calculations (Tom Lane, Nathan Bossart, Heikki Linnakangas) Various places were incautious about the possibility of integer overflow in calculations of how much memory to allocate. Overflow would lead to allocating a too-small buffer which the… in 16.14
  • security Properly quote object names in logical replication origin checks (Pavel Kohout) ALTER SUBSCRIPTION ... REFRESH PUBLICATION interpolated schema and relation names into SQL commands without quoting them, allowing execution of arbitrary SQL on the publisher. The PostgreSQL Project thanks Pavel Kohout… in 16.14
  • security Reject over-length options in ts_headline() (Michael Paquier) The StartSel, StopSel and FragmentDelimiter strings must not exceed 32Kb in length, but this was not checked for. An over-length value would typically crash the server. The PostgreSQL Project thanks Xint Code for reporting this problem.… in 16.14
  • security Guard against malicious time zone names in timeofday() and pg_strftime() (Tom Lane) A crafted time zone setting could pass % sequences to snprintf(), potentially causing crashes or disclosure of server memory. Another path to similar results was to overflow the limited-size output buffer used by… in 16.14
  • security When creating a multirange type, ensure the user has CREATE privilege on the schema specified for the multirange type (Jelte Fennema-Nio) The multirange type can be put into a different schema than its parent range type, but we neglected to apply the required privilege check when doing so. The… in 16.14
  • security Use timing-safe string comparisons in authentication code (Michael Paquier) Use timingsafe_bcmp() instead of memcmp() or strcmp() when checking passwords, hashes, etc. It is not known whether the data dependency of those functions is usefully exploitable in any of these places, but in the… in 16.14
  • security Mark PQfn() as unsafe, and avoid using it within libpq (Nathan Bossart) For a non-integral result type, PQfn() is not passed the size of the output buffer, so it cannot check that the data returned by the server will fit. A malicious server could therefore overwrite client memory. This is… in 16.14
  • security Prevent path traversal in pg_basebackup and pg_rewind (Michael Paquier) These applications failed to validate output file paths read from their input, so that a malicious source could overwrite any file writable by these applications. Constrain where data can be written by rejecting paths that are… in 16.14
  • security Guard against field overflow within contrib/intarray's query_int type and contrib/ltree's ltxtquery type (Tom Lane) Parsing of these query structures did not check for overflow of 16-bit fields, so that construction of an invalid query tree was possible. This can crash the server when executing… in 16.14
  • security Guard against overly long values of contrib/ltree's lquery type (Michael Paquier) Values with more than 64K items caused internal overflows, potentially resulting in stack smashes or wrong answers. The PostgreSQL Project thanks Vergissmeinnicht, A1ex, and Jihe Wang for reporting this problem.… in 16.14
  • security Prevent SQL injection and buffer overruns in contrib/spi (Nathan Bossart) check_foreign_key() was insufficiently careful about quoting key values, and also used fixed-length buffers for constructing queries. While this module is only meant as example code, it still shouldn't contain such dangerous… in 16.14
  • security Prevent buffer overruns when parsing an affix file for an Ispell dictionary (Tom Lane) A corrupt or malicious affix file could crash the server. This is not considered a security issue because text search configuration files are presumed trustworthy, but it still seems worth fixing. in 16.14
  • security Ensure that tuplestore data structures are internally consistent even after an error (Tom Lane) The code was previously careless about this, which is fine most of the time but is problematic for the tuplestore backing a WITH HOLD cursor. In v15 and before this leads to easily-reproducible crashes;… in 16.14
  • security Avoid incorrect complaint of invalid encoding when substring() is applied to “toasted” data (Noah Misch) The fix for CVE-2026-2006 was too aggressive and could raise an error about an incomplete character in cases that are actually valid. in 16.13
  • security Guard against unexpected dimensions of oidvector/int2vector (Tom Lane) These data types are expected to be 1-dimensional arrays containing no nulls, but there are cast pathways that permit violating those expectations. Add checks to some functions that were depending on those expectations without… in 16.12
  • security Harden selectivity estimators against being attached to operators that accept unexpected data types (Tom Lane) contrib/intarray contained a selectivity estimation function that could be abused for arbitrary code execution, because it did not check that its input was of the expected data type.… in 16.12
  • security Fix buffer overrun in contrib/pgcrypto's PGP decryption functions (Michael Paquier) Decrypting a crafted message with an overlength session key caused a buffer overrun, with consequences as bad as arbitrary code execution. The PostgreSQL Project thanks Team Xint Code, as part of zeroday.cloud, for… in 16.12
  • security Fix inadequate validation of multibyte character lengths (Thomas Munro, Noah Misch) Assorted bugs allowed an attacker able to issue crafted SQL to overrun string buffers, with consequences as bad as arbitrary code execution. After these fixes, applications may observe “invalid byte sequence for… in 16.12
  • security Check for CREATE privileges on the schema in CREATE STATISTICS (Jelte Fennema-Nio) This omission allowed table owners to create statistics in any schema, potentially leading to unexpected naming conflicts. The PostgreSQL Project thanks Jelte Fennema-Nio for reporting this problem. (CVE-2025-12817) in 16.11
  • security Avoid integer overflow in allocation-size calculations within libpq (Jacob Champion) Several places in libpq were not sufficiently careful about computing the required size of a memory allocation. Sufficiently large inputs could cause integer overflow, resulting in an undersized buffer, which… in 16.11
  • security In pg_dump, dump security labels on subscriptions and event triggers (Jian He, Fujii Masao) Labels on these types of objects were previously missed. in 16.11
  • security In pg_restore, skip comments and security labels for publications and subscriptions that are not being restored (Jian He, Fujii Masao) Do not emit COMMENT or SECURITY LABEL commands for these objects when --no-publications or --no-subscriptions is specified. in 16.11
  • security Tighten security checks in planner estimation functions (Dean Rasheed) The fix for CVE-2017-7484, plus followup fixes, intended to prevent leaky functions from being applied to statistics data for columns that the calling user does not have permission to read. Two gaps in that protection have been… in 16.10
  • security Prevent pg_dump scripts from being used to attack the user running the restore (Nathan Bossart) Since dump/restore operations typically involve running SQL commands as superuser, the target database installation must trust the source server. However, it does not follow that the operating system… in 16.10
  • security Convert newlines to spaces in names included in comments in pg_dump output (Noah Misch) Object names containing newlines offered the ability to inject arbitrary SQL commands into the output script. (Without the preceding fix, injection of psql meta-commands would also be possible this way.)… in 16.10
  • security Avoid one-byte buffer overread when examining invalidly-encoded strings that are claimed to be in GB18030 encoding (Noah Misch, Andres Freund) While unlikely, a SIGSEGV crash could occur if an incomplete multibyte character appeared at the end of memory. This was possible both in the server and in… in 16.9
  • security Improve behavior of libpq's quoting functions (Andres Freund, Tom Lane) The changes made for CVE-2025-1094 had one serious oversight: PQescapeLiteral() and PQescapeIdentifier() failed to honor their string length parameter, instead always reading to the input string's trailing null. This resulted… in 16.8
  • security Harden PQescapeString and allied functions against invalidly-encoded input strings (Andres Freund, Noah Misch) Data-quoting functions supplied by libpq now fully check the encoding validity of their input. If invalid characters are detected, they report an error if possible. For the ones that lack… in 16.7
  • security Fix cases where an operator family member operator or support procedure could become a dangling reference (Tom Lane) In some cases a data type could be dropped while references to its OID still remain in pg_amop or pg_amproc. While that caused no immediate issues, an attempt to drop the owning… in 16.7
  • security Use SQL-standard function bodies in the declarations of contrib/earthdistance's SQL-language functions (Tom Lane, Ronan Dunklau) This change allows their references to contrib/cube to be resolved during extension creation, reducing the risk of search-path-based failures and possible attacks. In… in 16.7
  • security Restore functionality of ALTER {ROLE|DATABASE} SET role (Tom Lane, Noah Misch) The fix for CVE-2024-10978 accidentally caused settings for role to not be applied if they come from non-interactive sources, including previous ALTER {ROLE|DATABASE} commands and the PGOPTIONS environment variable. in 16.6

Deprecations

  • deprecated Avoid deprecation warnings when building with libxml2 2.14 and later (Michael Paquier) in 16.10

Every release in between

securityRestrict logical decoding output plugins to the set specified by a new server parameter output_plugin_libraries (Jacob Champion) Previously, a replication user could select any loadable library for logical decoding, allowing exploits of various sorts. To allow locking this down without breaking…
securityFix contrib/pgcrypto's PGP encryption to detect unsupported ciphers (Daniel Gustafsson) Previously, if OpenSSL rejected the requested cipher (for example, because it is running in FIPS mode, or the legacy provider hasn't been loaded), pgcrypto failed to notice the failure and simply XOR'd the…
securityFix psql to skip in-line data following a scripted COPY ... FROM STDIN command, even if the COPY fails before sending PGRES_COPY_IN (Tom Lane) Previously, if a COPY command failed at startup (for instance, because the target table doesn't exist) psql would not realize that and would proceed to…
securityCross-check the output row type of a portal running EXECUTE or FETCH (Robert Haas) EXECUTE and FETCH use two portals: an outer one for the statement itself, and an inner one running the query being executed on its behalf. It was previously possible to make the declared row types of the two portals…
securityFix buffer overrun with long time zone abbreviation in to_char() (Tom Lane) This can easily crash the server, and exploits leading to arbitrary code execution have been reported. The PostgreSQL Project thanks Hcamael, Amjad Shahzad, Tan Zhen of AntAISecurityLab, Tomer Fichman, Zheng Yu, Amy…
securityFix buffer overrun in regexp match/split functions (Masahiko Sawada) If passed invalidly-encoded data, these functions could write past the end of their conversion buffer. The PostgreSQL Project thanks Francesco Verardi for reporting this problem. (CVE-2026-14664)
securityHarden the ascii() function against invalid input (Michael Paquier) By supplying invalidly-encoded input, this function could be coaxed to read and return a few bytes of data that it shouldn't. In assert-enabled builds, its assertions could be triggered too. The PostgreSQL Project thanks Hcamael…
securityFix multirange type handling in pg_restore_attribute_stats() (OpenAI Security Research Team) pg_restore_attribute_stats() treated multirange types just like their underlying range type. This works correctly for the bounds histogram, but it was wrong for all the other statistics kinds. The…
securityMake scalarineqsel() check that a constant it expects to be of type tid actually is (Tom Lane) This expectation will hold for all the built-in operators that use this estimator, but a maliciously-constructed operator could violate it, leading to a crash or server memory disclosure. The PostgreSQL…
securityHarden tsvector and tsquery code against overly long values (both individual lexemes and total vector/query length) (Tom Lane) The documented limits were not enforced in all code paths. The PostgreSQL Project thanks Yuhang Wu, Zhenpeng Lin, Zheng Yu, and Hcamael for reporting these problems.…
securityFix various places that mistakenly assumed they would not have to deal with more than FUNC_MAX_ARGS function arguments (Tom Lane) Notably, the server's actual limit on the number of arguments to an aggregate function is FUNC_MAX_ARGS - 1, but the parser failed to enforce that, creating hazards…
securityReject calls from SQL to functions that take or return type internal (Tom Lane) The existing defenses against doing this have been shown to be insufficient, so add more explicit checks. The PostgreSQL Project thanks Amy Burnett (OpenAI Codex Security) for reporting this problem. (CVE-2026-14680)
securityPreserve the ownership of extended statistics objects when they are rebuilt by ALTER TABLE (Masahiko Sawada) Previously, the role running ALTER TABLE gained ownership of such objects, but that seems inappropriate. The PostgreSQL Project thanks Noah Misch for reporting this problem. (CVE-2026-6469)
securityWhen deparsing an EXTRACT() function call, quote the field name if needed (Nathan Bossart) The parser accepts any string literal as a field name in EXTRACT(), deferring validation to execution. If the call is stored and deparsed (for example during pg_dump), the string body was regurgitated…
securityCheck for USAGE privilege on data types in places that formerly failed to check that (Nathan Bossart) CREATE TYPE AS RANGE did not check, nor did ALTER TABLE OF, nor did commands that create stored expressions. These omissions allowed roles without USAGE privilege to nonetheless create objects…
securityInvalidate role-dependent cached plans after role changes (Ilya Staroverov, Shinya Kato, Nathan Bossart) Role membership, role attribute, and database ownership changes may impact the expected behavior of row-level security policies, but previously we'd continue to use cached plans that were made…
securityReject GSSEncRequest after direct SSL connection (Michael Paquier) After establishing a TLS-encrypted connection, the server would still accept a request for GSSAPI encryption. If that succeeded, the connection would proceed using TLS encryption, but it would look like a GSS connection to the…
securityMake mock SCRAM authentication secrets more plausible (Nathan Bossart) If a SCRAM login is attempted against a role that doesn't exist or doesn't have a SCRAM secret, we generate a mock secret and carry out the authentication handshake anyway, to avoid revealing these facts to an attacker. But the…
securityFix out-of-bounds writes in ecpg applications caused by invalid bytea data received from the server (Michael Paquier) ecpg assumed without checking that any bytea value must begin with \x. A broken or malicious server might send a string shorter than 2 bytes, resulting in memory clobber in the…
securityDo not do backquote expansion on the argument of psql's \unrestrict command (Nathan Bossart) This oversight in the fix for CVE-2025-8714 allows a malicious server to inject shell commands into plain-text dump output that will be run at restore time on the machine running psql, the exact scenario…
securityRemove pg_dump's assumption that pg_proc.protrftypes cannot have more than FUNC_MAX_ARGS entries (Tom Lane) Since there could be entries for both input and output arguments, it's feasible for this array's length to exceed FUNC_MAX_ARGS (which constrains only input arguments). Even if that were not…
securityHarden PL/Perl against “tied” Perl arrays and hashes (Tom Lane) A tied object that doesn't behave like a regular one could lead to memory overwrite, or to constructing a corrupt result array (which would likely cause problems later). The PostgreSQL Project thanks Hcamael for reporting this…
securityFix integer overflows in memory-allocation calculations in PL/Perl and PL/Tcl (Heikki Linnakangas) This is the same type of problem as CVE-2026-6473, just in a different part of the code, and is fixed in the same way. The PostgreSQL Project thanks the Tulya Project (Team Dhiutsa, Bitecope…
securityEnsure that contrib/amcheck functions restrict search_path before executing index expressions (Noah Misch) Because amcheck will run such index expressions as the owner of their tables, a caller could potentially hijack search_path-dependent functions to run arbitrary code as the table owner. By…
securityFix integer overflows in contrib/fuzzystrmatch's levenshtein() and levenshtein_less_equal() functions (Nathan Bossart) Passing large cost values to these functions could cause integer overflows, thereby producing nonsensical results, and even causing out-of-bounds writes in some cases. The…
securityFix buffer overrun in contrib/pg_stat_statements (Álvaro Herrera) Query normalization didn't accurately account for the amount of space the normalized string would require. The PostgreSQL Project thanks Sajeeb Lohani (with TrendAI Zero Day Initiative) and Yuelin Wang for reporting this problem.…
securityFix datatype error in contrib/pg_trgm's GiST picksplit function (Heikki Linnakangas) This mistake resulted in reading past the end of the buffer, typically causing bad split decisions; but a crash could ensue if you're very unlucky. The PostgreSQL Project thanks Mehmet D. Ince for reporting this…
securityRemove the plan cache in contrib/refint (Ayush Tiwari) This caching behavior has several serious bugs, notably that check_foreign_key() embeds the new key values in its cascade-UPDATE queries, so a cached plan reuses the originally-needed values rather than the key values that should be used. The…
fixFix self-deadlock when replaying WAL generated by an older minor version (Andrey Borodin) This error was introduced in the previous set of minor releases. It caused standby servers that were following a primary of an older minor release version to get stuck in some scenarios.
fixFix mis-handling of asynchronous reads when rescanning an asynchronous Append plan node (Alexander Korotkov, Gleb Kashkin, Etsuro Fujita) When an upper plan node rescans an Append before having read the entire Append output, we need to discard any in-flight requests sent to external servers (by…
fixFix error in partition pruning for RANGE-partitioned tables (David Rowley) In some cases the DEFAULT partition would be skipped when it should not be, which could lead to rows missing from query results.
fixFix planner's nullability and strictness checks for value IN (array) expressions (Ayush Tiwari) These checks should only succeed if the array operand is known to be non-empty, but that consideration was missed, allowing optimizations to be applied that should not be. This could result in wrong…
featureAdd missed checks for hashability of equality comparisons on container datatypes (arrays, composites, ranges) (Andrei Lepikhov, Tom Lane) The planner must verify hashability of the container's component type(s) before deciding it can use a hash-based plan type. This step was missed in some places,…
featureHonor query cancel and vacuum delay during GIN index posting-tree cleanup (Paul Kim, Alexander Korotkov) The posting tree for a common value can be large, so that this missed check could allow vacuum to run for a long time before noticing an interrupt.
featureEnsure that the new last block of a bulk-extended table is added to its free space map promptly (Jingtang Zhang) An off-by-one error caused the last block of a multi-block table extension to not be marked as free in the map. This would eventually get corrected by vacuum, but meanwhile the space…
securityClean up quoting of string parameters within constructed replication commands (Tom Lane) Various places that generate replication commands were not being adequately careful about quoting replication slot names and other parameters that need to be inserted into those commands. This could result in…
featureAllow libpq to accept ParameterDescription messages exceeding 30000 bytes (Ning Sun) Previously, this message type was not among those that libpq's validity heuristics believed could be long. The limit resulted in failure for prepared queries having more than 7498 parameters, which is unlikely but…
featureReject multiple descriptor header items in ecpg's GET/SET DESCRIPTOR statements (Masashi Kamura) Previously the grammar allowed this syntax, but broken C code was generated. Adjust the grammar and the documentation to allow only one header item.
securityAvoid NULL-pointer dereference in contrib/refint's check_foreign_key() (Ayush Tiwari) In the on-update-cascade case, a null value of a referenced column led to a crash. This is an oversight in the fix for CVE-2026-6637, but the code that was there before that wasn't really right either.
featureUpdate time zone data files to tzdata release 2026c (Tom Lane) Alberta (America/Edmonton) will be on year-round UTC-06 (effectively, permanent DST) beginning in November 2026. This release assumes that their TZ abbreviation will be CST from that time forward. That seems likely to change, but it's…
+58 more items in the release notes
securityPrevent unbounded recursion while processing startup packets (Michael Paquier) A malicious client could crash the connected backend by alternating rejected SSL and GSS encryption requests indefinitely. The PostgreSQL Project thanks Calif.io (in collaboration with Claude and Anthropic Research) for…
securityFix assorted integer overflows in memory-allocation calculations (Tom Lane, Nathan Bossart, Heikki Linnakangas) Various places were incautious about the possibility of integer overflow in calculations of how much memory to allocate. Overflow would lead to allocating a too-small buffer which the…
securityProperly quote object names in logical replication origin checks (Pavel Kohout) ALTER SUBSCRIPTION ... REFRESH PUBLICATION interpolated schema and relation names into SQL commands without quoting them, allowing execution of arbitrary SQL on the publisher. The PostgreSQL Project thanks Pavel Kohout…
securityReject over-length options in ts_headline() (Michael Paquier) The StartSel, StopSel and FragmentDelimiter strings must not exceed 32Kb in length, but this was not checked for. An over-length value would typically crash the server. The PostgreSQL Project thanks Xint Code for reporting this problem.…
securityGuard against malicious time zone names in timeofday() and pg_strftime() (Tom Lane) A crafted time zone setting could pass % sequences to snprintf(), potentially causing crashes or disclosure of server memory. Another path to similar results was to overflow the limited-size output buffer used by…
securityWhen creating a multirange type, ensure the user has CREATE privilege on the schema specified for the multirange type (Jelte Fennema-Nio) The multirange type can be put into a different schema than its parent range type, but we neglected to apply the required privilege check when doing so. The…
securityUse timing-safe string comparisons in authentication code (Michael Paquier) Use timingsafe_bcmp() instead of memcmp() or strcmp() when checking passwords, hashes, etc. It is not known whether the data dependency of those functions is usefully exploitable in any of these places, but in the…
securityMark PQfn() as unsafe, and avoid using it within libpq (Nathan Bossart) For a non-integral result type, PQfn() is not passed the size of the output buffer, so it cannot check that the data returned by the server will fit. A malicious server could therefore overwrite client memory. This is…
securityPrevent path traversal in pg_basebackup and pg_rewind (Michael Paquier) These applications failed to validate output file paths read from their input, so that a malicious source could overwrite any file writable by these applications. Constrain where data can be written by rejecting paths that are…
securityGuard against field overflow within contrib/intarray's query_int type and contrib/ltree's ltxtquery type (Tom Lane) Parsing of these query structures did not check for overflow of 16-bit fields, so that construction of an invalid query tree was possible. This can crash the server when executing…
securityGuard against overly long values of contrib/ltree's lquery type (Michael Paquier) Values with more than 64K items caused internal overflows, potentially resulting in stack smashes or wrong answers. The PostgreSQL Project thanks Vergissmeinnicht, A1ex, and Jihe Wang for reporting this problem.…
securityPrevent SQL injection and buffer overruns in contrib/spi (Nathan Bossart) check_foreign_key() was insufficiently careful about quoting key values, and also used fixed-length buffers for constructing queries. While this module is only meant as example code, it still shouldn't contain such dangerous…
otherCheck for nondeterministic collations before assuming that an equality condition on a collatable type implies uniqueness (Richard Guo) Numerous planner optimizations assume that, for example, at most one table row can satisfy WHERE x = 'abc' if there is a unique index on x. However this conclusion…
breakingFix incomplete removal of relation references in RestrictInfo structs during join removal (Tom Lane) This oversight has been shown to result in planner failures such as unexpected “FULL JOIN is only supported with merge-joinable or hash-joinable join conditions” errors. It may also have caused…
fixFix incorrect handling of NEW generated columns in rule actions and rule qualifications (Richard Guo, Dean Rasheed) Previously, such column references would produce NULL in INSERT cases, or be equivalent to the OLD value in UPDATE cases.
fixFix spurious “generated columns are not supported in COPY FROM WHERE conditions” errors (Tom Lane) Use of a system column in a COPY FROM WHERE condition could sometimes incorrectly report this error.
otherCorrectly report a serialization failure when MERGE encounters a concurrently-updated tuple in repeatable-read or serializable mode (Tender Wang) Previously, such cases behaved the same as in lower isolation levels.
fixFix CREATE TABLE ... LIKE ... INCLUDING STATISTICS for cases where the source table has dropped column(s) (Julien Tachoires) In such cases, extended statistics objects could be copied incorrectly, or the command could give an incorrect error.
featureAllow ALTER INDEX ... ATTACH PARTITION to mark the parent index valid if appropriate (Sami Imseih) There are edge cases in which a partitioned index might remain marked as invalid even when all its leaf indexes are valid. This change provides a mechanism whereby a user can correct such a situation…
fixFix ALTER FOREIGN DATA WRAPPER to not drop the wrapper object's dependency on its handler function (Jeff Davis)
otherDisallow making a composite type be a member of itself via a multirange (Heikki Linnakangas) We already forbade such cases when the intermediate type is a domain, array, composite type, or range; but multiranges were overlooked.
fixFix datum-image comparisons to be insensitive to sign-extension variations (David Rowley) This fixes some situations that previously led to “could not find memoization table entry” errors or wrong query results.
fixFix incorrect logic for hashed IN/NOT IN with non-strict equality operator (Chengpeng Yan) The previous coding could crash or give wrong answers. All built-in data types have strict equality operators, so that this issue could only arise with an extension data type.
otherTruncate overly-long locale-specific numeric symbols in to_char() (Tom Lane) If a locale specified a currency symbol, thousands separator, or decimal or sign symbol more than 8 bytes long, a buffer overrun was possible. No such locales exist in the real world, and it's impractical for an…
securityPrevent buffer overruns when parsing an affix file for an Ispell dictionary (Tom Lane) A corrupt or malicious affix file could crash the server. This is not considered a security issue because text search configuration files are presumed trustworthy, but it still seems worth fixing.
fixFix array_agg_array_combine() to combine the arrays' null bitmaps correctly (Dmytro Astapov) This mistake resulted in sometimes-incorrect output from parallelized array_agg(anyarray) calculations.
fixFix incorrect behavior of pg_stat_reset_single_table_counters() on a shared catalog (Chao Li) Such cases had a side-effect of resetting the current database's stat_reset_timestamp, which was unintended.
fixFix buffer overread when pglz_decompress() receives corrupt input (Andrew Dunstan) It was possible to read a few bytes past the end of the input, which in very unlucky cases might cause a crash.
securityEnsure that tuplestore data structures are internally consistent even after an error (Tom Lane) The code was previously careless about this, which is fine most of the time but is problematic for the tuplestore backing a WITH HOLD cursor. In v15 and before this leads to easily-reproducible crashes;…
fixFix premature NULL lag reporting in pg_stat_replication (Shinya Kato) The lag columns frequently read as NULL even while replication activity was happening.
fixFix underestimate of required size of DSA page maps for odd-size segments (Paul Bunn) This miscalculation led to out-of-bounds accesses and hence server crashes.
fixFix possible server crash when processing extended statistics on expressions of extension data types (Michael Paquier) NULL pointer dereferences were possible if the data type's typanalyze function does not compute any useful statistics. No in-core typanalyze function behaves that way, but…
fixFix minor memory leaks in ICU-based string processing (Jeff Davis)
fixFix race condition between WAL replay of checkpoints and multixact ID creations (Heikki Linnakangas) A standby server following WAL from a primary of an older minor version could get into a crash-and-restart loop complaining about “could not access status of transaction”.
fixFix crashes in some ecpg functions when called without any established connection (Shruthi Gowda)
fixFix assorted bugs in backup decompression and tar-parsing code (Andrew Dunstan, Tom Lane, Chao Li) The decompression and tar-file reading code used in pg_basebackup and pg_verifybackup mishandled tar-file padding data, could corrupt LZ4-compressed data in edge cases, failed to check for some…
featureIn contrib/basic_archive, allow the archive directory to be missing at startup (Nathan Bossart) Previously, the setting of basic_archive.archive_directory was rejected if it didn't point to an existing directory. This is undesirable because archiving will be stuck indefinitely, even if the…
fixFix contrib/ltree to cope when case-folding changes a string's byte length (Jeff Davis) Previously, lquery patterns specifying case-insensitive matching might fail to match labels they should match.
fixIn contrib/postgres_fdw, avoid crash due to premature cleanup of a failed connection (Etsuro Fujita) If a remote connection fails abort cleanup, we can't use it any longer. But delay closing the connection object until end of transaction, because there might still be references to it within data…
featureUpdate time zone data files to tzdata release 2026b (Tom Lane) British Columbia (America/Vancouver) will be on year-round UTC-07 (effectively, permanent DST) beginning in November 2026. This release assumes that their TZ abbreviation will be MST from that time forward. That seems likely to change,…
+10 more items in the release notes
fixFix failure after replaying a multixid truncation record from WAL that was generated by an older minor version (Heikki Linnakangas) Erroneous logic for coping with the way that previous versions handled multixid wraparound led to replay failure, with messages like “could not access status of…
securityAvoid incorrect complaint of invalid encoding when substring() is applied to “toasted” data (Noah Misch) The fix for CVE-2026-2006 was too aggressive and could raise an error about an incomplete character in cases that are actually valid.
fixFix computation of the set of potentially-nulling outer joins for the output of a LATERAL UNION ALL subquery (Richard Guo) This error could lead to skipping NOT NULL tests in the mistaken belief that they were unnecessary, resulting in wrong query output.
fixFix pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() to report values for auxiliary processes (Heikki Linnakangas) Previously these functions returned NULL for auxiliary processes, but that's inconsistent with the pg_stat_activity view.
fixFix casting a composite-type variable to a domain type when returning its value from a PL/pgSQL function (Tom Lane) If the variable's value is NULL, a “cache lookup failed for type 0” error resulted.
fixFix potential null pointer dereference in contrib/hstore's binary input function (Michael Paquier) hstore's receive function crashed on input containing duplicate keys. hstore values generated by Postgres would never contain duplicate keys, so this mistake has gone unnoticed. The crash could be…
securityGuard against unexpected dimensions of oidvector/int2vector (Tom Lane) These data types are expected to be 1-dimensional arrays containing no nulls, but there are cast pathways that permit violating those expectations. Add checks to some functions that were depending on those expectations without…
securityHarden selectivity estimators against being attached to operators that accept unexpected data types (Tom Lane) contrib/intarray contained a selectivity estimation function that could be abused for arbitrary code execution, because it did not check that its input was of the expected data type.…
securityFix buffer overrun in contrib/pgcrypto's PGP decryption functions (Michael Paquier) Decrypting a crafted message with an overlength session key caused a buffer overrun, with consequences as bad as arbitrary code execution. The PostgreSQL Project thanks Team Xint Code, as part of zeroday.cloud, for…
securityFix inadequate validation of multibyte character lengths (Thomas Munro, Noah Misch) Assorted bugs allowed an attacker able to issue crafted SQL to overrun string buffers, with consequences as bad as arbitrary code execution. After these fixes, applications may observe “invalid byte sequence for…
featureDon't allow CTE references in sub-selects to determine semantic levels of aggregate functions (Tom Lane) This change undoes a change made two minor releases ago, instead throwing an error if a sub-select references a CTE that's below the semantic level that standard SQL rules would assign to the…
fixFix trigger transition table capture for MERGE in CTE queries (Dean Rasheed) When executing a data-modifying CTE query containing both a MERGE and another DML operation on a table with statement-level AFTER triggers, the transition tables passed to the triggers would not include the rows affected…
fixFix failure when all children of a partitioned target table of an update or delete have been pruned (Amit Langote) In such cases, the executor could report “could not find junk ctid column” errors, even though nothing needs to be done.
otherAvoid possible planner failure when a query contains duplicate window function calls (Meng Zhang, David Rowley) Confusion over de-duplication of such calls could result in errors like “WindowFunc with winref 2 assigned to WindowAgg with winref 1”.
featureAllow indexscans on partial hash indexes even when the index's predicate implies the truth of the WHERE clause (Tom Lane) Normally we drop a WHERE clause that is implied by the predicate, since it's pointless to test it; it must hold for every index entry. However that can prevent creation of an…
fixDo not emit WAL for unlogged BRIN indexes (Kirill Reshke) One seldom-taken code path incorrectly emitted a WAL record relating to a BRIN index even if the index was marked unlogged. Crash recovery would then fail to replay that record, complaining that the file already exists.
otherPrevent truncation of CLOG that is still needed by unread NOTIFY messages (Joel Jacobson, Heikki Linnakangas) This fix prevents “could not access status of transaction” errors when a backend is slow to absorb NOTIFY messages.
featureEscalate errors occurring during NOTIFY message processing to FATAL, i.e. close the connection (Heikki Linnakangas) Formerly, if a backend got an error while absorbing a NOTIFY message, it would advance past that message, report the error to the client, and move on. That behavior was fraught with…
fixFix bug in following update chain when locking a tuple (Jasper Smit) This code path neglected to check the xmin of the first new tuple in the update chain, making it possible to lock an unrelated tuple if the original updater aborted and the space was immediately reclaimed by VACUUM and then…
fixFix issues around in-place catalog updates (Noah Misch) Send a nontransactional invalidation message for an in-place update, since such an update will survive transaction rollback. Also ensure that the update is WAL-logged before other sessions can see it. These fixes primarily prevent scenarios…
fixFix potential backend process crash at process exit due to trying to release a lock in an already-unmapped shared memory segment (Rahila Syed)
fixGuard against incorrect truncation of the multixact log after a crash (Heikki Linnakangas)
fixFix possibly mis-encoded result of pg_stat_get_backend_activity() (Chao Li) The shared-memory buffer holding a session's activity string can end with an incomplete multibyte character. Readers are supposed to truncate off any such incomplete character, but this function failed to do so.
otherGuard against recursive memory context logging (Fujii Masao) A constant flow of signals requesting memory context logging could cause recursive execution of the logging code, which in theory could lead to stack overflow.
fixFix memory context usage when reinitializing a parallel execution context (Jakub Wartak, Jeevan Chalke) This error could result in a crash due to a subsidiary data structure having a shorter lifespan than the parallel context. The problem is not known to be reachable using only core PostgreSQL,…
featureSet next multixid's offset when creating a new multixid, to remove the wait loop that was needed in corner cases (Andrey Borodin) The previous logic could get stuck waiting for an update that would never occur.
otherAvoid rewriting data-modifying CTEs more than once (Bernice Southey, Dean Rasheed) Formerly, when updating an auto-updatable view or a relation with rules, if the original query had any data-modifying CTEs, the rewriter would rewrite those CTEs multiple times due to recursion. This was inefficient…
fixFail recovery if WAL does not exist back to the redo point indicated by the checkpoint record (Nitin Jadhav) Add an explicit check for this before starting recovery, so that no harm is done and a useful error message is provided. Previously, recovery might crash or corrupt the database in this…
otherAvoid scribbling on the source query tree during ALTER PUBLICATION (Sunil S) This error had the visible effect that an event trigger fired for the query would see only the first publish option, even if several had been specified. If such a query were set up as a prepared statement, re-executions…
otherPass connection options specified in CREATE SUBSCRIPTION ... CONNECTION to the publisher's walsender (Fujii Masao) Before this fix, the options connection option (if any) was ignored, thus for example preventing setting custom server parameter values in the walsender session. It was intended for…
featurePrevent invalidation of newly created or newly synced replication slots (Zhijie Hou) A race condition with a concurrent checkpoint could allow WAL to be removed that is needed by the replication slot, causing the slot to immediately get marked invalid.
fixFix race condition in computing a replication slot's required xmin (Zhijie Hou) This could lead to the error “cannot build an initial slot snapshot as oldest safe xid follows snapshot's xmin”.
featureDuring initial synchronization of a logical replication subscription, commit the addition of a pg_replication_origin entry before starting to copy data (Zhijie Hou) Previously, if the copy step failed, the new pg_replication_origin entry would be lost due to transaction rollback. This led to…
otherDon't advance logical replication progress after a parallel worker apply failure (Zhijie Hou) The previous behavior allowed transactions to be lost by a subscriber.
fixFix possible failure with “unexpected data beyond EOF” during restart of a streaming replica server (Anthonin Bonnefoy)
fixFix erroneous tracking of column position when parsing partition range bounds (myzhen) This could, for example, lead to the wrong column name being cited in error messages about casting partition bound values to the column's data type.
fixFix assorted minor errors in error messages (Man Zeng, Tianchen Zhang) For example, an error report about mismatched timeline number in a backup manifest showed the starting timeline number where it meant to show the ending timeline number.
fixFix failure to perform function inlining when doing JIT compilation with LLVM version 17 or later (Anthonin Bonnefoy)
otherAdjust our JIT code to work with LLVM 21 (Holger Hoffstätte) The previous coding failed to compile on aarch64 machines.
featureAdd new server parameter file_extend_method to control use of posix_fallocate() (Thomas Munro) PostgreSQL version 16 and later will use posix_fallocate(), if the platform provides it, to extend relation files. However, this has been reported to interact poorly with some file systems: BTRFS…
fixFix failure to parse long options on the server command line in Solaris executables built with meson (Tom Lane)
featureMake pg_resetwal allow setting next multixact xid to 0 or next multixact offset to UINT32_MAX (Maxim Orlov) These are valid values, so rejecting them was incorrect. In the worst case, if a pg_upgrade is attempted when exactly at the point of multixact wraparound, the upgrade would fail.
fixFix contrib/amcheck to handle “half-dead” btree index pages correctly (Heikki Linnakangas) amcheck expected such a page to have a parent downlink, but it does not, leading to a false error report about “mismatch between parent key and child high key”.
fixFix contrib/amcheck to handle incomplete btree root page splits correctly (Heikki Linnakangas) amcheck could report a false error about “block is not true root”.
fixFix edge-case integer overflow in contrib/intarray's selectivity estimator for @@ (Chao Li) This could cause poor selectivity estimates to be produced for cases involving the maximum integer value.
fixFix multibyte-encoding issue in contrib/ltree (Jeff Davis) The previous coding could pass an incomplete multibyte character to lower(), probably resulting in incorrect behavior.
+5 more items in the release notes
securityCheck for CREATE privileges on the schema in CREATE STATISTICS (Jelte Fennema-Nio) This omission allowed table owners to create statistics in any schema, potentially leading to unexpected naming conflicts. The PostgreSQL Project thanks Jelte Fennema-Nio for reporting this problem. (CVE-2025-12817)
securityAvoid integer overflow in allocation-size calculations within libpq (Jacob Champion) Several places in libpq were not sufficiently careful about computing the required size of a memory allocation. Sufficiently large inputs could cause integer overflow, resulting in an undersized buffer, which…
fixFurther fix processing of character classes within SIMILAR TO regular expressions (Laurenz Albe) The previous fix for translating SIMILAR TO pattern matching expressions to POSIX-style regular expressions broke a corner case that formerly worked: if there is an escape character right after the…
fixFix parsing of aggregate functions whose arguments contain a sub-select with a FROM reference to a CTE outside the aggregate function (Tom Lane) Such a CTE reference must act like a outer-level column reference when determining the aggregate's semantic level; but it was not being accounted for,…
fixFix “no relation entry for relid” errors in corner cases while estimating SubPlan costs (Richard Guo)
breakingRemove faulty assertion in btree index cleanup (Peter Geoghegan)
fixFix possible infinite loop in GIN index scans with multiple scan conditions (Tom Lane) GIN can handle scan conditions that can reject non-matching entries but are not useful for searching for relevant entries, for example a tsquery clause like !term. But such a condition must not be first in the…
fixFix integer-overflow hazard in BRIN index scans when the table contains close to 232 pages (Sunil S) This oversight could result in an infinite loop or scanning of unneeded table pages.
fixFix incorrect zero-extension of stored values in JIT-generated tuple deforming code (David Rowley) When not using JIT, the equivalent code does sign-extension not zero-extension, leading to a different Datum representation of small integer data types. This inconsistency was masked in most cases,…
fixFix incorrect logic for caching result-relation information for triggers (David Rowley, Amit Langote) In cases where partitions' column sets aren't physically identical to their parent partitioned tables' column sets, this oversight could lead to crashes.
featureAdd missing EvalPlanQual rechecks for TID Scan and TID Range Scan plan nodes (Sophie Alpert, David Rowley) This omission led to possibly not rechecking a condition on ctid during concurrent-update situations, causing the update's behavior to vary depending on which plan type had been selected.
fixFix EvalPlanQual handling of foreign or custom joins that do not have an alternative local-join plan prepared for EPQ (Masahiko Sawada, Etsuro Fujita) In such cases the foreign or custom access method should be invoked normally, but that did not happen, typically leading to a crash.
featureAvoid duplicating hash partition constraints during DETACH CONCURRENTLY (Haiyang Li) ALTER TABLE DETACH PARTITION CONCURRENTLY was written to add a copy of the partitioning constraint to the now-detached partition. This was misguided, partially because non-concurrent DETACH doesn't do that, but…
fixFix visibility checking for statistics objects in pg_temp (Noah Misch) A statistics object located in a temporary schema cannot be named without schema qualification, but pg_statistics_obj_is_visible() missed that memo and could return “true” regardless. In turn, functions such as…
fixFix pg_event_trigger_dropped_objects()'s reporting of temporary status (Antoine Violin, Tom Lane) If a dropped column default, trigger, or RLS policy belongs to a temporary table, report it with is_temporary true.
fixFix memory leakage in hashed subplans (Haiyang Li) Any memory consumed by the hash functions used for hashing tuples constituted a query-lifespan memory leak. One way that could happen is if the values being hashed require de-toasting.
fixFix minor memory leak during WAL replay of database creation (Nathan Bossart)
fixFix corruption of the shared statistics table after out-of-memory failures (Mikhail Kot) Previously, an out-of-memory failure partway through creating a new hash table entry left a broken entry behind, potentially causing errors in other sessions later.
fixFix concurrent update issue in MERGE (Yugo Nagata) When executing a MERGE UPDATE action, if there is more than one concurrent update of the target row, the lock-and-retry code would sometimes incorrectly identify the latest version of the target tuple, leading to incorrect results.
featureAdd missing replica identity checks in MERGE and INSERT ... ON CONFLICT DO UPDATE (Zhijie Hou) If MERGE may require update or delete actions, and the target table publishes updates or deletes, insist that it have a REPLICA IDENTITY defined. Failing to require this can silently break replication.…
fixFix incorrect reporting of replication lag in pg_stat_replication view (Fujii Masao) If any standby server's replay LSN stopped advancing, the write_lag and flush_lag columns would eventually stop updating.
breakingRemove the unfinished slot state file after failing to write a replication slot's state to disk (Michael Paquier) Previously, a failure such as out-of-disk-space resulted in leaving a temporary state.tmp file behind. That's problematic because it would block all subsequent attempts to write the…
fixFix mishandling of lock timeout signals in parallel apply workers for logical replication (Hayato Kuroda) The same signal number was being used for both worker shutdown and lock timeout, leading to confusion.
featureAvoid unwanted WAL receiver shutdown when switching from streaming to archive WAL source (Xuneng Zhou) During a timeline change, a standby server's WAL receiver should remain alive, waiting for a new WAL streaming start point. Instead it was repeatedly shutting down and immediately getting…
fixFix use-after-free issue in the relation synchronization cache maintained by the pgoutput logical decoding plugin (Vignesh C, Masahiko Sawada) An error during logical decoding could result in crashes in subsequent logical decoding attempts in the same session. The case is only reachable when…
fixFix incorrect printing of messages about failures in checking whether the user has Windows administrator privilege (Bryan Green) This code would have crashed or at least printed garbage. No such cases have been reported though, indicating that failure of these system calls is extremely rare.
fixAvoid crash when attempting to test PostgreSQL with certain libsanitizer options (Emmanuel Sibi, Jacob Champion)
fixFix false memory-context-checking warnings in debug builds on 64-bit Windows (David Rowley)
fixAvoid leaking memory when handling a SQL error within PL/Python (Tom Lane) This fixes a session-lifespan memory leak introduced in our previous minor releases.
fixFix libpq's trace output of characters with the high bit set (Ran Benita) On platforms where char is considered signed, the output included unsightly \xffffff decoration.
fixFix libpq's handling of socket-related errors on Windows within its GSSAPI logic (Ning Wu, Tom Lane) The code for encrypting/decrypting transmitted data using GSSAPI did not correctly recognize error conditions on the connection socket, since Windows reports those differently than other platforms.…
securityIn pg_dump, dump security labels on subscriptions and event triggers (Jian He, Fujii Masao) Labels on these types of objects were previously missed.
fixFix pg_dump's sorting of default ACLs and foreign key constraints (Kirill Reshke, Álvaro Herrera) Ensure consistent ordering of these database object types, as was already done for other object types.
securityIn pg_restore, skip comments and security labels for publications and subscriptions that are not being restored (Jian He, Fujii Masao) Do not emit COMMENT or SECURITY LABEL commands for these objects when --no-publications or --no-subscriptions is specified.
fixFix assorted errors in the data compression logic in pg_dump and pg_restore (Daniel Gustafsson, Tom Lane) Error checking was missing or incorrect in several places, and there were also portability issues that would manifest on big-endian hardware. These problems had been missed because this code…
fixFix pgbench to error out cleanly if a COPY operation is started (Anthonin Bonnefoy) pgbench doesn't intend to support this case, but previously it went into an infinite loop.
fixFix pgbench's reporting of multiple errors (Yugo Nagata) In cases where two successive PQgetResult calls both fail, pgbench might report the wrong error message.
fixFix contrib/pg_prewarm's privilege checks for indexes (Ayush Vatsa, Nathan Bossart) pg_prewarm() requires SELECT privilege on relations to be prewarmed. However, since indexes have no SQL privileges of their own, this resulted in non-superusers being unable to prewarm indexes. Instead, check for…
featureHarden our read and write barrier macros to satisfy Clang (Thomas Munro) We supposed that __atomic_thread_fence() is a sufficient barrier to prevent the C compiler from re-ordering memory accesses around it, but it appears that that's not true for Clang, allowing it to generate incorrect code for…
fixFix building with LLVM version 21 and later (Holger Hoffstätte)
+19 more items in the release notes
securityTighten security checks in planner estimation functions (Dean Rasheed) The fix for CVE-2017-7484, plus followup fixes, intended to prevent leaky functions from being applied to statistics data for columns that the calling user does not have permission to read. Two gaps in that protection have been…
securityPrevent pg_dump scripts from being used to attack the user running the restore (Nathan Bossart) Since dump/restore operations typically involve running SQL commands as superuser, the target database installation must trust the source server. However, it does not follow that the operating system…
securityConvert newlines to spaces in names included in comments in pg_dump output (Noah Misch) Object names containing newlines offered the ability to inject arbitrary SQL commands into the output script. (Without the preceding fix, injection of psql meta-commands would also be possible this way.)…
fixFix incorrect distance calculation in BRIN numeric_minmax_multi_ops support function (Peter Eisentraut, Tom Lane) The results were sometimes wrong on 64-bit platforms, and wildly wrong on 32-bit platforms. This did not produce obvious failures because the logic is only used to choose how to merge…
fixAvoid regression in the size of XML input that we will accept (Michael Paquier, Erik Wienhold) Our workaround for a bug in early 2.13.x releases of libxml2 made use of a code path that rejects text chunks exceeding 10MB, whereas the previous coding did not. Those early releases are presumably…
fixFix MERGE into a plain-inheritance parent table (Dean Rasheed) Insertions into such a target table could crash or produce incorrect query results due to failing to handle WITH CHECK OPTION and RETURNING actions.
featureAllow tables with statement-level triggers to become partitions or inheritance children (Etsuro Fujita) We do not allow partitions or inheritance child tables to have row-level triggers with transition tables, because an operation on the whole inheritance tree would need to maintain a separate…
otherDisallow collecting transition tuples from child foreign tables (Etsuro Fujita) We do not support triggers with transition tables on foreign tables. However, the case of a partition or inheritance child that is a foreign table was overlooked. If the parent has such a trigger, incorrect transition…
featureAllow resetting unknown custom parameters with reserved prefixes (Nathan Bossart) Previously, if a parameter setting had been stored using ALTER DATABASE/ROLE/SYSTEM, the stored setting could not be removed if the parameter was unknown but had a reserved prefix. This case could arise if an…
fixFix a potential deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION (Ajin Cherian) Ensure that server processes acquire catalog locks in a consistent order during replication origin drops.
featureShorten the race condition window for creating indexes with conflicting names (Tom Lane) When choosing an auto-generated name for an index, avoid conflicting with not-yet-committed pg_class rows as well as fully-valid ones. This avoids possibly choosing the same name as some concurrent CREATE…
otherPrevent usage of incorrect VACUUM options in some cases where multiple tables are vacuumed in a single command (Nathan Bossart, Michael Paquier) The TRUNCATE and INDEX_CLEANUP options of one table could be applied to others.
fixFix processing of character classes within SIMILAR TO regular expressions (Laurenz Albe) The code that translates SIMILAR TO pattern matching expressions to POSIX-style regular expressions did not consider that square brackets can be nested. For example, in a pattern like [[:alpha:]%_], the code…
featureWhen deparsing queries, always add parentheses around the expression in FETCH FIRST expression ROWS WITH TIES clauses (Heikki Linnakangas) This avoids some cases where the deparsed result wasn't syntactically valid.
fixAvoid infinite wait in logical decoding when reading a partially-written WAL record (Vignesh C) If the server crashes after writing the first part of a WAL record that would span multiple pages, subsequent logical decoding of the WAL stream would wait for data to arrive on the next WAL page. That…
fixFix inconsistent quoting of role names in ACL strings (Tom Lane) The previous quoting rule was locale-sensitive, which could lead to portability problems when transferring aclitem values across installations. (pg_dump does not do that, but other tools might.) To ensure consistency, always quote…
fixFix potentially-incorrect decompression of LZ4-compressed archive data (Mikhail Gribkov) This error seems to manifest only with not-very-compressible input data, which may explain why it escaped detection.
fixAvoid re-distributing cache invalidation messages from other transactions during logical replication (vignesh C) Our previous round of minor releases included a bug fix to ensure that replication receiver processes would respond to cross-process cache invalidation messages, preventing them from…
breakingAvoid premature removal of old WAL during checkpoints (Vitaly Davydov) If a replication slot's restart point is advanced while a checkpoint is in progress, no-longer-needed WAL segments could get removed too soon, leading to recovery failure if the database crashes immediately afterwards. Fix by…
fixNever move a replication slot's confirmed-flush position backwards (Shveta Malik) In some cases a replication client could acknowledge an LSN that's past what it has stored persistently, and then perhaps send an older LSN after a restart. We consider this not-a-bug so long as the client did not…
featurePrevent excessive delays before launching new logical replication workers (Tom Lane) In some cases the logical replication launcher could sleep considerably longer than the configured wal_retrieve_retry_interval before launching a new worker.
fixFix use-after-free during logical replication of INSERT ... ON CONFLICT (Ethan Mertz, Michael Paquier) This could result in incorrect progress reporting, or with very bad luck it could result in a crash of the WAL sender process.
featureAllow waiting for a transaction on a standby server to be interrupted (Kevin K Biju) Creation of a replication slot on a standby server may require waiting for some active transaction(s) to finish on the primary and then be replayed on the standby. Since that could be an indefinite wait, it's…
fixFix per-relation memory leakage in autovacuum (Tom Lane)
fixFix session-lifespan memory leaks in XMLSERIALIZE(... INDENT) (Dmitry Kovalenko, Tom Lane)
fixFix some places that might try to fetch toasted fields of system catalogs without any snapshot (Nathan Bossart) This could result in an assertion failure or “cannot fetch toast data without an active snapshot” error.
breakingRemove faulty assertion that a command tag must have been determined by the end of PortalRunMulti() (Álvaro Herrera) This failed in edge cases such as an empty prepared statement.
fixFix assertion failure in XMLTABLE parsing (Richard Guo)
fixRestore the ability to run PL/pgSQL expressions in parallel (Dipesh Dhameliya) PL/pgSQL's notion of an “expression” is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the…
fixFix edge-case resource leaks in PL/Python error reporting (Tom Lane) An out-of-memory failure while reporting an error from Python could result in failure to drop reference counts on Python objects, leading to session-lifespan memory leakage.
fixFix libpq's PQport() function to never return NULL unless the passed connection is NULL (Daniele Varrazzo) This is the documented behavior, but recent libpq versions would return NULL in some cases where the user had not provided a port specification. Revert to our historical behavior of returning…
fixFix timing-dependent failures in SSL and GSSAPI data transmission (Tom Lane) When using SSL or GSSAPI encryption in non-blocking mode, libpq sometimes failed with “SSL error: bad length” or “GSSAPI caller failed to retransmit all data needing to be retried”.
featureIn pg_upgrade, check for inconsistent inherited not-null constraints (Ali Akbar) PostgreSQL versions before 18 allow an inherited column not-null constraint to be dropped. However, this results in a schema that cannot be restored, leading to failure in pg_upgrade. Detect such cases during…
fixFix pg_waldump to show information about dropped statistics in PREPARE TRANSACTION WAL records (Daniil Davydov)
featureAvoid possible leak of the open connection during contrib/dblink connection establishment (Tom Lane) In the rare scenario where we hit out-of-memory while inserting the new connection object into dblink's hashtable, the open connection would be leaked until end of session, leaving an idle session…
fixFix memory leakage in contrib/postgres_fdw's DirectModify methods (Tom Lane) The PGresult holding the results of the remote modify command would be leaked for the rest of the session if the query fails between invocations of the DirectModify methods, which could happen when there's RETURNING data…
featureEnsure that directories listed in configure's --with-includes and --with-libraries options are searched before system-supplied directories (Tom Lane) A common reason for using these options is to allow a user-built version of some library to override the system-supplied version. However, that…
fixFix configure's checks for __cpuid() and __cpuidex() (Lukas Fittl, Michael Paquier) configure failed to detect these Windows-specific functions, so that they would not be used, leading to slower-than-necessary CRC computations since the availability of hardware instructions could not be verified.…
fixFix build failure with --with-pam option on Solaris-based platforms (Tom Lane) Solaris is inconsistent with other Unix platforms about the API for PAM authentication. This manifested as an “inconsistent pointer” compiler warning, which we never did anything about. But as of GCC 14 it's an error…
deprecatedAvoid deprecation warnings when building with libxml2 2.14 and later (Michael Paquier)
+19 more items in the release notes
securityAvoid one-byte buffer overread when examining invalidly-encoded strings that are claimed to be in GB18030 encoding (Noah Misch, Andres Freund) While unlikely, a SIGSEGV crash could occur if an incomplete multibyte character appeared at the end of memory. This was possible both in the server and in…
otherHandle self-referential foreign keys on partitioned tables correctly (Álvaro Herrera) Creating or attaching partitions failed to make the required catalog entries for a foreign-key constraint, if the table referenced by the constraint was the same partitioned table. This resulted in failure to…
featureAvoid data loss when merging compressed BRIN summaries in brin_bloom_union() (Tomas Vondra) The code failed to account for decompression results not being identical to the input objects, which would result in failure to add some of the data to the merged summary, leading to missed rows in index…
fixFix unexpected “attribute has wrong type” errors in UPDATE, DELETE, and MERGE queries that use whole-row table references to views or functions in FROM (Tom Lane)
fixFix MERGE into a partitioned table with DO NOTHING actions (Tender Wang) Some cases failed with “unknown action in MERGE WHEN clause” errors.
otherPrevent failure in INSERT commands when the table has a GENERATED column of a domain data type and the domain's constraints disallow null values (Jian He) Constraint failure was reported even if the generation expression produced a perfectly okay result.
otherCorrectly process references to outer CTE names that appear within a WITH clause attached to an INSERT/UPDATE/DELETE/MERGE command that's inside WITH (Tom Lane) The parser failed to detect disallowed recursion cases, nor did it account for such references when sorting CTEs into a usable order.
otherDon't try to parallelize array_agg() when the argument is of an anonymous record type (Richard Guo, Tom Lane) The protocol for communicating with parallel workers doesn't support identifying the concrete record type that a worker is returning.
fixFix ARRAY(subquery) and ARRAY[expression, ...] constructs to produce sane results when the input is of type int2vector or oidvector (Tom Lane) This patch restores the behavior that existed before PostgreSQL 9.5: the result is of type int2vector[] or oidvector[].
fixFix possible erroneous reports of invalid affixes while parsing Ispell dictionaries (Jacob Brazeal)
fixFix ALTER TABLE ADD COLUMN to correctly handle the case of a domain type that has a default (Jian He, Tom Lane, Tender Wang) If a domain type has a default, adding a column of that type (without any explicit DEFAULT clause) failed to install the domain's default value in existing rows, instead…
otherRepair misbehavior when there are duplicate column names in a foreign key constraint's ON DELETE SET DEFAULT or SET NULL action (Tom Lane)
otherImprove the error message for disallowed attempts to alter the properties of a foreign key constraint (Álvaro Herrera)
otherAvoid error when resetting the relhassubclass flag of a temporary table that's marked ON COMMIT DELETE ROWS (Noah Misch)
featureAdd missing deparsing of the INDENT option of XMLSERIALIZE() (Jim Jones) Previously, views or rules using XMLSERIALIZE(... INDENT) were dumped without the INDENT clause, causing incorrect results after restore.
otherAvoid premature evaluation of the arguments of an aggregate function that has both FILTER and ORDER BY (or DISTINCT) options (David Rowley) If there is ORDER BY or DISTINCT, we consider pre-sorting the aggregate input values rather than doing the sort within the Agg plan node. But this is…
fixFix planner's failure to identify more than one hashable ScalarArrayOpExpr subexpression within a top-level expression (David Geier) This resulted in unnecessarily-inefficient execution of any additional subexpressions that could have been processed with a hash table (that is, IN, NOT IN, or = ANY…
otherDisable “skip fetch” optimization in bitmap heap scan (Matthias van de Meent) It turns out that this optimization can result in returning dead tuples when a concurrent vacuum marks a page all-visible.
fixFix performance issues in GIN index search startup when there are many search keys (Tom Lane, Vinod Sridharan) An indexable clause with many keys (for example, jsonbcol ?| array[...] with tens of thousands of array elements) took O(N2) time to start up, and was uncancelable for that interval too.
fixDetect missing support procedures in a BRIN index operator class, and report an error instead of crashing (Álvaro Herrera)
otherRespond to interrupts (such as query cancel) while waiting for asynchronous subplans of an Append plan node (Heikki Linnakangas) Previously, nothing would happen until one of the subplans becomes ready.
otherReport the I/O statistics of active WAL senders more frequently (Bertrand Drouvot) Previously, the pg_stat_io view failed to accumulate I/O performed by a WAL sender until that process exited. Now such I/O will be reported after at most one second's delay.
fixFix race condition in handling of synchronous_standby_names immediately after startup (Melnikov Maksim, Michael Paquier) For a short period after system startup, backends might fail to wait for synchronous commit even though synchronous_standby_names is enabled.
otherAvoid infinite loop if scram_iterations is set to INT_MAX (Kevin K Biju)
fixAvoid possible crashes due to double transformation of json_array()'s subquery (Tom Lane)
fixFix pg_strtof() to not crash with null endptr (Alexander Lakhin, Tom Lane)
fixFix crash after out-of-memory in certain GUC assignments (Daniel Gustafsson)
fixAvoid crash when a Snowball stemmer encounters an out-of-memory condition (Maksim Korotkov)
featurePrevent over-advancement of catalog xmin in “fast forward” mode of logical decoding (Zhijie Hou) This mistake could allow deleted catalog entries to be vacuumed away even though they were still potentially needed by the WAL-reading process.
featurePrevent incorrect reset of replication origin when an apply worker encounters an error but the error is caught and does not result in worker exit (Hayato Kuroda) This mistake could allow duplicate data to be applied.
fixFix wrong checkpoint details in error message about incorrect recovery timeline choice (David Steele) If the requested recovery timeline is not reachable, the reported checkpoint and timeline should be the values read from the backup_label, if there is one. This message previously reported values…
breakingRemove incorrect assertion in pgstat_report_stat() (Michael Paquier)
fixFix overly-strict assertion in gistFindCorrectParent() (Heikki Linnakangas)
fixFix rare assertion failure in standby servers when the primary is restarted (Heikki Linnakangas)
fixIn pg_amcheck and pg_upgrade, use the correct function to free allocations made by libpq (Michael Paquier, Ranier Vilela) These oversights could result in crashes in certain Windows build configurations, such as a debug build of libpq used by a non-debug build of the calling application.
featureAllow contrib/dblink queries to be interrupted by query cancel (Noah Misch) This change back-patches a v17-era fix. It prevents possible hangs in CREATE DATABASE and DROP DATABASE due to failure to detect deadlocks.
fixAvoid crashing with corrupt input data in contrib/pageinspect's heap_page_items() (Dmitry Kovalenko)
featurePrevent assertion failure in contrib/pg_freespacemap's pg_freespacemap() (Tender Wang) Applying pg_freespacemap() to a relation lacking storage (such as a view) caused an assertion failure, although there was no ill effect in non-assert builds. Add an error check to reject that case.
fixFix build failure on macOS 15.4 (Tom Lane, Peter Eisentraut) This macOS update broke our configuration probe for strchrnul().
featureUpdate time zone data files to tzdata release 2025b for DST law changes in Chile, plus historical corrections for Iran (Tom Lane) There is a new time zone America/Coyhaique for Chile's Aysén Region, to account for it changing to UTC-03 year-round and thus diverging from America/Santiago.
+8 more items in the release notes
16.8 Feb 20, 2025 Release notes ↗
securityImprove behavior of libpq's quoting functions (Andres Freund, Tom Lane) The changes made for CVE-2025-1094 had one serious oversight: PQescapeLiteral() and PQescapeIdentifier() failed to honor their string length parameter, instead always reading to the input string's trailing null. This resulted…
fixFix meson build system to correctly detect availability of the bsd_auth.h system header (Nazir Bilal Yavuz)
16.7 Feb 13, 2025 Release notes ↗
securityHarden PQescapeString and allied functions against invalidly-encoded input strings (Andres Freund, Noah Misch) Data-quoting functions supplied by libpq now fully check the encoding validity of their input. If invalid characters are detected, they report an error if possible. For the ones that lack…
otherExclude parallel workers from connection privilege checks and limits (Tom Lane) Do not check datallowconn, rolcanlogin, and ACL_CONNECT privileges when starting a parallel worker, instead assuming that it's enough for the leader process to have passed similar checks originally. This avoids, for…
fixFix possible re-use of stale results in window aggregates (David Rowley) A window aggregate with a “run condition” optimization and a pass-by-reference result type might incorrectly return the result from the previous partition instead of performing a fresh calculation.
otherKeep TransactionXmin in sync with MyProc->xmin (Heikki Linnakangas) This oversight could permit a process to try to access data that had already been vacuumed away. One known consequence is transient “could not access status of transaction” errors.
fixFix race condition that could cause failure to add a newly-inserted catalog entry to a catalog cache list (Heikki Linnakangas) This could result, for example, in failure to use a newly-created function within an existing session.
otherPrevent possible catalog corruption when a system catalog is vacuumed concurrently with an update (Noah Misch)
fixFix data corruption when relation truncation fails (Thomas Munro) The filesystem calls needed to perform relation truncation could fail, leaving inconsistent state on disk (for example, effectively reviving deleted data). We can't really prevent that, but we can recover by dint of making such…
fixPrevent checkpoints from starting during relation truncation (Robert Haas) This avoids a race condition wherein the modified file might not get fsync'd before completing the checkpoint, creating a risk of data corruption if the operating system crashes soon after.
otherAvoid possibly losing an update of pg_database.datfrozenxid when VACUUM runs concurrently with a REASSIGN OWNED that changes that database's owner (Kirill Reshke)
fixFix incorrect tg_updatedcols values passed to AFTER UPDATE triggers (Tom Lane) In some cases the tg_updatedcols bitmap could describe the set of columns updated by an earlier command in the same transaction, fooling the trigger into doing the wrong thing. Also, prevent memory bloat caused by…
fixFix detach of a partition that has its own foreign-key constraint referencing a partitioned table (Amul Sul) In common cases, foreign keys are defined on a partitioned table's top level; but if instead one is defined on a partition and references a partitioned table, and the referencing partition…
fixFix mis-processing of to_timestamp's FFn format codes (Tom Lane) An integer format code immediately preceding FFn would consume all available digits, leaving none for FFn.
otherWhen deparsing an XMLTABLE() expression, ensure that XML namespace names are double-quoted when necessary (Dean Rasheed)
otherInclude the ldapscheme option in pg_hba_file_rules() output (Laurenz Albe)
featureDon't merge UNION operations if their column collations aren't consistent (Tom Lane) Previously we ignored collations when deciding if it's safe to merge UNION steps into a single N-way UNION operation. This was arguably valid before the introduction of nondeterministic collations, but it's not…
otherPrevent “wrong varnullingrels” planner errors after pulling up a subquery that's underneath an outer join (Tom Lane)
otherIgnore nulling-relation marker bits when looking up statistics (Richard Guo) This oversight could lead to failure to use relevant statistics about expressions, or to “corrupt MVNDistinct entry” errors.
fixFix missed expression processing for partition pruning steps (Tom Lane) This oversight could lead to “unrecognized node type” errors, and perhaps other problems, in queries accessing partitioned tables.
featureAllow dshash tables to grow past 1GB (Matthias van de Meent) This avoids errors like “invalid DSA memory alloc request size”. The case can occur for example in transactions that process several million tables.
otherAvoid possible integer overflow in bringetbitmap() (James Hunter, Evgeniy Gorbanyov) Since the result is only used for statistical purposes, the effects of this error were mostly cosmetic.
otherEnsure that an already-set process latch doesn't prevent the postmaster from noticing socket events (Thomas Munro) An extremely heavy workload of backends launching workers and workers exiting could prevent the postmaster from responding to incoming client connections in a timely fashion.
otherPrevent streaming standby servers from looping infinitely when reading a WAL record that crosses pages (Kyotaro Horiguchi, Alexander Kukushkin) This would happen when the record's continuation is on a page that needs to be read from a different WAL source.
fixFix unintended promotion of FATAL errors to PANIC during early process startup (Noah Misch) This fixes some unlikely cases that would result in “PANIC: proc_exit() called in child process”.
securityFix cases where an operator family member operator or support procedure could become a dangling reference (Tom Lane) In some cases a data type could be dropped while references to its OID still remain in pg_amop or pg_amproc. While that caused no immediate issues, an attempt to drop the owning…
fixFix multiple memory leaks in logical decoding output (Vignesh C, Masahiko Sawada, Boyu Yang)
fixFix small memory leak when updating the application_name or cluster_name settings (Tofig Aliev)
fixFix unsafe order of operations during cache lookups (Noah Misch) The only known consequence was a usually-harmless “you don't own a lock of type ExclusiveLock” warning during GRANT TABLESPACE.
fixFix possible “failed to resolve name” failures when using JIT on older ARM platforms (Thomas Munro) This could occur as a consequence of inconsistency about the default setting of -moutline-atomics between gcc and clang. At least Debian and Ubuntu are known to ship gcc and clang compilers that…
fixFix assertion failure in WITH RECURSIVE ... UNION queries (David Rowley)
fixFix assertion failure at shutdown when writing out the statistics file (Michael Paquier)
fixFix PL/Tcl to compile with Tcl 9 (Peter Eisentraut)
fixFix psql to safely handle file path names that are encoded in SJIS (Tom Lane) Some two-byte characters in SJIS have a second byte that is equal to ASCII backslash (\). These characters were corrupted by path name normalization, preventing access to files whose names include such characters.
fixFix use of wrong version of pqsignal() in pgbench and psql (Fujii Masao, Tom Lane) This error could lead to misbehavior when using the -T option in pgbench or the \watch command in psql, due to interrupted system calls not being resumed as expected.
fixFix misexecution of some nested \if constructs in pgbench (Michail Nikolaev) An \if command appearing within a false (not-being-executed) \if branch was incorrectly treated the same as \elif.
fixFix possible crash in pg_dump with identity sequences attached to tables that are extension members (Tom Lane)
fixFix memory leak in pg_restore with zstd-compressed data (Tom Lane) The leak was per-decompression-operation, so would be most noticeable with a dump containing many tables or large objects.
fixFix pg_basebackup to correctly handle pg_wal.tar files exceeding 2GB on Windows (Davinder Singh, Thomas Munro)
securityUse SQL-standard function bodies in the declarations of contrib/earthdistance's SQL-language functions (Tom Lane, Ronan Dunklau) This change allows their references to contrib/cube to be resolved during extension creation, reducing the risk of search-path-based failures and possible attacks. In…
fixFix meson build system to support old OpenSSL libraries on Windows (Darek Slusarczyk) Add support for the legacy library names ssleay32 and libeay32.
fixFix meson configuration process to correctly detect OSSP's uuid.h header file under MSVC (Andrew Dunstan)
+15 more items in the release notes
16.6 Nov 21, 2024 Release notes ↗
otherRepair ABI break for extensions that work with struct ResultRelInfo (Tom Lane) Last week's minor releases unintentionally broke binary compatibility with timescaledb and several other extensions. Restore the affected structure to its previous size, so that such extensions need not be rebuilt.
securityRestore functionality of ALTER {ROLE|DATABASE} SET role (Tom Lane, Noah Misch) The fix for CVE-2024-10978 accidentally caused settings for role to not be applied if they come from non-interactive sources, including previous ALTER {ROLE|DATABASE} commands and the PGOPTIONS environment variable.
breakingFix cases where a logical replication slot's restart_lsn could go backwards (Masahiko Sawada) Previously, restarting logical replication could sometimes cause the slot's restart point to be recomputed as an older value than had previously been advertised in pg_replication_slots. This is bad, since…
otherAvoid deleting still-needed WAL files during pg_rewind (Polina Bungina, Alexander Kukushkin) Previously, in unlucky cases, it was possible for pg_rewind to remove important WAL files from the rewound demoted primary. In particular this happens if those files have been marked for archival (i.e.,…
fixFix race conditions associated with dropping shared statistics entries (Kyotaro Horiguchi, Michael Paquier) These bugs could lead to loss of statistics data, assertion failures, or “can only drop stats once” errors.
otherCount index scans in contrib/bloom indexes in the statistics views, such as the pg_stat_user_indexes.idx_scan counter (Masahiro Ikeda)
fixFix crash when checking to see if an index's opclass options have changed (Alexander Korotkov) Some forms of ALTER TABLE would fail if the table has an index with non-default operator class options.
fixAvoid assertion failure caused by disconnected NFA sub-graphs in regular expression parsing (Tom Lane) This bug does not appear to have any visible consequences in non-assert builds.
See how far your stack has drifted from upstream. Release data from vendors’ own sources · feed under CC BY 4.0 · Code under AGPL-3.0 Settings Feed status