VersionDrift
Product

PostgreSQL 14.3 → 14.10

7 releases · 12 breaking changes · 11 security fixes · 8 advisories fixed

11security12breaking1deprecated23feature148fix

Vulnerabilities fixed by this upgrade

  • 4.3 CVE-2023-5868 A memory disclosure vulnerability was found in PostgreSQL that allows remote users to access sensitive information by exploiting certain aggregate function calls with 'unknown'-type arguments. Hand…
  • 8.8 CVE-2023-5869 A flaw was found in PostgreSQL that allows authenticated database users to execute arbitrary code through missing overflow checks during SQL array value modification. This issue exists due to an in…
  • 2.2 CVE-2023-5870 A flaw was found in PostgreSQL involving the pg_cancel_backend role that signals background workers, including the logical replication launcher, autovacuum workers, and the autovacuum launcher. Suc…
  • 7.5 CVE-2023-39417 IN THE EXTENSION SCRIPT, a SQL Injection vulnerability was found in PostgreSQL if it uses @extowner@, @extschema@, or @extschema:...@ inside a quoting construct (dollar quoting, '', or ""). If an a…
  • 7.2 CVE-2023-2454 schema_element defeats protective search_path changes; It was found that certain database calls in PostgreSQL could permit an authed attacker with elevated database-level privileges to execute arbi…
  • 5.4 CVE-2023-2455 Row security policies disregard user ID changes after inlining; PostgreSQL could permit incorrect policies to be applied in certain cases where role-specific policies are used and a given query is…
  • 3.7 CVE-2022-41862 In PostgreSQL, a modified, unauthenticated server can send an unterminated string during the establishment of Kerberos transport encryption. In certain conditions a server can cause a libpq client…
  • 8.0 CVE-2022-2625 A vulnerability was found in PostgreSQL. This attack requires permission to create non-temporary objects in at least one schema, the ability to lure or wait for an administrator to create or update…

Breaking changes

  • breaking Remove incorrect assertion in PL/Python exception handling (Alexander Lakhin) in 14.10
  • breaking Add logic to pg_upgrade to check for use of abstime, reltime, and tinterval data types (Álvaro Herrera) These obsolete data types were removed in PostgreSQL version 12, so check to make sure they aren't present in an older database before claiming it can be upgraded. in 14.10
  • breaking Remove PHOT (Phoenix Islands Time) from the default timezone abbreviations list (Tom Lane) Presence of this abbreviation in the default list can cause failures on recent Debian and Ubuntu releases, as they no longer install the underlying tzdb entry by default. Since this is a made-up abbreviation… in 14.10
  • breaking Avoid leaving a corrupted database behind when DROP DATABASE is interrupted (Andres Freund) If DROP DATABASE was interrupted after it had already begun taking irreversible steps, the target database remained accessible (because the removal of its pg_database row would roll back), but it would have… in 14.9
  • breaking Avoid producing incorrect plans for foreign joins with pseudoconstant join clauses (Etsuro Fujita) The planner currently lacks support for attaching pseudoconstant join clauses to a pushed-down remote join, so disable generation of remote joins in such cases. (A better solution will require… in 14.9
  • breaking Disallow system columns as elements of foreign keys (Tom Lane) Since the removal of OID as a system column, there is no plausible use-case for this, and various bits of code no longer support it. Disallow it rather than trying to fix all the cases. in 14.8
  • breaking Remove faulty assertion in useless-RESULT-RTE optimization logic (Tom Lane) in 14.7
  • breaking Remove pointless check on replica identity setting of partitioned tables (Hou Zhijie) What matters is the replica identity setting of the leaf partitions, so there's no need to throw error if it's not set on the parent. in 14.6
  • breaking Fix use-after-free hazard in string comparisons (Tom Lane) Improper memory management in the string comparison functions could result in scribbling on no-longer-allocated buffers, potentially breaking things for whatever is using that memory now. This would only happen with fairly long strings… in 14.6
  • breaking Fix incompatibilities with LLVM 15 (Thomas Munro, Andres Freund) in 14.6
  • breaking In extended query protocol, force an immediate commit after CREATE DATABASE and other commands that can't run in a transaction block (Tom Lane) If the client does not send a Sync message immediately after such a command, but instead sends another command, any failure in that command would lead to… in 14.5
  • breaking Remove misguided SSL key file ownership check in libpq (Tom Lane) In the previous minor releases, we copied the server's permission checking rules for SSL private key files into libpq. But we should not have also copied the server's file-ownership check. While that works in normal use-cases, it… in 14.4

Security changes

  • security Fix handling of unknown-type arguments in DISTINCT "any" aggregate functions (Tom Lane) This error led to a text-type value being interpreted as an unknown-type value (that is, a zero-terminated string) at runtime. This could result in disclosure of server memory following the text value. The… in 14.10
  • security Detect integer overflow while computing new array dimensions (Tom Lane) When assigning new elements to array subscripts that are outside the current array bounds, an undetected integer overflow could occur in edge cases. Memory stomps that are potentially exploitable for arbitrary code execution… in 14.10
  • security Prevent the pg_signal_backend role from signalling background workers and autovacuum processes (Noah Misch, Jelte Fennema-Nio) The documentation says that pg_signal_backend cannot issue signals to superuser-owned processes. It was able to signal these background processes, though, because they… in 14.10
  • security Disallow substituting a schema or owner name into an extension script if the name contains a quote, backslash, or dollar sign (Noah Misch) This restriction guards against SQL-injection hazards for trusted extensions. The PostgreSQL Project thanks Micah Gates, Valerie Woolard, Tim Carey-Smith, and… in 14.9
  • security Correctly handle sub-SELECTs in RLS policy expressions and security-barrier views when expanding rule actions (Tom Lane) in 14.9
  • security Prevent CREATE SCHEMA from defeating changes in search_path (Alexander Lakhin) Within a CREATE SCHEMA command, objects in the prevailing search_path, as well as those in the newly-created schema, would be visible even within a called function or script that attempted to set a secure search_path.… in 14.8
  • security Enforce row-level security policies correctly after inlining a set-returning function (Stephen Frost, Tom Lane) If a set-returning SQL-language function refers to a table having row-level security policies, and it can be inlined into a calling query, those RLS policies would not get enforced… in 14.8
  • security Ensure that COPY TO from an RLS-enabled parent table does not copy any rows from child tables (Antonin Houska) The documentation is quite clear that COPY TO copies rows from only the named table, not any inheritance children it may have. However, if row-level security was enabled on the table then… in 14.8
  • security libpq can leak memory contents after GSSAPI transport encryption initiation fails (Jacob Champion) A modified server, or an unauthenticated man-in-the-middle, can send a not-zero-terminated error message during setup of GSSAPI (Kerberos) transport encryption. libpq will then copy that string, as… in 14.7
  • security Do not let extension scripts replace objects not already belonging to the extension (Tom Lane) This change prevents extension scripts from doing CREATE OR REPLACE if there is an existing object that does not belong to the extension. It also prevents CREATE IF NOT EXISTS in the same situation. This… in 14.5
  • security Fix permissions checks in CREATE INDEX (Nathan Bossart, Noah Misch) The fix for CVE-2022-1552 caused CREATE INDEX to apply the table owner's permissions while performing lookups of operator classes and other objects, where formerly the calling user's permissions were used. This broke dump/restore… in 14.5

Deprecations

  • deprecated Avoid using sprintf, to avoid compile-time deprecation warnings (Tom Lane) in 14.6

Every release in between

securityFix handling of unknown-type arguments in DISTINCT "any" aggregate functions (Tom Lane) This error led to a text-type value being interpreted as an unknown-type value (that is, a zero-terminated string) at runtime. This could result in disclosure of server memory following the text value. The…
securityDetect integer overflow while computing new array dimensions (Tom Lane) When assigning new elements to array subscripts that are outside the current array bounds, an undetected integer overflow could occur in edge cases. Memory stomps that are potentially exploitable for arbitrary code execution…
securityPrevent the pg_signal_backend role from signalling background workers and autovacuum processes (Noah Misch, Jelte Fennema-Nio) The documentation says that pg_signal_backend cannot issue signals to superuser-owned processes. It was able to signal these background processes, though, because they…
fixFix misbehavior during recursive page split in GiST index build (Heikki Linnakangas) Fix a case where the location of a page downlink was incorrectly tracked, and introduce some logic to allow recovering from such situations rather than silently doing the wrong thing. This error could result in…
otherPrevent de-duplication of btree index entries for interval columns (Noah Misch) There are interval values that are distinguishable but compare equal, for example 24:00:00 and 1 day. This breaks assumptions made by btree de-duplication, so interval columns need to be excluded from de-duplication.…
otherProcess date values more sanely in BRIN datetime_minmax_multi_ops indexes (Tomas Vondra) The distance calculation for dates was backward, causing poor decisions about which entries to merge. The index still produces correct results, but is much less efficient than it should be. Reindexing BRIN…
otherProcess large timestamp and timestamptz values more sanely in BRIN datetime_minmax_multi_ops indexes (Tomas Vondra) Infinities were mistakenly treated as having distance zero rather than a large distance from other values, causing poor decisions about which entries to merge. Also,…
fixAvoid calculation overflows in BRIN interval_minmax_multi_ops indexes with extreme interval values (Tomas Vondra) This bug might have caused unexpected failures while trying to insert large interval values into such an index.
fixFix partition step generation and runtime partition pruning for hash-partitioned tables with multiple partition keys (David Rowley) Some cases involving an IS NULL condition on one of the partition keys could result in a crash.
otherCorrectly identify the target table in an inherited UPDATE/DELETE/MERGE even when the parent table is excluded by constraints (Amit Langote, Tom Lane) If the initially-named table is excluded by constraints, but not all its inheritance descendants are, the first non-excluded descendant was…
fixFix edge case in btree mark/restore processing of ScalarArrayOpExpr clauses (Peter Geoghegan) When restoring an indexscan to a previously marked position, the code could miss required setup steps if the scan had advanced exactly to the end of the matches for a ScalarArrayOpExpr (that is, an…
fixFix intra-query memory leak in Memoize execution (Orlov Aleksej, David Rowley)
fixFix intra-query memory leak when a set-returning function repeatedly returns zero rows (Tom Lane)
fixDon't crash if cursor_to_xmlschema() is applied to a non-data-returning Portal (Boyu Yang)
otherThrow the intended error if pgrowlocks() is applied to a partitioned table (David Rowley) Previously, a not-on-point complaint “only heap AM is supported” would be raised.
otherHandle invalid indexes more cleanly in assorted SQL functions (Noah Misch) Report an error if pgstatindex(), pgstatginindex(), pgstathashindex(), or pgstattuple() is applied to an invalid index. If brin_desummarize_range(), brin_summarize_new_values(), brin_summarize_range(), or…
otherAvoid premature memory allocation failure with long inputs to to_tsvector() (Tom Lane)
fixFix over-allocation of the constructed tsvector in tsvectorrecv() (Denis Erokhin) If the incoming vector includes position data, the binary receive function left wasted space (roughly equal to the size of the position data) in the finished tsvector. In extreme cases this could lead to “maximum…
fixFix incorrect coding in gtsvector_picksplit() (Alexander Lakhin) This could lead to poor page-split decisions in GiST indexes on tsvector columns.
otherImprove checks for corrupt PGLZ compressed data (Flavien Guedez)
fixFix COMMIT AND CHAIN/ROLLBACK AND CHAIN to work properly when there is an unreleased savepoint (Liu Xiang, Tom Lane) Instead of propagating the current transaction's properties to the new transaction, they propagated some previous transaction's properties.
otherIn COPY FROM, fail cleanly when an unsupported encoding conversion is needed (Tom Lane) Recent refactoring accidentally removed the intended error check for this, such that it ended in “cache lookup failed for function 0” instead of a useful error message.
fixAvoid crash in EXPLAIN if a parameter marked to be displayed by EXPLAIN has a NULL boot-time value (Xing Guo, Aleksander Alekseev, Tom Lane) No built-in parameter fits this description, but an extension could define such a parameter.
otherEnsure we have a snapshot while dropping ON COMMIT DROP temp tables (Tom Lane) This prevents possible misbehavior if any catalog entries for the temp tables have fields wide enough to require toasting (such as a very complex CHECK condition).
otherAvoid improper response to shutdown signals in child processes just forked by system() (Nathan Bossart) This fix avoids a race condition in which a child process that has been forked off by system(), but hasn't yet exec'd the intended child program, might receive and act on a signal intended for…
featureAvoid integer overflow when computing size of backend activity string array (Jakub Wartak) On 64-bit machines we will allow values of track_activity_query_size large enough to cause 32-bit overflow when multiplied by the allowed number of connections. The code actually allocating the per-backend…
fixFix briefly showing inconsistent progress statistics for ANALYZE on inherited tables (Heikki Linnakangas) The block-level counters should be reset to zero at the same time we update the current-relation field.
fixFix the background writer to report any WAL writes it makes to the statistics counters (Nazir Bilal Yavuz)
fixFix error-handling bug in RECORD type cache management (Thomas Munro) An out-of-memory error occurring at just the wrong point could leave behind inconsistent state that would lead to an infinite loop.
fixFix assertion failure when logical decoding is retried in the same session after an error (Hou Zhijie)
fixFix possible recovery failure due to trying to allocate memory based on a bogus WAL record length field (Thomas Munro, Michael Paquier)
fixFix datatype size confusion in logical tape management (Ranier Vilela) Integer overflow was possible on platforms where long is wider than int, although it would take a multiple-terabyte temporary file to cause a problem.
fixFix “could not duplicate handle” error occurring on Windows when min_dynamic_shared_memory is set above zero (Thomas Munro)
fixFix order of operations in GenericXLogFinish (Jeff Davis) This code violated the conditions required for crash safety by writing WAL before marking changed buffers dirty. No core code uses this function, but extensions do (contrib/bloom does, for example).
breakingRemove incorrect assertion in PL/Python exception handling (Alexander Lakhin)
fixFix pg_restore so that selective restores will include both table-level and column-level ACLs for selected tables (Euler Taveira, Tom Lane) Formerly, only the table-level ACL would get restored if both types were present.
breakingAdd logic to pg_upgrade to check for use of abstime, reltime, and tinterval data types (Álvaro Herrera) These obsolete data types were removed in PostgreSQL version 12, so check to make sure they aren't present in an older database before claiming it can be upgraded.
fixFix failure of contrib/btree_gin indexes on interval columns, when an indexscan using the < or <= operator is performed (Dean Rasheed) Such an indexscan failed to return all the entries it should.
featureAdd support for LLVM 16 and 17 (Thomas Munro, Dmitry Dolgov)
breakingRemove PHOT (Phoenix Islands Time) from the default timezone abbreviations list (Tom Lane) Presence of this abbreviation in the default list can cause failures on recent Debian and Ubuntu releases, as they no longer install the underlying tzdb entry by default. Since this is a made-up abbreviation…
+16 more items in the release notes
14.9 Aug 10, 2023 Release notes ↗
securityDisallow substituting a schema or owner name into an extension script if the name contains a quote, backslash, or dollar sign (Noah Misch) This restriction guards against SQL-injection hazards for trusted extensions. The PostgreSQL Project thanks Micah Gates, Valerie Woolard, Tim Carey-Smith, and…
fixFix confusion between empty (no rows) ranges and all-NULL ranges in BRIN indexes, as well as incorrect merging of all-NULL summaries (Tomas Vondra) Each of these oversights could result in forgetting that a BRIN index range contains any NULL values, potentially allowing subsequent queries that…
breakingAvoid leaving a corrupted database behind when DROP DATABASE is interrupted (Andres Freund) If DROP DATABASE was interrupted after it had already begun taking irreversible steps, the target database remained accessible (because the removal of its pg_database row would roll back), but it would have…
featureEnsure that partitioned indexes are correctly marked as valid or not at creation (Michael Paquier) If a new partitioned index matches an existing but invalid index on one of the partitions, the partitioned index could end up being marked valid prematurely. This could lead to misbehavior or…
featureIgnore invalid child indexes when matching partitioned indexes to child indexes during ALTER TABLE ATTACH PARTITION (Michael Paquier) Such an index will now be ignored, and a new child index created instead.
fixFix possible failure when marking a partitioned index valid after all of its partitions have been attached (Michael Paquier) The update of the index's pg_index entry could use stale data for other columns. One reported symptom is an “attempted to update invisible tuple” error.
fixFix ALTER EXTENSION SET SCHEMA to complain if the extension contains any objects outside the extension's schema (Michael Paquier, Heikki Linnakangas) Erroring out if the extension contains objects in multiple schemas was always intended; but the check was mis-coded so that it would fail to detect…
otherDon't use partial unique indexes for uniqueness proofs in the planner (David Rowley) This could give rise to incorrect plans, since the presumed uniqueness of rows read from a table might not hold if the index in question isn't used to scan the table.
otherDon't Memoize lateral joins with volatile join conditions (Richard Guo) Applying Memoize to a sub-plan that contains volatile filter conditions is likely to lead to wrong answers. The check to avoid doing this missed some cases that can arise when using LATERAL.
breakingAvoid producing incorrect plans for foreign joins with pseudoconstant join clauses (Etsuro Fujita) The planner currently lacks support for attaching pseudoconstant join clauses to a pushed-down remote join, so disable generation of remote joins in such cases. (A better solution will require…
securityCorrectly handle sub-SELECTs in RLS policy expressions and security-barrier views when expanding rule actions (Tom Lane)
fixFix race conditions in conflict detection for SERIALIZABLE isolation mode (Thomas Munro) Conflicts could be missed when using bitmap heap scans, when using GIN indexes, and when examining an initially-empty btree index. All these cases could lead to serializability failures due to improperly…
fixFix misbehavior of EvalPlanQual checks with inherited or partitioned target tables (Tom Lane) This oversight could lead to update or delete actions in READ COMMITTED isolation mode getting performed when they should have been skipped because of a conflicting concurrent update.
fixFix hash join with an inner-side hash key that contains Params coming from an outer nested loop (Tom Lane) When rescanning the join after the values of such Params have changed, we must rebuild the hash table, but neglected to do so. This could result in missing join output rows.
fixFix intermittent failures when trying to update a field of a composite column (Tom Lane) If the overall value of the composite column is wide enough to require out-of-line toasting, then an unluckily-timed cache flush could cause errors or server crashes.
otherPrevent query-lifespan memory leaks in some UPDATE queries with triggers (Tomas Vondra)
otherPrevent query-lifespan memory leaks when an Incremental Sort plan node is rescanned (James Coleman, Laurenz Albe, Tom Lane)
otherAccept fractional seconds in the input to jsonpath's datetime() method (Tom Lane)
fixPrevent stack-overflow crashes with very complex text search patterns (Tom Lane)
featureAllow tokens up to 10240 bytes long in pg_hba.conf and pg_ident.conf (Tom Lane) The previous limit of 256 bytes has been found insufficient for some use-cases.
fixFix mishandling of C++ out-of-memory conditions (Heikki Linnakangas) If JIT is in use, running out of memory in a C++ new call would lead to a PostgreSQL FATAL error, instead of the expected C++ exception.
fixFix rare null-pointer crash in plancache.c (Tom Lane)
featureAvoid losing track of possibly-useful shared memory segments when a page free results in coalescing ranges of free space (Dongming Liu) Ensure that the segment is moved into the appropriate “bin” for its new amount of free space, so that it will be found by subsequent searches.
fixAllow VACUUM to continue after detecting certain types of b-tree index corruption (Peter Geoghegan) If an invalid sibling-page link is detected, log the issue and press on, rather than throwing an error as before. Nothing short of REINDEX will fix the broken index, but preventing VACUUM from…
otherEnsure that WrapLimitsVacuumLock is released after VACUUM detects invalid data in pg_database.datfrozenxid or pg_database.datminmxid (Andres Freund) Failure to release this lock could lead to a deadlock later, although the lock would be cleaned up if the session exits or encounters some other error.
fixAvoid double replay of prepared transactions during crash recovery (suyu.cmj, Michael Paquier) After a crash partway through a checkpoint with some two-phase transaction state data already flushed to disk by this checkpoint, crash recovery could attempt to replay the prepared transaction(s) twice,…
fixFix possible failure while promoting a standby server, if archiving is enabled and two-phase transactions need to be recovered (Julian Markwort) If any required two-phase transactions were logged in the most recent (partial) log segment, promotion would fail with an incorrect complaint about…
fixEnsure that a newly created, but still empty table is fsync'ed at the next checkpoint (Heikki Linnakangas) Without this, if there is an operating system crash causing the empty file to disappear, subsequent operations on the table might fail with “could not open file” errors.
fixEnsure that creation of the init fork of an unlogged index is WAL-logged (Heikki Linnakangas) While an unlogged index's main data fork is not WAL-logged, its init fork should be, to ensure that we have a consistent state to restore the index to after a crash. This step was missed if the init fork…
fixFix missing reinitializations of delay-checkpoint-end flags (suyu.cmj) This could result in unnecessary delays of checkpoints, or in assertion failures in assert-enabled builds.
fixFix overly strict assertion in jsonpath code (David Rowley) This assertion failed if a query applied the .type() operator to a like_regex result. There was no bug in non-assert builds.
otherAvoid assertion failure when processing an empty statement via the extended query protocol in an already-aborted transaction (Tom Lane)
fixFix contrib/fuzzystrmatch's Soundex difference() function to handle empty input sanely (Alexander Lakhin, Tom Lane) An input string containing no alphabetic characters resulted in unpredictable output.
otherTighten whitespace checks in contrib/hstore input (Evan Jones) In some cases, characters would be falsely recognized as whitespace and hence discarded.
fixDisallow oversize input arrays with contrib/intarray's gist__int_ops index opclass (Ankit Kumar Pandey, Alexander Lakhin) Previously this code would report a NOTICE but press on anyway, creating an invalid index entry that presents a risk of crashes when the index is read.
otherAvoid useless double decompression of GiST index entries in contrib/intarray (Konstantin Knizhnik, Matthias van de Meent, Tom Lane)
fixFix contrib/pageinspect's gist_page_items() function to work when there are included index columns (Alexander Lakhin, Michael Paquier) Previously, if the index has included columns, gist_page_items() would fail to display those values on index leaf pages, or crash outright on non-leaf pages.
fixFix pg_dump to correctly handle new-style SQL-language functions whose bodies require parse-time dependencies on unique indexes (Tom Lane) Such cases can arise from GROUP BY and ON CONFLICT clauses, for example. The function must then be postponed until after the unique index in the dump output,…
fixEnsure that pg_index.indisreplident is kept up-to-date in relation cache entries (Shruthi Gowda) This value could be stale in some cases. There is no core code that relies on the relation cache's copy, so this is only a latent bug as far as Postgres itself is concerned; but there may be extensions…
14.8 May 11, 2023 Release notes ↗
securityPrevent CREATE SCHEMA from defeating changes in search_path (Alexander Lakhin) Within a CREATE SCHEMA command, objects in the prevailing search_path, as well as those in the newly-created schema, would be visible even within a called function or script that attempted to set a secure search_path.…
securityEnforce row-level security policies correctly after inlining a set-returning function (Stephen Frost, Tom Lane) If a set-returning SQL-language function refers to a table having row-level security policies, and it can be inlined into a calling query, those RLS policies would not get enforced…
fixAvoid crash when the new schema name is omitted in CREATE SCHEMA (Michael Paquier) The SQL standard allows writing CREATE SCHEMA AUTHORIZATION owner_name, with the schema name defaulting to owner_name. However some code paths expected the schema name to be present and would fail.
fixFix enabling/disabling of cloned triggers in partitioned tables (Tom Lane) ALTER TABLE ... ENABLE/DISABLE TRIGGER USER skipped cloned triggers, mistaking them for system triggers. Other variants of ENABLE/DISABLE TRIGGER would process them, but only after improperly enforcing a superuserness check.
breakingDisallow system columns as elements of foreign keys (Tom Lane) Since the removal of OID as a system column, there is no plausible use-case for this, and various bits of code no longer support it. Disallow it rather than trying to fix all the cases.
securityEnsure that COPY TO from an RLS-enabled parent table does not copy any rows from child tables (Antonin Houska) The documentation is quite clear that COPY TO copies rows from only the named table, not any inheritance children it may have. However, if row-level security was enabled on the table then…
fixAvoid possible crash when array_position() or array_positions() is passed an empty array (Tom Lane)
fixFix possible out-of-bounds fetch in to_char() (Tom Lane) With bad luck this could have resulted in a server crash.
fixAvoid buffer overread in translate() function (Daniil Anisimov) When using the deletion feature, the function might fetch the byte just after the input string, creating a small risk of crash.
fixFix error cursor setting for parse errors in JSON string literals (Tom Lane) Most cases in which a syntax error is detected in a string literal within a JSON value failed to set the error cursor appropriately. This led at least to an unhelpful error message (pointing to the token before the…
fixFix data corruption due to vacuum_defer_cleanup_age being larger than the current 64-bit xid (Andres Freund) In v14 and later with non-default settings of vacuum_defer_cleanup_age, it was possible to compute a very large vacuum cleanup horizon xid, leading to vacuum removing rows that are still…
fixFix parser's failure to detect some cases of improperly-nested aggregates (Tom Lane) This oversight could lead to executor failures for queries that should have been rejected as invalid.
fixFix data structure corruption during parsing of serial SEQUENCE NAME options (David Rowley) This can lead to trouble if an event trigger captures the corrupted parse tree.
fixFix oversights in execution of nested ARRAY[] constructs (Alexander Lakhin, Tom Lane) Correctly detect overflow of the total space needed for the result array, avoiding a possible crash due to undersized output allocation. Also ensure that any trailing padding space in the result array is zeroed;…
fixPrevent crash when updating a field within an array-of-domain-over-composite-type column (Dmitry Dolgov)
fixFix partition pruning logic for partitioning on boolean columns (David Rowley) Pruning with a condition like boolcol IS NOT TRUE was done incorrectly, leading to possibly not returning rows in which boolcol is NULL. Also, the rather unlikely case of partitioning on NOT boolcol was handled…
fixFix race condition in per-batch cleanup during parallel hash join (Thomas Munro, Melanie Plageman) A crash was possible given unlucky timing and parallel_leader_participation = off (which is not the default).
fixFix memory leak in Memoize plan execution (David Rowley)
fixFix buffer refcount leak when using batched inserts for a foreign table included in a partitioned tree (Alexander Pyhalov)
featureRestore support for sub-millisecond vacuum_cost_delay settings (Thomas Munro)
fixFix corner-case crashes when columns have been added to the end of a view (Tom Lane)
fixRepair rare failure of MULTIEXPR_SUBLINK subplans in partitioned updates (Andres Freund, Tom Lane) Use of the syntax INSERT ... ON CONFLICT DO UPDATE SET (c1, ...) = (SELECT ...) with a partitioned target table could result in failure if any child table is dissimilar from the parent (for example,…
fixFix handling of DEFAULT markers within a multi-row INSERT ... VALUES query on a view that has a DO ALSO INSERT ... SELECT rule (Dean Rasheed) Such cases typically failed with “unrecognized node type” errors or assertion failures.
fixSupport references to OLD and NEW within subqueries in rule actions (Dean Rasheed, Tom Lane) Such references are really lateral references, but the server could crash if the subquery wasn't explicitly marked with LATERAL. Arrange to do that implicitly when necessary.
fixFix glitches in SERIALIZABLE READ ONLY optimization (Thomas Munro) Transactions already marked as “doomed” confused the safe-snapshot optimization for SERIALIZABLE READ ONLY transactions. The optimization was unnecessarily skipped in some cases. In other cases an assertion failure occurred (but…
fixFix netmask handling in BRIN inet_minmax_multi_ops opclass (Tomas Vondra) This error triggered an assertion failure in assert-enabled builds, but is mostly harmless in production builds.
fixFix dereference of dangling pointer during buffering build of a GiST index (Alexander Lakhin) This error seems to usually be harmless in production builds, as the fetched value is noncritical; but in principle it could cause a server crash.
featureAdd missing cases to SPI_result_code_string() (Dean Rasheed)
fixFix erroneous Valgrind markings in AllocSetRealloc() (Karina Litskevich) In the unusual case where the size of a large (>8kB) palloc chunk is decreased, a Valgrind-aware build would mismark the defined-ness state of the memory released from the chunk, possibly causing incorrect results during…
fixFix session-lifespan memory leakage in plpgsql DO blocks that use cast expressions (Ajit Awekar, Tom Lane)
fixTighten array dimensionality checks when converting Perl list structures to multi-dimensional SQL arrays (Tom Lane) plperl could misbehave when the nesting of sub-lists is inconsistent so that the data does not represent a rectangular array of values. Such cases now produce errors, but previously…
fixTighten array dimensionality checks when converting Python list structures to multi-dimensional SQL arrays (Tom Lane) plpython could misbehave when dealing with empty sub-lists, or when the nesting of sub-lists is inconsistent so that the data does not represent a rectangular array of values. The…
fixFix unwinding of exception stack in plpython (Xing Guo) Some rare failure cases could return without cleaning up the PG_TRY exception stack, risking a crash if another error was raised before the next stack level was unwound.
fixFix inconsistent GSS-encryption error handling in libpq's PQconnectPoll() (Michael Paquier) With gssencmode set to require, the connection was not marked dead after a GSS initialization failure. Make it fail immediately, as the equivalent case for TLS encryption has long done.
fixFix possible data corruption in ecpg programs built with the -C ORACLE option (Kyotaro Horiguchi) When ecpg_get_data() is called with varcharsize set to zero, it could write a terminating zero character into the last byte of the preceding field, truncating the data in that field.
fixFix pg_dump so that partitioned tables that are hash-partitioned on an enum-type column can be restored successfully (Tom Lane) Since the hash codes for enum values depend on the OIDs assigned to the enum, they are typically different after a dump and restore, meaning that rows often need to go…
fixCorrectly detect non-seekable files on Windows (Juan José Santamaría Flecha, Michael Paquier, Daniel Watzinger) This bug led to misbehavior when pg_dump writes to a pipe or pg_restore reads from one.
fixIn contrib/hstore_plpython, avoid crashing if the Python value to be transformed isn't a mapping (Dmitry Dolgov, Tom Lane) This should give an error, but Python 3 changed some APIs in a way that caused the check to misbehave, allowing a crash to ensue.
featureIn contrib/pageinspect, add defenses against incorrect input for the gist_page_items() function (Dmitry Koval)
featureStop recommending auto-download of DTD files for building the documentation, and indeed disable it (Aleksander Alekseev, Peter Eisentraut, Tom Lane) It appears no longer possible to build the SGML documentation without a local installation of the DocBook DTD files. Formerly xsltproc could download…
+27 more items in the release notes
securitylibpq can leak memory contents after GSSAPI transport encryption initiation fails (Jacob Champion) A modified server, or an unauthenticated man-in-the-middle, can send a not-zero-terminated error message during setup of GSSAPI (Kerberos) transport encryption. libpq will then copy that string, as…
fixFix calculation of which GENERATED columns need to be updated in child tables during an UPDATE on a partitioned table or inheritance tree (Amit Langote, Tom Lane) This fixes failure to update GENERATED columns that do not exist in the parent table, or that have different dependencies than are in…
featureAllow a WITH RECURSIVE ... CYCLE CTE to access its output column (Tom Lane) A reference to the SET column from within the CTE would fail with “cache lookup failed for type 0”.
fixFix handling of pending inserts when doing a bulk insertion to a foreign table (Etsuro Fujita) In some cases pending insertions were not flushed to the FDW soon enough, leading to logical inconsistencies, for example BEFORE ROW triggers not seeing rows they should be able to see.
featureAllow REPLICA IDENTITY to be set on an index that's not (yet) valid (Tom Lane) When pg_dump dumps a partitioned index that's marked REPLICA IDENTITY, it generates a command sequence that applies REPLICA IDENTITY before the partitioned index has been marked valid, causing restore to fail. There…
fixFix handling of DEFAULT markers in rules that perform an INSERT from a multi-row VALUES list (Dean Rasheed) In some cases a DEFAULT marker would not get replaced with the proper default-value expression, leading to an “unrecognized node type” error.
otherReject uses of undefined variables in jsonpath existence checks (Alexander Korotkov, David G. Johnston) While jsonpath match operators threw an error for an undefined variable in the path pattern, the existence operators silently treated it as a match.
fixFix jsonb subscripting to cope with toasted subscript values (Tom Lane, David G. Johnston) Using a text value fetched directly from a table as a jsonb subscript was likely to fail. Fetches would usually not find any matching element. Assignments could store the value with a garbage key, although…
fixFix edge-case data corruption in parallel hash joins (Dmitry Astapov) If the final chunk of a large tuple being written out to a temporary file was exactly 32760 bytes, it would be corrupted due to a fencepost bug. The query would typically fail later with corrupted-data symptoms.
otherHonor non-default settings of checkpoint_completion_target (Bharath Rupireddy) Internal state was not updated after a change in checkpoint_completion_target, possibly resulting in performing checkpoint I/O faster or slower than desired, especially if that setting was changed on-the-fly.
otherLog the correct ending timestamp in recovery_target_xid mode (Tom Lane) When ending recovery based on the recovery_target_xid setting with recovery_target_inclusive = off, we printed an incorrect timestamp (always 2000-01-01) in the “recovery stopping before ... transaction” log message.
otherImprove error reporting for some buffered file read failures (Peter Eisentraut) Correctly report a short read, giving the numbers of bytes desired and actually read, instead of reporting an irrelevant error code. Most places got this right already, but some recently-written replication logic did…
otherIn extended query protocol, avoid an immediate commit after ANALYZE if we're running a pipeline (Tom Lane) If there's not been an explicit BEGIN TRANSACTION, ANALYZE would take it on itself to commit, which should not happen within a pipelined series of commands.
otherReject cancel request packets having the wrong length (Andrey Borodin) The server would process a cancel request even if its length word was too small. This led to reading beyond the end of the allocated buffer. In theory that could cause a segfault, but it seems quite unlikely to happen in…
fixAdd recursion and looping defenses in subquery pullup (Tom Lane) A contrived query can result in deep recursion and unreasonable amounts of time spent trying to flatten subqueries. A proper fix for that seems unduly invasive for a back-patch, but we can at least add stack depth checks and an…
fixFix planner issues when combining Memoize nodes with partitionwise joins or parameterized nestloops (Richard Guo) These errors could lead to not using Memoize in contexts where it would be useful, or possibly to wrong query plans.
fixFix partitionwise-join code to tolerate failure to produce a plan for each partition (Tom Lane) This could result in “could not devise a query plan for the given query” errors.
otherLimit the amount of cleanup work done by get_actual_variable_range (Simon Riggs) Planner runs occurring just after deletion of a large number of tuples appearing at the end of an index could expend significant amounts of work setting the “killed” bits for those index entries. Limit the amount of…
fixFix under-parenthesized display of AT TIME ZONE constructs (Tom Lane) This could result in dump/restore failures for rules or views in which an argument of AT TIME ZONE is itself an expression.
fixPrevent clobbering of cached parsetrees for utility statements in SQL functions (Tom Lane, Daniel Gustafsson) If a SQL-language function executes the same utility command more than once within a single calling query, it could crash or report strange errors such as “unrecognized node type”.
otherEnsure that execution of full-text-search queries can be cancelled while they are performing phrase matches (Tom Lane)
fixFix memory leak in hashing strings with nondeterministic collations (Jeff Davis)
fixFix deadlock between DROP DATABASE and logical replication worker process (Hou Zhijie) This was caused by an ill-advised choice to block interrupts while creating a logical replication slot in the worker. In version 15 that could lead to an undetected deadlock. In version 14, no deadlock has been…
otherClean up the libpq connection object after a failed replication connection attempt (Andres Freund) The previous coding leaked the connection object. In background code paths that's pretty harmless because the calling process will give up and exit. But in commands such as CREATE SUBSCRIPTION, such…
fixIn logical decoding, notify the remote node when a transaction is detected to have crashed (Hou Zhijie) After a server restart, we'll re-stream the changes for transactions occurring shortly before the restart. Some of these transactions probably never completed; when we realize that one didn't we…
fixFix uninitialized-memory usage in logical decoding (Masahiko Sawada) In certain cases, resumption of logical decoding could try to re-use XID data that had already been freed, leading to unpredictable behavior.
fixPrevent unsafe usage of a relation cache entry's rd_smgr pointer (Amul Sul) Remove various assumptions that rd_smgr would stay valid over a series of operations, by wrapping all uses of it in a function that will recompute it if needed. This prevents bugs occurring when an unexpected cache flush…
fixFix int64_div_fast_to_numeric() to work for a wider range of inputs (Dean Rasheed) This function misbehaved with some values of its second argument. No such usages exist in core PostgreSQL, but it's clearly a hazard for external modules, so repair.
fixFix latent buffer-overrun problem in WaitEventSet logic (Thomas Munro) The epoll-based and kqueue-based implementations could ask the kernel for too many events if the size of their internal buffer was different from the size of the caller's output buffer. That case is not known to occur in…
fixFix assertion failure in BRIN minmax-multi opclasses (Tomas Vondra) The assertion was overly strict, so this mistake was harmless in non-assert builds.
breakingRemove faulty assertion in useless-RESULT-RTE optimization logic (Tom Lane)
fixFix copy-and-paste errors in cache-lookup-failure messages for ACL checks (Justin Pryzby) In principle these errors should never be reached. But if they are, some of them reported the wrong type of object.
fixFix psql's \sf and \ef commands to handle SQL-language functions that have SQL-standard function bodies (Tom Lane) These commands misidentified the start of the function body when it used new-style syntax.
fixFix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET SCHEMA (Dean Rasheed)
fixFix contrib/seg to not crash or print garbage if an input number has more than 127 digits (Tom Lane)
fixFix build on Microsoft Visual Studio 2013 (Tom Lane) A previous patch supposed that all platforms of interest have snprintf(), but MSVC 2013 isn't quite there yet. Revert to using sprintf() on that platform.
fixFix compile failure in building PL/Perl with MSVC when using Strawberry Perl (Andrew Dunstan)
fixFix mismatch of PL/Perl built with MSVC versus a Perl library built with gcc (Andrew Dunstan) Such combinations could previously fail with “loadable library and perl binaries are mismatched” errors.
fixFix pg_waldump to build on compilers that don't discard unused static-inline functions (Tom Lane)
featureUpdate time zone data files to tzdata release 2022g for DST law changes in Greenland and Mexico, plus historical corrections for northern Canada, Colombia, and Singapore. (Tom Lane) Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga.
+7 more items in the release notes
14.6 Nov 10, 2022 Release notes ↗
otherAvoid rare PANIC during updates occurring concurrently with VACUUM (Tom Lane, Jeff Davis) If a concurrent VACUUM sets the all-visible flag bit in a page that UPDATE or DELETE is in process of modifying, the updating command needs to clear that bit again; but some code paths failed to do so, ending…
fixFix handling of DEFAULT tokens that appear in a multi-row VALUES clause of an INSERT on an updatable view (Tom Lane) This oversight could lead to “cache lookup failed for type” errors, or in older branches even to crashes.
otherDisallow rules named _RETURN that are not ON SELECT (Tom Lane) This avoids confusion between a view's ON SELECT rule and any other rules it may have.
fixFix resource management bug in saving tuples for AFTER triggers (Tom Lane) Given the right circumstances, this manifested as a “tupdesc reference NNNN is not owned by resource owner” error followed by a PANIC exit.
otherAvoid failure in EXPLAIN VERBOSE for a query using SEARCH BREADTH FIRST with constant initial values (Tom Lane)
fixFix construction of per-partition foreign key constraints while doing ALTER TABLE ATTACH PARTITION (Jehan-Guillaume de Rorthais, Álvaro Herrera) Previously, incorrect or duplicate constraints could be constructed for the newly-added partition.
fixFix generation of constraint names for per-partition foreign key constraints (Jehan-Guillaume de Rorthais) If the initially-given name is already in use for some constraint of the partition, a new one is selected; but it wasn't being spelled as intended.
fixFix incorrect matching of index expressions and predicates when creating a partitioned index (Richard Guo, Tom Lane) While creating a partitioned index, we try to identify any existing indexes on the partitions that match the partitioned index, so that we can absorb those as child indexes instead…
featurePrevent WAL corruption after a standby promotion (Dilip Kumar, Robert Haas) When a PostgreSQL instance performing archive recovery (but not using standby mode) is promoted, and the last WAL segment that it attempted to read ended in a partial record, the instance would write an invalid WAL segment…
fixFix mis-ordering of WAL operations in fast insert path for GIN indexes (Matthias van de Meent, Zhang Mingli) This mistake is not known to have any negative consequences within core PostgreSQL, but it did cause issues for some extensions.
fixFix bugs in logical decoding when replay starts from a point between the beginning of a transaction and the beginning of its subtransaction (Masahiko Sawada, Kuroda Hayato) These errors could lead to assertion failures in debug builds, and otherwise to memory leaks.
otherPrevent examining system catalogs with the wrong snapshot during logical decoding (Masahiko Sawada) If decoding begins partway through a transaction that modifies system catalogs, the decoder may not recognize that, causing it to fail to treat that transaction as in-progress for catalog lookups.
otherAccept interrupts in more places during logical decoding (Amit Kapila, Masahiko Sawada) This ameliorates problems with slow shutdown of replication workers.
fixPrevent attempts to replicate into a foreign-table partition in replication workers (Shi Yu, Tom Lane) Although partitioned tables can have foreign tables as partitions, replicating into such a partition isn't currently supported. The logical replication worker process would crash if it was…
breakingRemove pointless check on replica identity setting of partitioned tables (Hou Zhijie) What matters is the replica identity setting of the leaf partitions, so there's no need to throw error if it's not set on the parent.
fixAvoid crash after function syntax error in replication workers (Maxim Orlov, Anton Melnikov, Masahiko Sawada, Tom Lane) If a syntax error occurred in a SQL-language or PL/pgSQL-language CREATE FUNCTION or DO command executed in a logical replication worker, the worker process would crash with a…
fixFix handling of read-write expanded datums that are passed to SQL functions (Tom Lane) If a non-inlined SQL function uses a parameter in more than one place, and one of those functions expects to be able to modify read-write datums in place, then later uses of the parameter would observe the wrong…
fixFix type circle's equality comparator to handle NaNs properly (Ranier Vilela) If the left-hand circle had a floating-point NaN for its radius, it would be considered equal to a circle with the same center and any radius.
otherIn Snowball dictionaries, don't try to stem excessively-long words (Olly Betts, Tom Lane) If the input word exceeds 1000 bytes, return it as-is after case folding, rather than trying to run it through the Snowball code. This restriction protects against a known recursion-to-stack-overflow problem…
breakingFix use-after-free hazard in string comparisons (Tom Lane) Improper memory management in the string comparison functions could result in scribbling on no-longer-allocated buffers, potentially breaking things for whatever is using that memory now. This would only happen with fairly long strings…
fixAdd plan-time check for attempted access to a table that has no table access method (Tom Lane) This prevents a crash in some catalog-corruption scenarios, for example use of a view whose ON SELECT rule is missing.
fixPrevent postmaster crash when shared-memory state is corrupted (Tom Lane) The postmaster process is supposed to survive and initiate a database restart if shared memory becomes corrupted, but one bit of code was being insufficiently cautious about that.
featureAdd some more defenses against recursion till stack overrun (Richard Guo, Tom Lane)
otherAvoid misbehavior when choosing hash table size with very small work_mem and large tuples (Zhang Mingli)
otherAvoid long-term memory leakage in the autovacuum launcher process (Reid Thompson) The lack of field reports suggests that this problem is only latent in pre-v15 branches; but it's not very clear why, so back-patch the fix anyway.
featureImprove PL/pgSQL's ability to handle parameters declared as RECORD (Tom Lane) Build a separate function cache entry for each concrete type passed to the RECORD parameter during a session, much as we do for polymorphic parameters. This allows some usages to work that previously failed with errors…
otherIn libpq, handle single-row mode correctly when pipelining (Denis Laxalde) The single-row flag was not reset at the correct time if pipeline mode was also active.
fixAdd missing guards for NULL connection pointer in libpq (Daniele Varrazzo, Tom Lane) There's a convention that libpq functions should check for a NULL PGconn argument, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo, so fix them.
otherIn ecpg, fix omission of variable storage classes when multiple varchar or bytea variables are declared in the same declaration (Andrey Sokolov) For example, ecpg translated static varchar str1[10], str2[20], str3[30]; in such a way that only str1 was marked static.
featureAllow cross-platform tablespace relocation in pg_basebackup (Robert Haas) Allow the remote path in --tablespace-mapping to be either a Unix-style or Windows-style absolute path, since the source server could be on a different OS than the local system.
otherIn pg_stat_statements, fix access to already-freed memory (zhaoqigui) This occurred if pg_stat_statements tracked a ROLLBACK command issued via extended query protocol. In debug builds it consistently led to an assertion failure. In production builds there would often be no visible ill effect; but…
otherIn postgres_fdw, ensure that target lists constructed for EvalPlanQual plans will have all required columns (Richard Guo, Etsuro Fujita) This avoids “variable not found in subplan target list” errors in rare cases.
featureReject unwanted output from the platform's uuid_create() function (Nazir Bilal Yavuz) The uuid-ossp module expects libc's uuid_create() to produce a version-1 UUID, but recent NetBSD releases produce a version-4 (random) UUID instead. Check for that, and complain if so. Drop the documentation's…
featureInclude new Perl test modules in standard installations (Álvaro Herrera) Add PostgreSQL/Test/Cluster.pm and PostgreSQL/Test/Utils.pm to the standard installation file set in pre-version-15 branches. This is for the benefit of extensions that want to use newly-written test code in older branches.
otherOn NetBSD, force dynamic symbol resolution at postmaster start (Andres Freund, Tom Lane) This avoids a risk of deadlock in the dynamic linker on NetBSD 10.
breakingFix incompatibilities with LLVM 15 (Thomas Munro, Andres Freund)
featureAllow use of __sync_lock_test_and_set() for spinlocks on any machine (Tom Lane) This eases porting to new machine architectures, at least if you're using a compiler that supports this GCC builtin function.
otherRename symbol REF to REF_P to avoid compile failure on recent macOS (Tom Lane)
deprecatedAvoid using sprintf, to avoid compile-time deprecation warnings (Tom Lane)
otherSilence assorted compiler warnings from clang 15 and later (Tom Lane)
+1 more item in the release notes
14.5 Aug 11, 2022 Release notes ↗
securityDo not let extension scripts replace objects not already belonging to the extension (Tom Lane) This change prevents extension scripts from doing CREATE OR REPLACE if there is an existing object that does not belong to the extension. It also prevents CREATE IF NOT EXISTS in the same situation. This…
fixFix replay of CREATE DATABASE WAL records on standby servers (Kyotaro Horiguchi, Asim R Praveen, Paul Guo) Standby servers may encounter missing tablespace directories when replaying database-creation WAL records. Prior to this patch, a standby would fail to recover in such a case; however, such…
featureSupport “in place” tablespaces (Thomas Munro, Michael Paquier, Álvaro Herrera) Normally a Postgres tablespace is a symbolic link to a directory on some other filesystem. This change allows it to just be a plain directory. While this has no use for separating tables onto different filesystems, it…
securityFix permissions checks in CREATE INDEX (Nathan Bossart, Noah Misch) The fix for CVE-2022-1552 caused CREATE INDEX to apply the table owner's permissions while performing lookups of operator classes and other objects, where formerly the calling user's permissions were used. This broke dump/restore…
breakingIn extended query protocol, force an immediate commit after CREATE DATABASE and other commands that can't run in a transaction block (Tom Lane) If the client does not send a Sync message immediately after such a command, but instead sends another command, any failure in that command would lead to…
fixFix race condition when checking transaction visibility (Simon Riggs) TransactionIdIsInProgress could report false before the subject transaction is considered visible, leading to various misbehaviors. The race condition window is normally very narrow, but use of synchronous replication makes it…
fixFix incorrect plans when sorting by an expression that contains a non-top-level set-returning function (Richard Guo, Tom Lane)
fixFix incorrect permissions-checking code for extended statistics (Richard Guo) If there are extended statistics on a table that the user has only partial SELECT permissions on, some queries would fail with “unrecognized node type” errors.
fixFix extended statistics machinery to handle MCV-type statistics on boolean-valued expressions (Tom Lane) Statistics collection worked fine, but a query containing such an expression in WHERE would fail with “unknown clause type”.
otherAvoid planner core dump with constant = ANY(array) clauses when there are MCV-type extended statistics on the array variable (Tom Lane)
fixFix ALTER TABLE ... ENABLE/DISABLE TRIGGER to handle recursion correctly for triggers on partitioned tables (Álvaro Herrera, Amit Langote) In certain cases, a “trigger does not exist” failure would occur because the command would try to adjust the trigger on a child partition that doesn't have it.
featureAllow cancellation of ANALYZE while it is computing extended statistics (Tom Lane, Justin Pryzby) In some scenarios with high statistics targets, it was possible to spend many seconds in an un-cancellable sort operation.
otherImprove syntax error messages for type jsonpath (Andrew Dunstan)
fixEnsure that pg_stop_backup() cleans up session state properly (Fujii Masao) This omission could lead to assertion failures or crashes later in the session.
fixFix trim_array() to handle a zero-dimensional array argument sanely (Martin Kalcher)
fixFix join alias matching in FOR [KEY] UPDATE/SHARE clauses (Dean Rasheed) In corner cases, a misleading error could be reported.
fixReject ROW() expressions and functions in FROM that have too many columns (Tom Lane) Cases with more than about 1600 columns are unsupported, and have always failed at execution. However, it emerges that some earlier code could be driven to assertion failures or crashes by queries with more than…
fixFix dumping of a view using a function in FROM that returns a composite type, when column(s) of the composite type have been dropped since the view was made (Tom Lane) This oversight could lead to dump/reload or pg_upgrade failures, as the dumped view would have too many column aliases for the…
otherDisallow nested backup operations in logical replication walsenders (Fujii Masao)
fixFix memory leak in logical replication subscribers (Hou Zhijie)
fixFix logical replication's checking of replica identity when the target table is partitioned (Shi Yu, Hou Zhijie) The replica identity columns have to be re-identified for the child partition.
fixFix failures to update cached schema data in a logical replication subscriber after a schema change on the publisher (Shi Yu, Hou Zhijie)
fixFix WAL consistency checking logic to correctly handle BRIN_EVACUATE_PAGE flags (Haiyang Wang)
fixFix erroneous assertion checks in shared hashtable management (Thomas Munro)
otherAvoid assertion failure when min_dynamic_shared_memory is set to a non-default value (Thomas Munro)
fixArrange to clean up after commit-time errors within SPI_commit(), rather than expecting callers to do that (Peter Eisentraut, Tom Lane) Proper cleanup is complicated and requires use of low-level facilities, so it's not surprising that no known caller got it right. This led to misbehaviors when a…
otherImprove libpq's handling of idle states in pipeline mode (Álvaro Herrera, Kyotaro Horiguchi) This fixes “message type 0x33 arrived from server while idle” warnings, as well as possible loss of end-of-query NULL results from PQgetResult().
fixAvoid core dump in ecpglib with unexpected orders of operations (Tom Lane) Certain operations such as EXEC SQL PREPARE would crash (rather than reporting an error as expected) if called before establishing any database connection.
otherIn ecpglib, avoid redundant newlocale() calls (Noah Misch) Allocate a C locale object once per process when first connecting, rather than creating and freeing locale objects once per query. This mitigates a libc memory leak on AIX, and may offer some performance benefit everywhere.
otherIn psql's \watch command, echo a newline after cancellation with control-C (Pavel Stehule) This prevents libedit (and possibly also libreadline) from becoming confused about which column the cursor is in.
fixFix pg_upgrade to detect non-upgradable usages of functions taking anyarray (Justin Pryzby) Version 14 changed some built-in functions to take type anycompatiblearray instead of anyarray. While this is mostly transparent, user-defined aggregates and operators built atop these functions have to be…
fixFix possible report of wrong error condition after clone() failure in pg_upgrade with --clone option (Justin Pryzby)
fixFix contrib/pg_stat_statements to avoid problems with very large query-text files on 32-bit platforms (Tom Lane)
otherIn contrib/postgres_fdw, prevent batch insertion when there are WITH CHECK OPTION constraints (Etsuro Fujita) Such constraints cannot be checked properly if more than one row is inserted at a time.
fixFix contrib/postgres_fdw to detect failure to send an asynchronous data fetch query (Fujii Masao)
otherEnsure that contrib/postgres_fdw sends constants of regconfig and other reg* types with proper schema qualification (Tom Lane)
otherBlock signals while allocating dynamic shared memory on Linux (Thomas Munro) This avoids problems when a signal interrupts posix_fallocate().
fixDetect unexpected EEXIST error from shm_open() (Thomas Munro) This avoids a possible crash on Solaris.
otherAvoid using signalfd() on illumos systems (Thomas Munro) This appears to trigger hangs and kernel panics, so avoid the function until a fix is available.
14.4 Jun 16, 2022 Release notes ↗
featurePrevent possible corruption of indexes created or rebuilt with the CONCURRENTLY option (Álvaro Herrera) An optimization added in v14 caused CREATE INDEX ... CONCURRENTLY and REINDEX ... CONCURRENTLY to sometimes miss indexing rows that were updated during the index build. Revert that optimization.…
fixHarden Memoize plan node against non-deterministic equality functions (David Rowley) Memoize could crash if a data type's equality or hash functions gave inconsistent results across different calls. Throw a runtime error instead.
fixFix incorrect cost estimates for Memoize plans (David Rowley) This mistake could lead to Memoize being used when it isn't really the best plan, or to very long executor startup times due to initializing an overly-large hash table for a Memoize node.
fixFix queries in which a “whole-row variable” references the result of a function that returns a domain over composite type (Tom Lane)
fixFix “variable not found in subplan target list” planner error when pulling up a sub-SELECT that's referenced in a GROUPING function (Richard Guo)
otherPrevent pg_stat_get_subscription() from possibly returning an extra row containing garbage values (Kuntal Ghosh)
fixFix COPY FROM's error checking in the case where the database encoding is SQL_ASCII while the client's encoding is a multi-byte encoding (Heikki Linnakangas) This mistake could lead to false complaints of invalidly-encoded input data.
fixAvoid crashing if too many column aliases are attached to an XMLTABLE or JSON_TABLE construct (Álvaro Herrera)
otherWhen decompiling a view or rule, show a SELECT output column's AS "?column?" alias clause if it could be referenced elsewhere (Tom Lane) Previously, this auto-generated alias was always hidden; but there are corner cases where doing so results in a non-restorable view or rule definition.
otherReport implicitly-created operator families to event triggers (Masahiko Sawada) If CREATE OPERATOR CLASS results in the implicit creation of an operator family, that object was not reported to event triggers that should capture such events.
fixFix control file updates made when a restartpoint is running during promotion of a standby server (Kyotaro Horiguchi) Previously, when the restartpoint completed it could incorrectly update the last-checkpoint fields of the control file, potentially leading to PANIC and failure to restart if the…
otherPrevent triggering of standby's wal_receiver_timeout during logical replication of large transactions (Wang Wei, Amit Kapila) If a large transaction on the primary server sends no data to the standby (perhaps because no table it changes is published), it was possible for the standby to timeout.…
otherPrevent open-file leak when reading an invalid timezone abbreviation file (Kyotaro Horiguchi) Such cases could result in harmless warning messages.
fixAllow custom server parameters to have short descriptions that are NULL (Steve Chavez) Previously, although extensions could choose to create such settings, some code paths would crash while processing them.
breakingRemove misguided SSL key file ownership check in libpq (Tom Lane) In the previous minor releases, we copied the server's permission checking rules for SSL private key files into libpq. But we should not have also copied the server's file-ownership check. While that works in normal use-cases, it…
fixEnsure ecpg reports server connection loss sanely (Tom Lane) Misprocessing of a libpq-generated error result, such as a report of lost connection, would lead to printing “(null)” instead of a useful error message; or in older releases it would lead to a crash.
fixPrevent crash after server connection loss in pg_amcheck (Tom Lane) Misprocessing of a libpq-generated error result, such as a report of lost connection, would lead to a crash.
otherAdjust PL/Perl test case so it will work under Perl 5.36 (Dagfinn Ilmari Mannsåker)
otherAvoid incorrectly using an out-of-date libldap_r library when multiple OpenLDAP installations are present while building PostgreSQL (Tom Lane)
See how far your stack has drifted from upstream. Release data from vendors’ own sources · feed under CC BY 4.0 · Code under AGPL-3.0 Settings Feed status