PostgreSQL 17.9 → 19.0
11 releases · 20 breaking changes · 182 security fixes · 36 advisories fixed
182security20breaking5deprecated91feature105fix
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,…
Breaking changes
- breaking Remove RADIUS support (Thomas Munro) PostgreSQL only supported RADIUS over UDP, which is unfixably insecure. in 19.0
- breaking Force standard_conforming_strings to always be on in the database server (Tom Lane) Dumps created using pre-PostgreSQL 19 versions of pg_dump or pg_dumpall, and using standard_conforming_strings = off, will not properly load into PostgreSQL 19 and later servers. Users should create dumps using… in 19.0
- breaking Remove server variable io_workers (Thomas Munro) This has been replaced by four new variables; see Section E.1.3.1.2. in 19.0
- breaking Remove wait event BufferContent and add more precise wait events BufferShared, BufferShareExclusive, and BufferExclusive (Andres Freund) in 19.0
- breaking Remove optimizer hook get_relation_info_hook and add better-placed hook build_simple_rel_hook (Robert Haas) in 19.0
- breaking Remove MULE_INTERNAL encoding (Thomas Munro) This encoding was complex and rarely used. Databases using it will need to be dumped and restored with a different encoding. in 19.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 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
Security changes
- security Disallow carriage returns and line feeds in database, role, and tablespace names (Mahendra Singh Thalor) pg_upgrade will also disallow upgrading of clusters that use such names. This was changed to avoid security problems. in 19.0
- security Add defenses against problems caused by altering composite types concurrently with operations on data of those types (Heikki Linnakangas, Andres Freund, Nathan Bossart, Nikhil Sontakke) Operations such as ALTER TABLE ... ALTER COLUMN TYPE are hazardous because tuples of the older row layout may… in 18.7
- security Cope with concurrent rowtype changes in ExecEvalFieldStore[De]Form() (Tomas Vondra, Heikki Linnakangas) The PostgreSQL Project thanks OpenAI Codex Security, Bronson Yen, Mehmet Ince, Claude and Ada Logics for reporting this problem. (CVE-2026-116306) in 18.7
- security Guard against malicious alteration of a table while a statistics import function is running on it (Masahiko Sawada) Previously it was possible to store statistics that no longer match the table, leading to crashes or other problems later. The PostgreSQL Project thanks Mehmet Ince for reporting… in 18.7
- security Enforce view row visibility in INSERT ... ON CONFLICT (Peter Geoghegan, Zsolt Parragi) When applied to a view, INSERT ... ON CONFLICT DO UPDATE could update rows that should be hidden by the view's WHERE clause. Although it was documented, this behavior is surely unexpected, and it gives rise to… in 18.7
- security Align REASSIGN OWNED's caller-privilege checks with ALTER ... OWNER TO's checks (Zsolt Parragi) Since v16, giving an object to another role requires the ability to SET ROLE to that role. However, a role granted INHERIT TRUE, SET FALSE could bypass that via REASSIGN OWNED. A role granted INHERIT… in 18.7
- security Fix use-after-free in COPY FROM ON_ERROR reporting (Masahiko Sawada) An error report raised in COPY FROM could disclose server memory. The PostgreSQL Project thanks Jiyong Ahn, Claude and Ada Logics for reporting this problem. (CVE-2026-116310) in 18.7
- security Disallow closing a portal that is still being set up (Michael Paquier) This change forestalls various use-after-free issues. The PostgreSQL Project thanks Tomas Vondra for reporting this problem. (CVE-2026-116332) in 18.7
- security Forcibly close portals associated with transition tables at the end of the trigger function (Jeff Davis) This change avoids use-after-free hazards. The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-120143) in 18.7
- security Fix race condition leading to use-after-free in shared tupledesc management (Robert Haas) The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-116304) in 18.7
- security Fix use-after-free in pg_show_all_settings() (Masahiko Sawada) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120152) in 18.7
- security Fix use-after-free in expanded-record domain constraint checking (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120150) in 18.7
- security Prevent memory corruption after a large allocation in a “generation” memory context is freed (Heikki Linnakangas) The PostgreSQL Project thanks Jayden Sarveshkumar for reporting this problem. (CVE-2026-116328) in 18.7
- security Fix buffer overrun in tsvector_delete() (Anthropic OSS program) With crafted input, tsvector_delete() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116315) in 18.7
- security Fix buffer overrun in ts_rank_cd() (Anthropic OSS program) With crafted input, ts_rank_cd() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116317) in 18.7
- security Prevent construction of invalid name values via element assignment (Tom Lane) array_set_element() could be abused to make the last byte of a name-type value nonzero. Subsequent uses of the value would then read past the end, resulting in crashes or disclosure of server memory. While at it,… in 18.7
- security Treat application of a leaky function to a CaseTestExpr or internal Param node as leaky (Tom Lane) A CaseTestExpr or internal Param represents the value of an expression somewhere else in the query. If that expression contains a Var then there is potential for information leakage. Therefore,… in 18.7
- security Don't generate an index-based plan for an aggregate whose input and output types don't match (Tom Lane) Previously, we'd blindly do this if the aggregate has a SORTOP option attached. The index-based plan will return the aggregate's input column, leading to type violations and potentially to… in 18.7
- security Delay processing of cancel request packets until it's safe to handle them (Michael Paquier) With luck and good timing, an attacker could induce the process receiving a cancel request packet to exit while holding a spinlock, thereby causing a database crash and restart. The PostgreSQL Project… in 18.7
- security Avoid inserting the wrong tuple into a trigger transition table in a MERGE that does an INSERT followed by an UPDATE (Heikki Linnakangas, Jacek Bylina, Jacob Robertson, Nigel Gott) The PostgreSQL Project thanks Jacek Bylina, Timothy Ball, Claude and Ada Logics for reporting this problem.… in 18.7
- security Check that commutator and negator operator pairs return the same data type (Tom Lane) Previously, substitution of a commutator or negator operator could lead to a type violation. This patch also cleans up some cases where one operator had a commutator/negator link to another, but the second… in 18.7
- security Prevent functions in index predicates and expressions from breaking REINDEX CONCURRENTLY by manipulating the indexes (Michael Paquier) The PostgreSQL Project thanks Florent Saudel for reporting this problem. (CVE-2026-116336) in 18.7
- security Prevent corrupting a newly-installed extension by renaming its target schema during CREATE EXTENSION or by installing it into a temporary schema (Noah Misch) With some ingenuity, an attacker could substitute objects of his creation for objects in the extension. The PostgreSQL Project thanks Noah… in 18.7
- security Reject more unsafe names in extension script substitutions (Nathan Bossart) We already rejected schema and owner names containing quotes, backslashes, and dollar signs, but names containing newlines, carriage returns, comment delimiters, or the substitution tokens themselves can still achieve SQL… in 18.7
- security Check EXECUTE privilege before calling cast functions within to_json() and other conversion-to-JSON code (Nathan Bossart, Anthropic OSS program) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL… in 18.7
- security Check EXECUTE privilege before calling cast functions within foreign key enforcement checks (Nathan Bossart) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL Project thanks Noah Misch for reporting… in 18.7
- security Prevent DROP OWNED BY from changing row-level security policies on tables that the current user does not own (Zsolt Parragi, Anthropic OSS program) Previously, an unprivileged role could remove itself from restrictive policies on tables it does not own. Instead issue a warning, as is already done… in 18.7
- security Disallow security-restricted operations from creating types in temporary schemas (Anthropic OSS program, Nathan Bossart) We already disallowed creating temporary tables in this context, but a type also presents a hazard of shadowing permanent objects and thus allowing privilege escalation. The… in 18.7
- security Avoid out-of-bounds accesses in FDW batch inserts (Nathan Bossart) The PostgreSQL Project thanks Sumedh Pathak and Sven Klemm for reporting this problem. (CVE-2026-120149) in 18.7
- security Avoid out-of-bounds reads in parallel btree scans with array keys (Nathan Bossart) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-116333) in 18.7
- security Replace the type cache's in_progress_list mechanism with something simpler and safer (Robert Haas) The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-120144) in 18.7
- security Refuse to create extended statistics on expressions of transient types (Masahiko Sawada) Disallow CREATE STATISTICS on expressions whose types would not be allowed as table column types, most notably anonymous record types. This prevents other sessions from misinterpreting the stored values. The… in 18.7
- security Reject system catalogs as logical replication targets (Masahiko Sawada) The PostgreSQL Project thanks Qian Zhang for reporting this problem. (CVE-2026-120145) in 18.7
- security Check ON CONFLICT target row against RLS policies before applying user quals (Peter Geoghegan, Zsolt Parragi) Previously, leaky qual expressions could see rows that RLS policies should forbid them from seeing. The PostgreSQL Project thanks Peter Geoghegan, Zsolt Parragi, Only see myself, the… in 18.7
- security Validate all connection options in replication subscriptions and contrib/dblink (Jacob Champion) Previously, these checks were applied inconsistently. The PostgreSQL Project thanks Andrey Krasichkov, Bashir Altawil, and Zsolt Parragi for reporting this problem. (CVE-2026-14661) in 18.7
- security Handle dropped columns safely while comparing row types (Peter Geoghegan) Previously, two row types that had dropped columns at the same position could be considered equal even if those columns were of different physical widths. That leads to problems when trying to deconstruct tuples of those… in 18.7
- security Disallow declaring SQL functions as returning type "any" (Peter Geoghegan) This allowed type violations. The PostgreSQL Project thanks Peter Geoghegan, Claude and Ada Logics for reporting this problem. (CVE-2026-18447) in 18.7
- security Harden more memory-size calculations against integer overflow (Álvaro Herrera) The PostgreSQL Project thanks Hillai Ben Sasson, Jayden Sarveshkumar, and Mehmet Ince for reporting this problem. (CVE-2026-120139) in 18.7
- security Fix type confusion in set-returning functions that return RECORD, when materialized in a query's target list (Melanie Plageman, Robert Haas) The same tuple descriptor was used across multiple calls, which is unsafe since the actual record type could vary. The PostgreSQL Project thanks Peter… in 18.7
- security Cope with concurrent rowtype changes in PL/pgSQL record field assignment (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120151) in 18.7
- security Support “tied” Perl objects in PL/Perl and associated contrib modules (Andrey Rachitskiy) Up to now, if you passed a tied object to a PL/Perl operation, it would most likely get treated as undef, since we failed to perform Perl get magic on values we're passed. Tied hashes worked partially, in… in 18.7
- 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 Add defenses against problems caused by altering composite types concurrently with operations on data of those types (Heikki Linnakangas, Andres Freund, Nathan Bossart, Nikhil Sontakke) Operations such as ALTER TABLE ... ALTER COLUMN TYPE are hazardous because tuples of the older row layout may… in 17.12
- security Cope with concurrent rowtype changes in ExecEvalFieldStore[De]Form() (Tomas Vondra, Heikki Linnakangas) The PostgreSQL Project thanks OpenAI Codex Security, Bronson Yen, Mehmet Ince, Claude and Ada Logics for reporting this problem. (CVE-2026-116306) in 17.12
- security Enforce view row visibility in INSERT ... ON CONFLICT (Peter Geoghegan, Zsolt Parragi) When applied to a view, INSERT ... ON CONFLICT DO UPDATE could update rows that should be hidden by the view's WHERE clause. Although it was documented, this behavior is surely unexpected, and it gives rise to… in 17.12
- security Align REASSIGN OWNED's caller-privilege checks with ALTER ... OWNER TO's checks (Zsolt Parragi) Since v16, giving an object to another role requires the ability to SET ROLE to that role. However, a role granted INHERIT TRUE, SET FALSE could bypass that via REASSIGN OWNED. A role granted INHERIT… in 17.12
- security Fix use-after-free in COPY FROM ON_ERROR reporting (Masahiko Sawada) An error report raised in COPY FROM could disclose server memory. The PostgreSQL Project thanks Jiyong Ahn, Claude and Ada Logics for reporting this problem. (CVE-2026-116310) in 17.12
- security Disallow closing a portal that is still being set up (Michael Paquier) This change forestalls various use-after-free issues. The PostgreSQL Project thanks Tomas Vondra for reporting this problem. (CVE-2026-116332) in 17.12
- security Forcibly close portals associated with transition tables at the end of the trigger function (Jeff Davis) This change avoids use-after-free hazards. The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-120143) in 17.12
- security Fix race condition leading to use-after-free in shared tupledesc management (Robert Haas) The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-116304) in 17.12
- security Fix use-after-free in pg_show_all_settings() (Masahiko Sawada) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120152) in 17.12
- security Fix use-after-free in expanded-record domain constraint checking (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120150) in 17.12
- security Prevent memory corruption after a large allocation in a “generation” memory context is freed (Heikki Linnakangas) The PostgreSQL Project thanks Jayden Sarveshkumar for reporting this problem. (CVE-2026-116328) in 17.12
- security Fix buffer overrun in tsvector_delete() (Anthropic OSS program) With crafted input, tsvector_delete() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116315) in 17.12
- security Fix buffer overrun in ts_rank_cd() (Anthropic OSS program) With crafted input, ts_rank_cd() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116317) in 17.12
- security Prevent construction of invalid name values via element assignment (Tom Lane) array_set_element() could be abused to make the last byte of a name-type value nonzero. Subsequent uses of the value would then read past the end, resulting in crashes or disclosure of server memory. While at it,… in 17.12
- security Treat application of a leaky function to a CaseTestExpr or internal Param node as leaky (Tom Lane) A CaseTestExpr or internal Param represents the value of an expression somewhere else in the query. If that expression contains a Var then there is potential for information leakage. Therefore,… in 17.12
- security Don't generate an index-based plan for an aggregate whose input and output types don't match (Tom Lane) Previously, we'd blindly do this if the aggregate has a SORTOP option attached. The index-based plan will return the aggregate's input column, leading to type violations and potentially to… in 17.12
- security Avoid inserting the wrong tuple into a trigger transition table in a MERGE that does an INSERT followed by an UPDATE (Heikki Linnakangas, Jacek Bylina, Jacob Robertson, Nigel Gott) The PostgreSQL Project thanks Jacek Bylina, Timothy Ball, Claude and Ada Logics for reporting this problem.… in 17.12
- security Check that commutator and negator operator pairs return the same data type (Tom Lane) Previously, substitution of a commutator or negator operator could lead to a type violation. This patch also cleans up some cases where one operator had a commutator/negator link to another, but the second… in 17.12
- security Prevent functions in index predicates and expressions from breaking REINDEX CONCURRENTLY by manipulating the indexes (Michael Paquier) The PostgreSQL Project thanks Florent Saudel for reporting this problem. (CVE-2026-116336) in 17.12
- security Prevent corrupting a newly-installed extension by renaming its target schema during CREATE EXTENSION or by installing it into a temporary schema (Noah Misch) With some ingenuity, an attacker could substitute objects of his creation for objects in the extension. The PostgreSQL Project thanks Noah… in 17.12
- security Reject more unsafe names in extension script substitutions (Nathan Bossart) We already rejected schema and owner names containing quotes, backslashes, and dollar signs, but names containing newlines, carriage returns, comment delimiters, or the substitution tokens themselves can still achieve SQL… in 17.12
- security Check EXECUTE privilege before calling cast functions within to_json() and other conversion-to-JSON code (Nathan Bossart, Anthropic OSS program) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL… in 17.12
- security Check EXECUTE privilege before calling cast functions within foreign key enforcement checks (Nathan Bossart) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL Project thanks Noah Misch for reporting… in 17.12
- security Prevent DROP OWNED BY from changing row-level security policies on tables that the current user does not own (Zsolt Parragi, Anthropic OSS program) Previously, an unprivileged role could remove itself from restrictive policies on tables it does not own. Instead issue a warning, as is already done… in 17.12
- security Disallow security-restricted operations from creating types in temporary schemas (Anthropic OSS program, Nathan Bossart) We already disallowed creating temporary tables in this context, but a type also presents a hazard of shadowing permanent objects and thus allowing privilege escalation. The… in 17.12
- security Avoid out-of-bounds accesses in FDW batch inserts (Nathan Bossart) The PostgreSQL Project thanks Sumedh Pathak and Sven Klemm for reporting this problem. (CVE-2026-120149) in 17.12
- security Avoid out-of-bounds reads in parallel btree scans with array keys (Nathan Bossart) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-116333) in 17.12
- security Refuse to create extended statistics on expressions of transient types (Masahiko Sawada) Disallow CREATE STATISTICS on expressions whose types would not be allowed as table column types, most notably anonymous record types. This prevents other sessions from misinterpreting the stored values. The… in 17.12
- security Reject system catalogs as logical replication targets (Masahiko Sawada) The PostgreSQL Project thanks Qian Zhang for reporting this problem. (CVE-2026-120145) in 17.12
- security Check ON CONFLICT target row against RLS policies before applying user quals (Peter Geoghegan, Zsolt Parragi) Previously, leaky qual expressions could see rows that RLS policies should forbid them from seeing. The PostgreSQL Project thanks Peter Geoghegan, Zsolt Parragi, Only see myself, the… in 17.12
- security Validate all connection options in replication subscriptions and contrib/dblink (Jacob Champion) Previously, these checks were applied inconsistently. The PostgreSQL Project thanks Andrey Krasichkov, Bashir Altawil, and Zsolt Parragi for reporting this problem. (CVE-2026-14661) in 17.12
- security Handle dropped columns safely while comparing row types (Peter Geoghegan) Previously, two row types that had dropped columns at the same position could be considered equal even if those columns were of different physical widths. That leads to problems when trying to deconstruct tuples of those… in 17.12
- security Disallow declaring SQL functions as returning type "any" (Peter Geoghegan) This allowed type violations. The PostgreSQL Project thanks Peter Geoghegan, Claude and Ada Logics for reporting this problem. (CVE-2026-18447) in 17.12
- security Harden more memory-size calculations against integer overflow (Álvaro Herrera) The PostgreSQL Project thanks Hillai Ben Sasson, Jayden Sarveshkumar, and Mehmet Ince for reporting this problem. (CVE-2026-120139) in 17.12
- security Fix type confusion in set-returning functions that return RECORD, when materialized in a query's target list (Melanie Plageman, Robert Haas) The same tuple descriptor was used across multiple calls, which is unsafe since the actual record type could vary. The PostgreSQL Project thanks Peter… in 17.12
- security Cope with concurrent rowtype changes in PL/pgSQL record field assignment (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120151) in 17.12
- security Support “tied” Perl objects in PL/Perl and associated contrib modules (Andrey Rachitskiy) Up to now, if you passed a tied object to a PL/Perl operation, it would most likely get treated as undef, since we failed to perform Perl get magic on values we're passed. Tied hashes worked partially, in… in 17.12
- security Fix PL/Perl to cope with errors thrown from tied objects (Tom Lane, Andrew Dunstan) The PostgreSQL Project thanks Ngoc Tran, the Anthropic OSS program, and Dwij Mehta for reporting this problem. (CVE-2026-116326) in 17.12
- security Fix type confusion in PL/Perl's get_perl_array_ref() (Andrew Dunstan) The PostgreSQL Project thanks Zheng Yu for reporting this problem. (CVE-2026-116309) in 17.12
- security Fix use-after-free in scans of Perl arrays and hashes (Tom Lane, Anthropic OSS program) The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116320) in 17.12
- 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
Deprecations
- deprecated Issue a warning after successful MD5 password authentication (Nathan Bossart) The warning can be disabled via server variable md5_password_warnings. MD5 passwords were marked as deprecated in PostgreSQL 18. in 19.0
- deprecated Allow pg_verifybackup to read WAL files stored in tar archives (Amul Sul) Add option --wal-path as an alias for the existing and deprecated --wal-directory option. in 19.0
- 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
Every release in between
featureNew REPACK command that reclaims disk space and reorganizes table contents, which can improve query performance. REPACK (CONCURRENTLY) allows repacking without blocking reads and writes to the table.
featureSupport for “read-your-writes” consistency on standbys via the new WAIT command.
featureParallel autovacuum of table indexes and autovacuum prioritization through a new scoring system.
featureAdd server variable password_expiration_warning_threshold to warn about password expiration (Gilles Darold, Nathan Bossart) The default warning period is seven days.
deprecatedIssue a warning after successful MD5 password authentication (Nathan Bossart) The warning can be disabled via server variable md5_password_warnings. MD5 passwords were marked as deprecated in PostgreSQL 18.
breakingRemove RADIUS support (Thomas Munro) PostgreSQL only supported RADIUS over UDP, which is unfixably insecure.
breakingForce standard_conforming_strings to always be on in the database server (Tom Lane) Dumps created using pre-PostgreSQL 19 versions of pg_dump or pg_dumpall, and using standard_conforming_strings = off, will not properly load into PostgreSQL 19 and later servers. Users should create dumps using…
securityDisallow carriage returns and line feeds in database, role, and tablespace names (Mahendra Singh Thalor) pg_upgrade will also disallow upgrading of clusters that use such names. This was changed to avoid security problems.
breakingRemove server variable io_workers (Thomas Munro) This has been replaced by four new variables; see Section E.1.3.1.2.
breakingRemove wait event BufferContent and add more precise wait events BufferShared, BufferShareExclusive, and BufferExclusive (Andres Freund)
breakingRemove optimizer hook get_relation_info_hook and add better-placed hook build_simple_rel_hook (Robert Haas)
breakingRemove MULE_INTERNAL encoding (Thomas Munro) This encoding was complex and rarely used. Databases using it will need to be dumped and restored with a different encoding.
featureAllow NOT IN clauses to be converted to more efficient ANTI JOINs when NULLs are not present (Richard Guo)
featureAllow more LEFT JOINs to be converted to ANTI JOINs (Tender Wang, Richard Guo)
featureAllow use of Memoize for ANTI JOINs with unique inner sides (Richard Guo)
featureAllow some aggregate processing to be performed before joins (Richard Guo, Antonin Houska) This can reduce the number of rows needed to be processed.
featureAllow Append and MergeAppend to consider explicit incremental sorts (Richard Guo)
featurePerform earlier constant folding of var IS [NOT] NULL in the optimizer (Richard Guo) This allows for later optimizations.
featureAdd proper optimizer statistics for functions returning boolean values (Tom Lane)
featureAllow extended statistics on virtual generated columns (Yugo Nagata)
featureAllow function pg_restore_extended_stats() to restore optimizer extended statistics (Corey Huinker, Michael Paquier, Chao Li)
featureAdd function pg_clear_extended_stats() to remove extended statistics (Corey Huinker, Michael Paquier)
featureAllow negative values of pg_aggregate.aggtransspace to indicate unbounded memory usage (Richard Guo) This information is used by the optimizer in planning memory usage.
featureAllow io_method method worker to automatically control needed background workers (Thomas Munro) The new server variables are io_min_workers, io_max_workers, io_worker_idle_timeout, and io_worker_launch_interval.
featureAllow query table scans to mark pages as all-visible in the visibility map (Melanie Plageman) Previously only VACUUM and COPY ... FREEZE could do this.
featureAllow autovacuum to use parallel autovacuum workers (Daniil Davydov) The maximum number of workers is controlled by server variable autovacuum_max_parallel_workers and per-table storage parameter autovacuum_parallel_workers.
featureAllow TID Range Scans to be parallelized (Cary Huang, David Rowley)
featureAdd system view pg_stat_lock and function pg_stat_get_lock() to report per-lock-type statistics (Bertrand Drouvot)
featureAdd system view pg_stat_recovery to report recovery status (Xuneng Zhou, Shinya Kato)
featureAdd system view pg_stat_progress_repack to report the progress of REPACK, CLUSTER, and VACUUM FULL (Álvaro Herrera)
featureAdd system view pg_stat_autovacuum_scores to report per-table autovacuum details (Sami Imseih)
featureAdd vacuum initiation details to system view pg_stat_progress_vacuum (Shinya Kato) The new started_by column reports the initiator of the vacuum, and mode indicates its aggressiveness.
featureAdd analyze initiation details to system view pg_stat_progress_analyze (Shinya Kato) The new started_by column reports the initiator of the analyze.
featureAdd system view pg_dsm_registry_allocations to report dynamic shared memory details (Florents Tselai, Nathan Bossart)
featureAdd mem_exceeded_count column to system view pg_stat_replication_slots (Bertrand Drouvot) This reports the number of times that logical_decoding_work_mem was exceeded.
featureAdd slot synchronization skip information to pg_stat_replication_slots and pg_replication_slots (Shlok Kyal) The new columns are slotsync_skip_count, slotsync_last_skip, and slotsync_skip_reason.
featureAdd update_deleted column to system view pg_stat_subscription_stats (Zhijie Hou) This reports the number of rows where updates were ignored due to concurrent deletes. This requires the subscriber have retain_dead_tuples enabled.
featureAdd sync_seq_error_count column to system view pg_stat_subscription_stats to report sequence synchronization errors (Vignesh C)
featureAdd stats_reset column to system views pg_stat_all_tables, pg_stat_all_indexes, and pg_statio_all_sequences (Bertrand Drouvot, Sami Imseih, Shihao Zhong) It also appears in the sys and user view variants.
deprecatedAllow pg_verifybackup to read WAL files stored in tar archives (Amul Sul) Add option --wal-path as an alias for the existing and deprecated --wal-directory option.
+167 more items in the release notessecurityAdd defenses against problems caused by altering composite types concurrently with operations on data of those types (Heikki Linnakangas, Andres Freund, Nathan Bossart, Nikhil Sontakke) Operations such as ALTER TABLE ... ALTER COLUMN TYPE are hazardous because tuples of the older row layout may…
securityCope with concurrent rowtype changes in ExecEvalFieldStore[De]Form() (Tomas Vondra, Heikki Linnakangas) The PostgreSQL Project thanks OpenAI Codex Security, Bronson Yen, Mehmet Ince, Claude and Ada Logics for reporting this problem. (CVE-2026-116306)
securityGuard against malicious alteration of a table while a statistics import function is running on it (Masahiko Sawada) Previously it was possible to store statistics that no longer match the table, leading to crashes or other problems later. The PostgreSQL Project thanks Mehmet Ince for reporting…
securityEnforce view row visibility in INSERT ... ON CONFLICT (Peter Geoghegan, Zsolt Parragi) When applied to a view, INSERT ... ON CONFLICT DO UPDATE could update rows that should be hidden by the view's WHERE clause. Although it was documented, this behavior is surely unexpected, and it gives rise to…
securityAlign REASSIGN OWNED's caller-privilege checks with ALTER ... OWNER TO's checks (Zsolt Parragi) Since v16, giving an object to another role requires the ability to SET ROLE to that role. However, a role granted INHERIT TRUE, SET FALSE could bypass that via REASSIGN OWNED. A role granted INHERIT…
securityFix use-after-free in COPY FROM ON_ERROR reporting (Masahiko Sawada) An error report raised in COPY FROM could disclose server memory. The PostgreSQL Project thanks Jiyong Ahn, Claude and Ada Logics for reporting this problem. (CVE-2026-116310)
securityDisallow closing a portal that is still being set up (Michael Paquier) This change forestalls various use-after-free issues. The PostgreSQL Project thanks Tomas Vondra for reporting this problem. (CVE-2026-116332)
securityForcibly close portals associated with transition tables at the end of the trigger function (Jeff Davis) This change avoids use-after-free hazards. The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-120143)
securityFix race condition leading to use-after-free in shared tupledesc management (Robert Haas) The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-116304)
securityFix use-after-free in pg_show_all_settings() (Masahiko Sawada) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120152)
securityFix use-after-free in expanded-record domain constraint checking (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120150)
securityPrevent memory corruption after a large allocation in a “generation” memory context is freed (Heikki Linnakangas) The PostgreSQL Project thanks Jayden Sarveshkumar for reporting this problem. (CVE-2026-116328)
securityFix buffer overrun in tsvector_delete() (Anthropic OSS program) With crafted input, tsvector_delete() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116315)
securityFix buffer overrun in ts_rank_cd() (Anthropic OSS program) With crafted input, ts_rank_cd() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116317)
securityPrevent construction of invalid name values via element assignment (Tom Lane) array_set_element() could be abused to make the last byte of a name-type value nonzero. Subsequent uses of the value would then read past the end, resulting in crashes or disclosure of server memory. While at it,…
securityTreat application of a leaky function to a CaseTestExpr or internal Param node as leaky (Tom Lane) A CaseTestExpr or internal Param represents the value of an expression somewhere else in the query. If that expression contains a Var then there is potential for information leakage. Therefore,…
securityDon't generate an index-based plan for an aggregate whose input and output types don't match (Tom Lane) Previously, we'd blindly do this if the aggregate has a SORTOP option attached. The index-based plan will return the aggregate's input column, leading to type violations and potentially to…
securityDelay processing of cancel request packets until it's safe to handle them (Michael Paquier) With luck and good timing, an attacker could induce the process receiving a cancel request packet to exit while holding a spinlock, thereby causing a database crash and restart. The PostgreSQL Project…
securityAvoid inserting the wrong tuple into a trigger transition table in a MERGE that does an INSERT followed by an UPDATE (Heikki Linnakangas, Jacek Bylina, Jacob Robertson, Nigel Gott) The PostgreSQL Project thanks Jacek Bylina, Timothy Ball, Claude and Ada Logics for reporting this problem.…
securityCheck that commutator and negator operator pairs return the same data type (Tom Lane) Previously, substitution of a commutator or negator operator could lead to a type violation. This patch also cleans up some cases where one operator had a commutator/negator link to another, but the second…
securityPrevent functions in index predicates and expressions from breaking REINDEX CONCURRENTLY by manipulating the indexes (Michael Paquier) The PostgreSQL Project thanks Florent Saudel for reporting this problem. (CVE-2026-116336)
securityPrevent corrupting a newly-installed extension by renaming its target schema during CREATE EXTENSION or by installing it into a temporary schema (Noah Misch) With some ingenuity, an attacker could substitute objects of his creation for objects in the extension. The PostgreSQL Project thanks Noah…
securityReject more unsafe names in extension script substitutions (Nathan Bossart) We already rejected schema and owner names containing quotes, backslashes, and dollar signs, but names containing newlines, carriage returns, comment delimiters, or the substitution tokens themselves can still achieve SQL…
securityCheck EXECUTE privilege before calling cast functions within to_json() and other conversion-to-JSON code (Nathan Bossart, Anthropic OSS program) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL…
securityCheck EXECUTE privilege before calling cast functions within foreign key enforcement checks (Nathan Bossart) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL Project thanks Noah Misch for reporting…
securityPrevent DROP OWNED BY from changing row-level security policies on tables that the current user does not own (Zsolt Parragi, Anthropic OSS program) Previously, an unprivileged role could remove itself from restrictive policies on tables it does not own. Instead issue a warning, as is already done…
securityDisallow security-restricted operations from creating types in temporary schemas (Anthropic OSS program, Nathan Bossart) We already disallowed creating temporary tables in this context, but a type also presents a hazard of shadowing permanent objects and thus allowing privilege escalation. The…
securityAvoid out-of-bounds accesses in FDW batch inserts (Nathan Bossart) The PostgreSQL Project thanks Sumedh Pathak and Sven Klemm for reporting this problem. (CVE-2026-120149)
securityAvoid out-of-bounds reads in parallel btree scans with array keys (Nathan Bossart) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-116333)
securityReplace the type cache's in_progress_list mechanism with something simpler and safer (Robert Haas) The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-120144)
securityRefuse to create extended statistics on expressions of transient types (Masahiko Sawada) Disallow CREATE STATISTICS on expressions whose types would not be allowed as table column types, most notably anonymous record types. This prevents other sessions from misinterpreting the stored values. The…
securityReject system catalogs as logical replication targets (Masahiko Sawada) The PostgreSQL Project thanks Qian Zhang for reporting this problem. (CVE-2026-120145)
securityCheck ON CONFLICT target row against RLS policies before applying user quals (Peter Geoghegan, Zsolt Parragi) Previously, leaky qual expressions could see rows that RLS policies should forbid them from seeing. The PostgreSQL Project thanks Peter Geoghegan, Zsolt Parragi, Only see myself, the…
securityValidate all connection options in replication subscriptions and contrib/dblink (Jacob Champion) Previously, these checks were applied inconsistently. The PostgreSQL Project thanks Andrey Krasichkov, Bashir Altawil, and Zsolt Parragi for reporting this problem. (CVE-2026-14661)
securityHandle dropped columns safely while comparing row types (Peter Geoghegan) Previously, two row types that had dropped columns at the same position could be considered equal even if those columns were of different physical widths. That leads to problems when trying to deconstruct tuples of those…
securityDisallow declaring SQL functions as returning type "any" (Peter Geoghegan) This allowed type violations. The PostgreSQL Project thanks Peter Geoghegan, Claude and Ada Logics for reporting this problem. (CVE-2026-18447)
securityHarden more memory-size calculations against integer overflow (Álvaro Herrera) The PostgreSQL Project thanks Hillai Ben Sasson, Jayden Sarveshkumar, and Mehmet Ince for reporting this problem. (CVE-2026-120139)
securityFix type confusion in set-returning functions that return RECORD, when materialized in a query's target list (Melanie Plageman, Robert Haas) The same tuple descriptor was used across multiple calls, which is unsafe since the actual record type could vary. The PostgreSQL Project thanks Peter…
securityCope with concurrent rowtype changes in PL/pgSQL record field assignment (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120151)
securitySupport “tied” Perl objects in PL/Perl and associated contrib modules (Andrey Rachitskiy) Up to now, if you passed a tied object to a PL/Perl operation, it would most likely get treated as undef, since we failed to perform Perl get magic on values we're passed. Tied hashes worked partially, in…
+160 more items in the release notessecurityRestrict 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 notessecurityPrevent 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 notesfixFix 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…
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 notessecurityCheck 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 notesfeatureSupport 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 notessecurityAdd defenses against problems caused by altering composite types concurrently with operations on data of those types (Heikki Linnakangas, Andres Freund, Nathan Bossart, Nikhil Sontakke) Operations such as ALTER TABLE ... ALTER COLUMN TYPE are hazardous because tuples of the older row layout may…
securityCope with concurrent rowtype changes in ExecEvalFieldStore[De]Form() (Tomas Vondra, Heikki Linnakangas) The PostgreSQL Project thanks OpenAI Codex Security, Bronson Yen, Mehmet Ince, Claude and Ada Logics for reporting this problem. (CVE-2026-116306)
securityEnforce view row visibility in INSERT ... ON CONFLICT (Peter Geoghegan, Zsolt Parragi) When applied to a view, INSERT ... ON CONFLICT DO UPDATE could update rows that should be hidden by the view's WHERE clause. Although it was documented, this behavior is surely unexpected, and it gives rise to…
securityAlign REASSIGN OWNED's caller-privilege checks with ALTER ... OWNER TO's checks (Zsolt Parragi) Since v16, giving an object to another role requires the ability to SET ROLE to that role. However, a role granted INHERIT TRUE, SET FALSE could bypass that via REASSIGN OWNED. A role granted INHERIT…
securityFix use-after-free in COPY FROM ON_ERROR reporting (Masahiko Sawada) An error report raised in COPY FROM could disclose server memory. The PostgreSQL Project thanks Jiyong Ahn, Claude and Ada Logics for reporting this problem. (CVE-2026-116310)
securityDisallow closing a portal that is still being set up (Michael Paquier) This change forestalls various use-after-free issues. The PostgreSQL Project thanks Tomas Vondra for reporting this problem. (CVE-2026-116332)
securityForcibly close portals associated with transition tables at the end of the trigger function (Jeff Davis) This change avoids use-after-free hazards. The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-120143)
securityFix race condition leading to use-after-free in shared tupledesc management (Robert Haas) The PostgreSQL Project thanks Peter Geoghegan for reporting this problem. (CVE-2026-116304)
securityFix use-after-free in pg_show_all_settings() (Masahiko Sawada) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120152)
securityFix use-after-free in expanded-record domain constraint checking (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120150)
securityPrevent memory corruption after a large allocation in a “generation” memory context is freed (Heikki Linnakangas) The PostgreSQL Project thanks Jayden Sarveshkumar for reporting this problem. (CVE-2026-116328)
securityFix buffer overrun in tsvector_delete() (Anthropic OSS program) With crafted input, tsvector_delete() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116315)
securityFix buffer overrun in ts_rank_cd() (Anthropic OSS program) With crafted input, ts_rank_cd() could be induced to write more bytes than it had allocated for its result. The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116317)
securityPrevent construction of invalid name values via element assignment (Tom Lane) array_set_element() could be abused to make the last byte of a name-type value nonzero. Subsequent uses of the value would then read past the end, resulting in crashes or disclosure of server memory. While at it,…
securityTreat application of a leaky function to a CaseTestExpr or internal Param node as leaky (Tom Lane) A CaseTestExpr or internal Param represents the value of an expression somewhere else in the query. If that expression contains a Var then there is potential for information leakage. Therefore,…
securityDon't generate an index-based plan for an aggregate whose input and output types don't match (Tom Lane) Previously, we'd blindly do this if the aggregate has a SORTOP option attached. The index-based plan will return the aggregate's input column, leading to type violations and potentially to…
securityAvoid inserting the wrong tuple into a trigger transition table in a MERGE that does an INSERT followed by an UPDATE (Heikki Linnakangas, Jacek Bylina, Jacob Robertson, Nigel Gott) The PostgreSQL Project thanks Jacek Bylina, Timothy Ball, Claude and Ada Logics for reporting this problem.…
securityCheck that commutator and negator operator pairs return the same data type (Tom Lane) Previously, substitution of a commutator or negator operator could lead to a type violation. This patch also cleans up some cases where one operator had a commutator/negator link to another, but the second…
securityPrevent functions in index predicates and expressions from breaking REINDEX CONCURRENTLY by manipulating the indexes (Michael Paquier) The PostgreSQL Project thanks Florent Saudel for reporting this problem. (CVE-2026-116336)
securityPrevent corrupting a newly-installed extension by renaming its target schema during CREATE EXTENSION or by installing it into a temporary schema (Noah Misch) With some ingenuity, an attacker could substitute objects of his creation for objects in the extension. The PostgreSQL Project thanks Noah…
securityReject more unsafe names in extension script substitutions (Nathan Bossart) We already rejected schema and owner names containing quotes, backslashes, and dollar signs, but names containing newlines, carriage returns, comment delimiters, or the substitution tokens themselves can still achieve SQL…
securityCheck EXECUTE privilege before calling cast functions within to_json() and other conversion-to-JSON code (Nathan Bossart, Anthropic OSS program) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL…
securityCheck EXECUTE privilege before calling cast functions within foreign key enforcement checks (Nathan Bossart) Typically such functions would have public EXECUTE privilege anyway, but this puts the behavior on par with normal execution of casts. The PostgreSQL Project thanks Noah Misch for reporting…
securityPrevent DROP OWNED BY from changing row-level security policies on tables that the current user does not own (Zsolt Parragi, Anthropic OSS program) Previously, an unprivileged role could remove itself from restrictive policies on tables it does not own. Instead issue a warning, as is already done…
securityDisallow security-restricted operations from creating types in temporary schemas (Anthropic OSS program, Nathan Bossart) We already disallowed creating temporary tables in this context, but a type also presents a hazard of shadowing permanent objects and thus allowing privilege escalation. The…
securityAvoid out-of-bounds accesses in FDW batch inserts (Nathan Bossart) The PostgreSQL Project thanks Sumedh Pathak and Sven Klemm for reporting this problem. (CVE-2026-120149)
securityAvoid out-of-bounds reads in parallel btree scans with array keys (Nathan Bossart) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-116333)
securityRefuse to create extended statistics on expressions of transient types (Masahiko Sawada) Disallow CREATE STATISTICS on expressions whose types would not be allowed as table column types, most notably anonymous record types. This prevents other sessions from misinterpreting the stored values. The…
securityReject system catalogs as logical replication targets (Masahiko Sawada) The PostgreSQL Project thanks Qian Zhang for reporting this problem. (CVE-2026-120145)
securityCheck ON CONFLICT target row against RLS policies before applying user quals (Peter Geoghegan, Zsolt Parragi) Previously, leaky qual expressions could see rows that RLS policies should forbid them from seeing. The PostgreSQL Project thanks Peter Geoghegan, Zsolt Parragi, Only see myself, the…
securityValidate all connection options in replication subscriptions and contrib/dblink (Jacob Champion) Previously, these checks were applied inconsistently. The PostgreSQL Project thanks Andrey Krasichkov, Bashir Altawil, and Zsolt Parragi for reporting this problem. (CVE-2026-14661)
securityHandle dropped columns safely while comparing row types (Peter Geoghegan) Previously, two row types that had dropped columns at the same position could be considered equal even if those columns were of different physical widths. That leads to problems when trying to deconstruct tuples of those…
securityDisallow declaring SQL functions as returning type "any" (Peter Geoghegan) This allowed type violations. The PostgreSQL Project thanks Peter Geoghegan, Claude and Ada Logics for reporting this problem. (CVE-2026-18447)
securityHarden more memory-size calculations against integer overflow (Álvaro Herrera) The PostgreSQL Project thanks Hillai Ben Sasson, Jayden Sarveshkumar, and Mehmet Ince for reporting this problem. (CVE-2026-120139)
securityFix type confusion in set-returning functions that return RECORD, when materialized in a query's target list (Melanie Plageman, Robert Haas) The same tuple descriptor was used across multiple calls, which is unsafe since the actual record type could vary. The PostgreSQL Project thanks Peter…
securityCope with concurrent rowtype changes in PL/pgSQL record field assignment (Tom Lane) The PostgreSQL Project thanks Claude and Ada Logics for reporting this problem. (CVE-2026-120151)
securitySupport “tied” Perl objects in PL/Perl and associated contrib modules (Andrey Rachitskiy) Up to now, if you passed a tied object to a PL/Perl operation, it would most likely get treated as undef, since we failed to perform Perl get magic on values we're passed. Tied hashes worked partially, in…
securityFix PL/Perl to cope with errors thrown from tied objects (Tom Lane, Andrew Dunstan) The PostgreSQL Project thanks Ngoc Tran, the Anthropic OSS program, and Dwij Mehta for reporting this problem. (CVE-2026-116326)
securityFix type confusion in PL/Perl's get_perl_array_ref() (Andrew Dunstan) The PostgreSQL Project thanks Zheng Yu for reporting this problem. (CVE-2026-116309)
securityFix use-after-free in scans of Perl arrays and hashes (Tom Lane, Anthropic OSS program) The PostgreSQL Project thanks the Anthropic OSS program for reporting this problem. (CVE-2026-116320)
+134 more items in the release notessecurityRestrict 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 notessecurityPrevent 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