VersionDrift
Product

PostgreSQL 17.1 → 18.6

16 releases · 21 breaking changes · 119 security fixes · 40 advisories fixed

119security21breaking4deprecated93feature252fix

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…
  • 4.2 CVE-2026-14681 Improper enforcement of message integrity in PostgreSQL GSSAPI support allows a user to negotiate GSSAPI contrary to pg_hba.conf rules, via initial direct TLS connection. Despite a pg_hba.conf tha…
  • 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…
  • 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…
  • 7.2 CVE-2026-6476 SQL injection in PostgreSQL pg_createsubscriber allows an attacker with pg_create_subscription rights to execute arbitrary SQL as a superuser. The attack takes effect when pg_createsubscriber next…
  • 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 18.4
  • breaking Remove faulty assertion in btree index cleanup (Peter Geoghegan) in 18.1
  • 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 18.1
  • breaking Remove non-functional support for rule privileges in GRANT/REVOKE (Fujii Masao) These have been non-functional since PostgreSQL 8.2. in 18.0
  • breaking Remove column pg_backend_memory_contexts.parent (Melih Mutlu) This is no longer needed since pg_backend_memory_contexts.path was added. in 18.0
  • breaking Add pg_stat_io columns to report I/O activity in bytes (Nazir Bilal Yavuz) The new columns are read_bytes, write_bytes, and extend_bytes. The op_bytes column, which always equaled BLCKSZ, has been removed. in 18.0
  • breaking Remove read/sync columns from pg_stat_wal (Bertrand Drouvot) This removes columns wal_write, wal_sync, wal_write_time, and wal_sync_time. in 18.0
  • breaking Add optional parameter to json{b}_strip_nulls to allow removal of null array elements (Florents Tselai) in 18.0
  • breaking Remove column pg_attribute.attcacheoff (David Rowley) in 18.0
  • breaking Remove support for OpenSSL versions older than 1.1.1 (Daniel Gustafsson) in 18.0
  • breaking Remove the experimental designation of Meson builds on Windows (Aleksander Alekseev) in 18.0
  • breaking Remove configure options --disable-spinlocks and --disable-atomics (Thomas Munro) Thirty-two-bit atomic operations are now required. in 18.0
  • breaking Remove support for the HPPA/PA-RISC architecture (Tom Lane) in 18.0
  • 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 17.10
  • breaking Remove faulty assertion in btree index cleanup (Peter Geoghegan) in 17.7
  • 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 17.7
  • breaking Fix inconsistent spelling of LWLock names for MultiXactOffsetSLRU and MultiXactMemberSLRU (Bertrand Drouvot) This resulted in different wait-event names being displayed in pg_wait_events and pg_stat_activity, potentially breaking monitoring queries that join those views. in 17.6
  • 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 17.6
  • 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 17.6
  • breaking Remove incorrect assertion in pgstat_report_stat() (Michael Paquier) in 17.5
  • 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 17.2

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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.6
  • 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 18.4
  • 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 18.4
  • security Properly quote subscription names in pg_createsubscriber (Nathan Bossart) The given subscription name was inserted into SQL commands without quoting, so that SQL injection could be achieved in the (perhaps unlikely) case that the subscription name comes from an untrusted source. The PostgreSQL… in 18.4
  • 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 18.4
  • 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 18.4
  • security Detect faulty input when restoring attribute MCV statistics (Michael Paquier) The statistics restore functions were insufficiently careful about validating most-common-value statistics, and would accept values that could crash the planner later on. The PostgreSQL Project thanks Jeroen Gui for… in 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.4
  • 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 18.3
  • security Fix oversight in the fix for CVE-2026-2007 (Zsolt Parragi) If the “bounds” array needed to be expanded, because the input contained more trigrams than the initial guess, generate_trgm_only didn't return the modified array pointer to its caller. That would lead to incorrect output from… in 18.3
  • 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 18.2
  • 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 18.2
  • 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 18.2
  • 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 18.2
  • security Harden contrib/pg_trgm against changes in string lowercasing behavior (Heikki Linnakangas) Fix potential buffer overruns arising from the fact that in some locales lower-casing a string can produce more characters (not bytes) than were in the original. That behavior is new in version 18, and so is… in 18.2
  • 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 18.1
  • 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 18.1
  • security Add option --no-policies to disable row level security policy processing in pg_dump, pg_dumpall, pg_restore (Nikolay Samokhvalov) This is useful for migrating to systems with different policies. in 18.0
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.11
  • 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 17.10
  • 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 17.10
  • security Properly quote subscription names in pg_createsubscriber (Nathan Bossart) The given subscription name was inserted into SQL commands without quoting, so that SQL injection could be achieved in the (perhaps unlikely) case that the subscription name comes from an untrusted source. The PostgreSQL… in 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.10
  • 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 17.9
  • 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 17.8
  • 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 17.8
  • 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 17.8
  • 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 17.8
  • 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 17.7
  • 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 17.7
  • 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 17.7
  • 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 17.7
  • 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 17.6
  • 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 17.6
  • 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 17.6
  • 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 17.5
  • 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 17.4
  • 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 17.3
  • 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 17.3
  • 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 17.3
  • 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 17.2

Deprecations

  • deprecated Deprecate MD5 password authentication (Nathan Bossart) Support for MD5 passwords will be removed in a future major version release. CREATE ROLE and ALTER ROLE now emit deprecation warnings when setting MD5 passwords. These warnings can be disabled by setting the md5_password_warnings parameter to… in 18.0
  • deprecated Modify some libpq function signatures to use int64_t (Thomas Munro) These previously used pg_int64, which is now deprecated. in 18.0
  • deprecated Add pg_recvlogical option --enable-failover to specify failover slots (Hayato Kuroda) Also add option --enable-two-phase as a synonym for --two-phase, and deprecate the latter. in 18.0
  • deprecated Avoid deprecation warnings when building with libxml2 2.14 and later (Michael Paquier) in 17.6

Every release in between

18.6 Aug 13, 2026 Release notes ↗
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 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.
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,…
featurePrevent “no empty local buffer available” errors during temporary table access (Melanie Plageman) Limit the number of local buffers that the read streaming mechanism is allowed to use. Previously, a large value of effective_io_concurrency could allow a single stream to use all the buffers,…
featureRestore full use of shared buffer pool in VACUUM's wraparound failsafe mode (Melanie Plageman) An ordinary VACUUM is limited to use just a few shared buffers, so as not to impinge too much on other processing. However, in failsafe mode we want to reclaim transaction IDs as quickly as possible, so…
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…
+100 more items in the release notes
18.4 May 14, 2026 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 subscription names in pg_createsubscriber (Nathan Bossart) The given subscription name was inserted into SQL commands without quoting, so that SQL injection could be achieved in the (perhaps unlikely) case that the subscription name comes from an untrusted source. The PostgreSQL…
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.…
securityDetect faulty input when restoring attribute MCV statistics (Michael Paquier) The statistics restore functions were insufficiently careful about validating most-common-value statistics, and would accept values that could crash the planner later on. The PostgreSQL Project thanks Jeroen Gui for…
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…
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 self-join removal to handle join clauses that are bare boolean columns, e.g. ON t1.boolcol (Andrei Lepikhov, Tender Wang, Alexander Korotkov) Previously such a case led to a “no relation entry for relid N” error.
fixFix UPDATE/DELETE ... WHERE CURRENT OF to work on tables with virtual generated columns (Satyanarayana Narlapuram, Dean Rasheed)
fixFix expansion of virtual generated columns in EXCLUDED column references in INSERT ... ON CONFLICT (Satyanarayana Narlapuram, Dean Rasheed)
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 “indexes on virtual generated columns are not supported” errors (Robert Haas) Creation of an expression index could sometimes incorrectly report this error.
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.
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 TABLE ... SET NOT NULL to invoke object-access hook functions only after completing the catalog change (Artur Zakirov)
fixFix ALTER FOREIGN DATA WRAPPER to not drop the wrapper object's dependency on its handler function (Jeff Davis)
fixFix loss of deferrability of foreign-key triggers (Yasuo Honda) Previously, a foreign key defined as DEFERRABLE INITIALLY DEFERRED would behave as NOT DEFERRABLE after being set to NOT ENFORCED status and then back to ENFORCED. If you have a foreign key with this problem, it can be repaired (after…
fixFix WITHOUT OVERLAPS to allow domains (Jian He) UNIQUE/PRIMARY KEY ... WITHOUT OVERLAPS requires the no-overlap column to be a range or multirange, but it should allow a domain over such a type too.
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.
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 “no relation entry for relid 0” failure while estimating array lengths in set operations (Tender Wang)
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.
fixFix incremental JSON parser's handling of numeric tokens that cross input buffer boundaries (Andrew Dunstan) It was possible to accept an incorrectly-formatted number, leading to failures later.
fixFix excessive log output from idle slotsync worker processes (Zhijie Hou)
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.
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…
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,…
+34 more items in the release notes
18.3 Feb 26, 2026 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.
securityFix oversight in the fix for CVE-2026-2007 (Zsolt Parragi) If the “bounds” array needed to be expanded, because the input contained more trigrams than the initial guess, generate_trgm_only didn't return the modified array pointer to its caller. That would lead to incorrect output from…
fixFix the volatility marking of json_strip_nulls() and jsonb_strip_nulls() (Andrew Dunstan) These functions have always been considered immutable, but refactoring in version 18 accidentally marked them stable instead. That prevents their use in index expressions and could cause unnecessary repeat…
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.
otherAvoid name collisions between user-written constraints and automatically-named NOT NULL constraints (Laurenz Albe) As of version 18, NOT NULL constraints have full-fledged pg_constraint entries, and therefore require names. The logic for choosing a name for an unnamed NOT NULL constraint failed to…
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…
18.2 Feb 12, 2026 Release notes ↗
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…
securityHarden contrib/pg_trgm against changes in string lowercasing behavior (Heikki Linnakangas) Fix potential buffer overruns arising from the fact that in some locales lower-casing a string can produce more characters (not bytes) than were in the original. That behavior is new in version 18, and so is…
fixFix inconsistent case-insensitive matching in contrib/ltree (Jeff Davis) Index-related routines in ltree used a different implementation of case-folding than the primary operators did. Their behavior was equivalent only if the default collation provider was libc and the encoding was single-byte.…
featureWhen using ALTER TABLE ... ADD CONSTRAINT to add a not-null constraint with an explicit name, if the column is already marked NOT NULL, require that the provided name match the existing constraint name (Álvaro Herrera, Srinath Reddy Sadipiralla)
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 incorrect pruning of rowmarks belonging to non-relation rangetable entries, such as subqueries (Dean Rasheed) This led to incorrect results if a proposed row update needed to be modified by EvalPlanQual rechecking, as could happen if there was a concurrent update to that row.
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.
fixFix expression evaluation bug for a sub-select within an array subscript (Andres Freund)
fixFix text substring search for non-deterministic collations (Laurenz Albe) When using a non-deterministic collation, we failed to detect a match occurring at the very end of the searched string.
fixFix planner error with set-returning functions and grouping sets (Richard Guo) When constructing a ProjectSet plan node, the planner failed to detect that subexpressions involving grouping expressions were already computed by the input plan. This led to inefficient plans or errors such as…
featureAvoid incorrect optimization when a subquery's grouping clause contains a volatile or set-returning function (Richard Guo) The planner was willing to push down outer-query restrictions referencing such a grouping column, leading to incorrect behavior due to multiple evaluation of a volatile…
fixLook through PlaceHolderVar nodes when searching for statistics about an expression (Richard Guo) This change allows the planner to find relevant statistics about expressions pulled up from subqueries or used in GROUP BY, avoiding falling back to a default estimate. (Arguably we should adjust any…
fixLook through no-op PlaceHolderVar nodes when matching expressions to indexes (Richard Guo) Because PostgreSQL version 18 uses PlaceHolderVars in more cases than before, some queries that formerly could use an index failed to do so. Add logic to prevent that regression.
fixFix planner's conversion of OR clauses to ScalarArrayOp index conditions (Tender Wang, Tom Lane) The code did not handle RelabelType nodes correctly, and could generate invalid expressions or fail to perform a valid conversion.
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.
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 erroneous counting of updates in EXPLAIN ANALYZE MERGE with a concurrent update (Dean Rasheed) This situation led to an incorrect count of “skipped” tuples in EXPLAIN's output, or to an assertion failure in an assert-enabled build.
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 incorrect handling of incremental backups of large tables (Robert Haas, Oleg Tkachenko) If a table exceeding 1GB (or in general, the installation's segment size) is truncated by VACUUM between the base backup and the incremental backup, pg_combinebackup could fail with an error about…
fixFix potential backend process crash at process exit due to trying to release a lock in an already-unmapped shared memory segment (Rahila Syed)
fixFix race condition in async I/O code (Andres Freund) It was possible for the result code of an asynchronous I/O operation to be overwritten before it was fetched.
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.
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.
featureAllow retrying initialization of a DSM registry entry (Nathan Bossart) If we fail partway through initialization of a dynamic shared memory entry, allow the next attempt to use that entry to retry initialization. Previously the entry was left in a permanently-failed state.
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…
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…
fixFix logical replication slotsync worker processes to handle LOCK_TIMEOUT signals correctly (Zhijie Hou) Previously, timeout signals were effectively ignored.
fixFix possible failure with “unexpected data beyond EOF” during restart of a streaming replica server (Anthonin Bonnefoy)
fixFix error reporting for SQL/JSON path type mismatches (Jian He) The code could produce a “cache lookup failed for type 0” error instead of the intended complaint about the path expression not being of the right type.
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…
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.
+35 more items in the release notes
18.1 Nov 13, 2025 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…
otherPrevent “unrecognized node type” errors when a SQL/JSON function such as JSON_VALUE has a DEFAULT clause containing a COLLATE expression (Jian He)
otherAvoid incorrect optimization of variable-free HAVING clauses with grouping sets (Richard Guo)
otherDo not use parallelism in hash right semi joins (Richard Guo) The case does not work reliably due to a race condition in updating the join's shared hash table.
otherAvoid possible division-by-zero when creating ordered-append plans (Richard Guo) This mistake could result in incorrect selection of the cheapest path, or in an assertion failure in debug builds.
fixFix planner failure with index types that can do ordered access but not index-only scans (Maxime Schoemans) This oversight resulted in errors like “no data returned for index-only scan”. The case does not arise with any in-core index type, but some extensions encountered the problem.
breakingRemove faulty assertion in btree index cleanup (Peter Geoghegan)
otherAvoid possible out-of-memory or “invalid memory alloc request size” failures during parallel GIN index build (Tomas Vondra)
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 rare crash when processing hashed GROUPING SETS queries (David Rowley)
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.
fixFix crash during EvalPlanQual rechecks on partitioned tables (David Rowley, Amit Langote)
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…
fixAvoid potential use-after-free in parallel vacuum (Kevin Oommen Anish) This bug seems to have no consequences in standard builds, but it's theoretically a hazard.
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 minor memory leak during WAL replay of database creation (Nathan Bossart)
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…
fixRe-establish special case for C collation in locale setup (Jeff Davis) This fixes a regression in access to shared catalogs early in backend startup, before a database has been selected. It is not known to be a problem for any core PostgreSQL code, but some extensions were broken.
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 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.…
fixFix dumping of non-inherited not-null constraints on inherited table columns (Dilip Kumar) pg_dump failed to preserve such constraints when dumping from a pre-v18 server.
fixFix pg_dump's sorting of foreign key constraints (Álvaro Herrera) Ensure consistent ordering of these database objects, as was already done for other object types.
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 per-file memory leakage in pg_combinebackup (Tom Lane)
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…
fixIn contrib/pg_stat_statements, avoid crash when two or more constants are marked as having the same location in the SQL statement text (Sami Imseih, Dmitry Dolgov)
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 PGXS build infrastructure to support building NLS po files for extensions (Ryo Matsumura)
+13 more items in the release notes
18.0 Sep 25, 2025 Release notes ↗
featureSupport for "skip scan" lookups that allow using multicolumn B-tree indexes in more cases.
featureOLD and NEW support for RETURNING clauses in INSERT, UPDATE, DELETE, and MERGE commands.
featureChange initdb default to enable data checksums (Greg Sabino Mullane) Checksums can be disabled with the new initdb option --no-data-checksums. pg_upgrade requires matching cluster checksum settings, so this new option can be useful to upgrade non-checksum old clusters.
deprecatedDeprecate MD5 password authentication (Nathan Bossart) Support for MD5 passwords will be removed in a future major version release. CREATE ROLE and ALTER ROLE now emit deprecation warnings when setting MD5 passwords. These warnings can be disabled by setting the md5_password_warnings parameter to…
featureChange VACUUM and ANALYZE to process the inheritance children of a parent (Michael Harris) The previous behavior can be performed by using the new ONLY option.
breakingRemove non-functional support for rule privileges in GRANT/REVOKE (Fujii Masao) These have been non-functional since PostgreSQL 8.2.
breakingRemove column pg_backend_memory_contexts.parent (Melih Mutlu) This is no longer needed since pg_backend_memory_contexts.path was added.
featureAllow transforming OR-clauses to arrays for faster index processing (Alexander Korotkov, Andrey Lepikhov)
featureAllow the keys of SELECT DISTINCT to be internally reordered to avoid sorting (Richard Guo) This optimization can be disabled using enable_distinct_reordering.
featureAllow some HAVING clauses on GROUPING SETS to be pushed to WHERE clauses (Richard Guo) This allows earlier row filtering. This release also fixes some GROUPING SETS queries that used to return incorrect results.
featureAllow the optimizer to use Right Semi Join plans (Richard Guo) Semi-joins are used when needing to find if there is at least one match.
featureAllow merge joins to use incremental sorts (Richard Guo)
featureAllow partitionwise joins in more cases, and reduce its memory usage (Richard Guo, Tom Lane, Ashutosh Bapat)
featureAllow skip scans of btree indexes (Peter Geoghegan) This allows multi-column btree indexes to be used in more cases such as when there are no restrictions on the first or early indexed columns (or there are non-equality ones), and there are useful restrictions on later indexed columns.
featureAllow non-btree unique indexes to be used as partition keys and in materialized views (Mark Dilger) The index type must still support equality.
featureAllow GIN indexes to be created in parallel (Tomas Vondra, Matthias van de Meent)
featureAllow values to be sorted to speed range-type GiST and btree index builds (Bernd Helmle)
featureAdd an asynchronous I/O subsystem (Andres Freund, Thomas Munro, Nazir Bilal Yavuz, Melanie Plageman) This feature allows backends to queue multiple read requests, which allows for more efficient sequential scans, bitmap heap scans, vacuums, etc. This is enabled by server variable io_method, with…
featureAllow normal vacuums to freeze some pages, even though they are all-visible (Melanie Plageman) This reduces the overhead of later full-relation freezing. The aggressiveness of this can be controlled by server variable and per-table setting vacuum_max_eager_freeze_failure_rate. Previously vacuum…
featureAdd server variable vacuum_truncate to control file truncation during VACUUM (Nathan Bossart, Gurjeet Singh) A storage-level parameter with the same name and behavior already existed.
featureAdd log_connections option to report the duration of connection stages (Melanie Plageman)
featureAdd log_line_prefix escape %L to output the client IP address (Greg Sabino Mullane)
featureAdd server variable log_lock_failures to log lock acquisition failures (Yuki Seino, Fujii Masao) Specifically it reports SELECT ... NOWAIT lock failures.
featureModify pg_stat_all_tables and its variants to report the time spent in VACUUM, ANALYZE, and their automatic variants (Sami Imseih) The new columns are total_vacuum_time, total_autovacuum_time, total_analyze_time, and total_autoanalyze_time.
featureAdd delay time reporting to VACUUM and ANALYZE (Bertrand Drouvot, Nathan Bossart) This information appears in the server log, the system views pg_stat_progress_vacuum and pg_stat_progress_analyze, and the output of VACUUM and ANALYZE when in VERBOSE mode; tracking must be enabled with the server…
featureAdd WAL, CPU, and average read statistics output to ANALYZE VERBOSE (Anthonin Bonnefoy)
featureAdd full WAL buffer count to VACUUM/ANALYZE (VERBOSE) and autovacuum log output (Bertrand Drouvot)
featureAdd per-backend I/O statistics reporting (Bertrand Drouvot) The statistics are accessed via pg_stat_get_backend_io(). Per-backend I/O statistics can be cleared via pg_stat_reset_backend_stats().
breakingAdd pg_stat_io columns to report I/O activity in bytes (Nazir Bilal Yavuz) The new columns are read_bytes, write_bytes, and extend_bytes. The op_bytes column, which always equaled BLCKSZ, has been removed.
featureAdd WAL I/O activity rows to pg_stat_io (Nazir Bilal Yavuz, Bertrand Drouvot, Michael Paquier) This includes WAL receiver activity and a wait event for such writes.
breakingRemove read/sync columns from pg_stat_wal (Bertrand Drouvot) This removes columns wal_write, wal_sync, wal_write_time, and wal_sync_time.
breakingAdd optional parameter to json{b}_strip_nulls to allow removal of null array elements (Florents Tselai)
deprecatedModify some libpq function signatures to use int64_t (Thomas Munro) These previously used pg_int64, which is now deprecated.
securityAdd option --no-policies to disable row level security policy processing in pg_dump, pg_dumpall, pg_restore (Nikolay Samokhvalov) This is useful for migrating to systems with different policies.
deprecatedAdd pg_recvlogical option --enable-failover to specify failover slots (Hayato Kuroda) Also add option --enable-two-phase as a synonym for --two-phase, and deprecate the latter.
breakingRemove column pg_attribute.attcacheoff (David Rowley)
breakingRemove support for OpenSSL versions older than 1.1.1 (Daniel Gustafsson)
breakingRemove the experimental designation of Meson builds on Windows (Aleksander Alekseev)
breakingRemove configure options --disable-spinlocks and --disable-atomics (Thomas Munro) Thirty-two-bit atomic operations are now required.
breakingRemove support for the HPPA/PA-RISC architecture (Tom Lane)
+178 more items in the release notes
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 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…
fixFix incorrect join removal logic (Matheus Alcantara, Richard Guo) In edge cases, it was possible for a constant output value coming from within the nullable side of an outer join to not be replaced by NULL when it should be.
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…
+69 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 subscription names in pg_createsubscriber (Nathan Bossart) The given subscription name was inserted into SQL commands without quoting, so that SQL injection could be achieved in the (perhaps unlikely) case that the subscription name comes from an untrusted source. The PostgreSQL…
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…
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.
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)
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.
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 “no relation entry for relid 0” failure while estimating array lengths in set operations (Tender Wang)
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.
fixFix incremental JSON parser's handling of numeric tokens that cross input buffer boundaries (Andrew Dunstan) It was possible to accept an incorrectly-formatted number, leading to failures later.
fixFix excessive log output from idle slotsync worker processes (Zhijie Hou)
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 indexing of oldest-multixact arrays in shared memory (Yura Sokolov) This mistake could cause a prepared-but-not-yet-committed transaction's row locks to appear invisible to other sessions, or other visibility issues for the results of such a transaction. With a very small max_connections…
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.
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,…
+18 more items in the release notes
17.9 Feb 26, 2026 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…
17.8 Feb 12, 2026 Release notes ↗
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 erroneous counting of updates in EXPLAIN ANALYZE MERGE with a concurrent update (Dean Rasheed) This situation led to an incorrect count of “skipped” tuples in EXPLAIN's output, or to an assertion failure in an assert-enabled build.
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 incorrect handling of incremental backups of large tables (Robert Haas, Oleg Tkachenko) If a table exceeding 1GB (or in general, the installation's segment size) is truncated by VACUUM between the base backup and the incremental backup, pg_combinebackup could fail with an error about…
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.
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.
featureAllow retrying initialization of a DSM registry entry (Nathan Bossart) If we fail partway through initialization of a dynamic shared memory entry, allow the next attempt to use that entry to retry initialization. Previously the entry was left in a permanently-failed state.
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…
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…
fixFix logical replication slotsync worker processes to handle LOCK_TIMEOUT signals correctly (Zhijie Hou) Previously, timeout signals were effectively ignored.
fixFix possible failure with “unexpected data beyond EOF” during restart of a streaming replica server (Anthonin Bonnefoy)
fixFix error reporting for SQL/JSON path type mismatches (Jian He) The code could produce a “cache lookup failed for type 0” error instead of the intended complaint about the path expression not being of the right type.
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)
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)
fixFix incorrect error handling in pgbench with multiple \syncpipeline commands in pipeline mode (Yugo Nagata) If multiple \syncpipeline commands are encountered after a query error, pgbench would report “failed to exit pipeline mode”, or get an assertion failure in an assert-enabled build.
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.
+12 more items in the release notes
17.7 Nov 13, 2025 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…
fixAvoid potential use-after-free in parallel vacuum (Kevin Oommen Anish) This bug seems to have no consequences in standard builds, but it's theoretically a hazard.
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.…
fixFix dumping of non-inherited not-null constraints on inherited table columns (Dilip Kumar) pg_dump failed to preserve such constraints when dumping from a pre-v18 server.
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.
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…
+25 more items in the release notes
17.6 Aug 14, 2025 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 problems with concurrent updates (Dean Rasheed) If a MERGE inside a CTE attempts an update or delete on a table with BEFORE ROW triggers, and a concurrent UPDATE or DELETE changes the target row, the MERGE command would fail (crashing in the case of an update action, and potentially…
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…
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…
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…
breakingFix inconsistent spelling of LWLock names for MultiXactOffsetSLRU and MultiXactMemberSLRU (Bertrand Drouvot) This resulted in different wait-event names being displayed in pg_wait_events and pg_stat_activity, potentially breaking monitoring queries that join those views.
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 possible crash after out-of-memory when allocating large chunks with the “bump” allocator (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 PQcancelCreate() function for the case where the server's address was specified using hostaddr (Sergei Kornilov) libpq would crash if the resulting cancel object was actually used.
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”.
fixFix duplicate transaction replay when initializing a subscription with pg_createsubscriber (Shlok Kyal) It was possible for the last transaction processed during subscriber recovery to be sent again once normal replication begins.
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…
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…
featurePrevent assertion failure in contrib/pg_prewarm (Masahiro Ikeda) Applying pg_prewarm() 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.
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…
deprecatedAvoid deprecation warnings when building with libxml2 2.14 and later (Michael Paquier)
+31 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.
fixFix misprocessing of casts within the keys of JSON constructor expressions (Amit Langote)
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…
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.
fixFix erroneous deductions from column NOT NULL constraints in the presence of outer joins (Richard Guo) In some cases the planner would discard an IS NOT NULL query condition, even though the condition applies after an outer join and thus is not redundant.
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…
fixFix incorrect table size estimate with low fill factor (Tomas Vondra) When the planner estimates the number of rows in a never-yet-analyzed table, it uses the table's fillfactor setting in the estimation, but it neglected to clamp the result to at least one row per page. A low fillfactor could…
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)
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.
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)
fixFix over-enthusiastic freeing of SpecialJoinInfo structs during planning (Richard Guo) This led to crashes during planning if partitionwise joining is enabled.
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 crash in logical replication if the subscriber's partitioned table has a BRIN index (Tom Lane)
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…
fixFix order of operations in smgropen() (Andres Freund) Ensure that the SMgrRelation object is fully initialized before calling the smgr_open callback, so that it can be cleaned up properly if the callback fails.
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.
fixFix reindexdb's scheduling of parallel reindex operations (Alexander Korotkov) The original coding failed to achieve the expected amount of parallelism.
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 when an old version of libpq_fe.h is present in system include directories (Tom Lane)
fixFix build failure on macOS 15.4 (Tom Lane, Peter Eisentraut) This macOS update broke our configuration probe for strchrnul().
fixFix valgrind labeling of per-buffer data of read streams (Thomas Munro) This affects no core code in released versions of PostgreSQL, but an extension using the per-buffer data feature might have encountered spurious failures when being tested under valgrind.
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.
+21 more items in the release notes
17.4 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 small memory leak in pg_createsubscriber (Ranier Vilela)
fixFix meson build system to correctly detect availability of the bsd_auth.h system header (Nazir Bilal Yavuz)
17.3 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…
otherRestore auto-truncation of database and user names appearing in connection requests (Nathan Bossart) This reverts a v17 change that proved to cause trouble for some users. Over-length names should be truncated in an encoding-aware fashion, but for now just return to the former behavior of blind…
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 failure to return all matching tuples for a btree index scan with a ScalarArrayOp (= ANY) condition (Peter Geoghegan)
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.
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.
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.
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 pg_get_constraintdef's support for NOT NULL constraints on domains (Álvaro Herrera)
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.
fixFix planning of pre-sorted UNION operations for cases where the input column datatypes don't all match (David Rowley) This error could lead to sorting data with the wrong sort operator, with consequences ranging from no visible problem to core dumps.
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…
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.
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)
fixAvoid crash when a background process tries to check a new value of synchronized_standby_slots (Álvaro Herrera)
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.
fixAvoid potential use-after-free in parallel vacuum (Vallimaharajan G, John Naylor) This bug seems to have no consequences in standard builds, but it's theoretically a hazard.
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)
fixAvoid crash if a server process tried to iterate over a shared radix tree that it didn't create (Masahiko Sawada) There is no code in core PostgreSQL that does this, but an extension might wish to.
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.
featureAdd psql tab completion for COPY (MERGE INTO) (Jian He)
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…
fixDetect version mismatch between contrib/pageinspect's SQL declarations and the underlying shared library (Tomas Vondra) Previously, such a mismatch could result in a crash while calling brin_page_items(). Instead throw an error recommending updating the extension.
fixWhen trying to cancel a remote query in contrib/postgres_fdw, re-issue the cancel request a few times if it didn't seem to do anything (Tom Lane) This fixes a race condition where we might try to cancel a just-sent query before the remote server has started to process it, so that the initial…
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)
+31 more items in the release notes
17.2 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