Release notes for 17.1, 16.5, 15.9, 14.14, 13.17, 12.21.
authorTom Lane
Sun, 10 Nov 2024 18:40:41 +0000 (13:40 -0500)
committerTom Lane
Sun, 10 Nov 2024 18:40:41 +0000 (13:40 -0500)
doc/src/sgml/release-17.sgml

index 0eb57c63fdd692744dec0e2b2e7f35113595f6ae..00dc7573d7bd4fceee52f4b6a01096d0584af40a 100644 (file)
    
 
    
-    However, if you have detached partitions from a partitioned table that
-    has a foreign-key reference to another partitioned table, you may have
-    catalog and/or data corruption to repair, as detailed in the first
-    changelog entry below.
+    However, if you have ever detached a partition from a partitioned
+    table that has a foreign-key reference to another partitioned table,
+    and not dropped the former partition, then you may have catalog and/or
+    data corruption to repair, as detailed in the first changelog entry
+    below.
    
 
    
@@ -87,7 +88,29 @@ Branch: REL_15_STABLE [1b216fcef] 2024-10-30 10:54:03 +0100
      
 
      
-      XXX need to provide a query for finding faulty constraints
+      This query can be used to identify broken constraints and construct
+      the commands needed to recreate them:
+
+SELECT conrelid::pg_catalog.regclass AS "constrained table",
+       conname AS constraint,
+       confrelid::pg_catalog.regclass AS "references",
+       pg_catalog.format('ALTER TABLE %s DROP CONSTRAINT %I;',
+                         conrelid::pg_catalog.regclass, conname) AS "drop",
+       pg_catalog.format('ALTER TABLE %s ADD CONSTRAINT %I %s;',
+                         conrelid::pg_catalog.regclass, conname,
+                         pg_catalog.pg_get_constraintdef(oid)) AS "add"
+FROM pg_catalog.pg_constraint c
+WHERE contype = 'f' AND conparentid = 0 AND
+   (SELECT count(*) FROM pg_catalog.pg_constraint c2
+    WHERE c2.conparentid = c.oid) <>
+   (SELECT count(*) FROM pg_catalog.pg_inherits i
+    WHERE (i.inhparent = c.conrelid OR i.inhparent = c.confrelid) AND
+      EXISTS (SELECT 1 FROM pg_catalog.pg_partitioned_table
+              WHERE partrelid = i.inhparent));
+
+      Since it is possible that one or more of the ADD
+      CONSTRAINT steps will fail, you should save the query's
+      output in a file and then attempt to perform each step.
      
     
 
@@ -124,60 +147,6 @@ Branch: REL_17_STABLE [8148e7124] 2024-11-06 14:44:35 -0800
 
     
 
-     
-      Avoid possible crashes and could not open relation
-      errors in queries on a partitioned table occurring concurrently with
-      a DETACH CONCURRENTLY and immediate drop of a
-      partition (Álvaro Herrera, Kuntal Gosh)
-      §
-      §
-     
-    
-
-    
-
-     
-      Disallow ALTER TABLE ATTACH PARTITION if the
-      table to be attached has a foreign key referencing the partitioned
-      table (Álvaro Herrera)
-      §
-     
-
-     
-      This arrangement is not supported, and other ways of creating it
-      already fail.
-     
-    
-
-    
-
-     
-      Fix performance regressions involving flattening of subqueries
-      underneath outer joins that are later reduced to plain joins
-      (Tom Lane)
-      §
-     
-
-     
-      v16 failed to optimize some queries as well as prior versions had,
-      because of overoptimistic simplification of query-pullup logic.
-     
-    
-
-    
-
-     
-      Allow cancellation of the second stage of index build for large hash
-      indexes (Pavel Borisov)
-      §
-     
-    
-
-    
-
-     
-      Fix checking of key uniqueness in JSON object constructors
-      (Junwang Zhao, Tomas Vondra)
-      §
-     
-
-     
-      When building an object larger than a kilobyte, it was possible to
-      accept invalid input that includes duplicate object keys, or to
-      falsely report that duplicate keys are present.
-     
-    
-
-    
-
-     
-      Report the active query ID for statistics purposes at the start of
-      processing of Bind and Execute protocol messages (Sami Imseih)
-      §
-     
-
-     
-      This allows more of the work done in extended query protocol to be
-      attributed to the correct query.
-     
-    
-
-    
-
-     
-      Guard against stack overflow in libxml2
-      with too-deeply-nested XML input (Tom Lane, with hat tip to Nick
-      Wellnhofer)
-      §
-     
-
-     
-      Use xmlXPathCtxtCompile() rather
-      than xmlXPathCompile(), because the latter
-      fails to protect itself against recursion-to-stack-overflow
-      in libxml2 releases before 2.13.4.
-     
-    
-
-    
-
-     
-      Fix some whitespace issues in the result
-      of XMLSERIALIZE(... INDENT) (Jim Jones)
-      §
-     
-
-     
-      Fix failure to indent nodes separated by whitespace, and ensure that
-      a trailing newline is not added.
-     
-    
-
-    
-
-     
-      Do not ignore a concurrent REINDEX CONCURRENTLY
-      that is working on an index with predicates or expressions (Michail
-      Nikolaev)
-      §
-     
-
-     
-      Normally, REINDEX CONCURRENTLY does not need to
-      wait for other REINDEX CONCURRENTLY operations on
-      other tables.  However, this optimization is not applied if the
-      other REINDEX CONCURRENTLY is processing an index
-      with predicates or expressions, on the chance that such expressions
-      contain user-defined code that accesses other tables.  Careless
-      coding created a race condition such that that rule was not applied
-      uniformly, possibly allowing inconsistent behavior.
-     
-    
-
-    
-
-     
-      Fix mis-deparsing of ORDER BY lists when there is
-      a name conflict (Tom Lane)
-      §
-     
-
-     
-      If an ORDER BY item in SELECT
-      is a bare identifier, the parser first seeks it as an output column
-      name of the SELECT, for SQL92 compatibility.
-      However, ruleutils.c expects the SQL99 interpretation where such a
-      name is an input column name.  So it was possible to produce an
-      incorrect display of a view in the (rather ill-advised) case where
-      some other column is renamed in the SELECT output
-      list to match an input column used in ORDER BY.
-      Fix by table-qualifying such names in the dumped view text.
-     
-    
-
-    
-
-     
-      Fix failed to find plan for subquery/CTE errors
-      in EXPLAIN (Richard Guo, Tom Lane)
-      §
-      §
-     
-
-     
-      This case arose while trying to print references to fields of a
-      RECORD-type output of a subquery when the subquery has been
-      optimized out of the plan altogether (which is possible at least in
-      the case that it has a constant-false WHERE
-      condition).  Nothing remains in the plan to identify the original
-      field names, so fall back to
-      printing fN for
-      the N'th record column.  (That's actually
-      the right thing anyway, if the record output arose from
-      a ROW() constructor.)
-     
-    
-
-    
-
-     
-      Disallow a USING clause when altering the type of
-      a generated column (Peter Eisentraut)
-      §
-     
-
-     
-      A generated column already has an expression specifying the column
-      contents, so including USING doesn't make sense.
-     
-    
-
-    
-
-     
-      Fix incorrect output of the pg_stat_io view
-      on 32-bit machines (Bertrand Drouvot)
-      §
-     
-
-     
-      The stats_reset timestamp column
-      contained garbage on such hardware.
-     
-    
-
-    
-
-     
-      Prevent mis-encoding of trailing junk after numeric
-      literal error messages (Karina Litskevich)
-      §
-     
-
-     
-      We do not allow identifiers to appear immediately following numeric
-      literals (there must be some whitespace between).  If a multibyte
-      character immediately followed a numeric literal, the syntax error
-      message about it included only the first byte of that character,
-      causing bad-encoding problems both in the report to the client and
-      in the postmaster log file.
-     
-    
-
-    
-
-     
-      In a logical replication apply worker, ensure that origin progress
-      is not advanced during an error or apply worker shutdown (Hayato
-      Kuroda, Shveta Malik)
-      §
-     
-
-     
-      This avoids possible loss of a transaction, since once the origin
-      progress point is advanced the source server won't send that data
-      again.
-     
-    
-
-    
-
-     
-      Re-disable sending of stateless (TLSv1.2) session tickets
-      (Daniel Gustafsson)
-      §
-     
-
-     
-      A previous change to prevent sending of stateful (TLSv1.3) session
-      tickets accidentally re-enabled sending of stateless ones.  Thus,
-      while we intended to prevent clients from thinking that TLS session
-      resumption is supported, some still did.
-     
-    
-
-    
-
-     
-      Avoid wrong tuple length failure when dropping a
-      database with many ACL (permission) entries (Ayush Tiwari)
-      §
-      §
-     
-    
-
-    
-
-     
-      Allow adjusting the session_authorization
-      and role settings in parallel workers (Tom Lane)
-      §
-     
-
-     
-      Our code intends to allow modifiable server settings to be set by
-      function SET clauses, but not otherwise within a
-      parallel worker.  SET clauses failed for these
-      two settings, though.
-     
-    
-
-    
-
-     
-      Fix cache lookup failed for function errors in edge
-      cases in PL/pgSQL's CALL (Tom Lane)
-      §
-     
-    
-
-    
-
-     
-      Fix thread safety of our fallback (non-OpenSSL) MD5 implementation
-      on big-endian hardware (Heikki Linnakangas)
-      §
-     
-
-     
-      Thread safety is not currently a concern in the server, but it is
-      for libpq.
-     
-    
-
-    
-
-     
-      Avoid use of pnstrdup()
-      in ecpglib (Jacob Champion)
-      §
-     
-
-     
-      That function will call exit() on
-      out-of-memory, which is undesirable in a library.  The calling code
-      already handles allocation failures properly.
-     
-    
-
-    
-
-     
-      Fix memory leak in psql during repeated
-      use of \bind (Michael Paquier)
-      §
-     
-    
-
-    
-
-     
-      Fix pg_dump's handling of identity
-      sequences that have persistence different from their owning table's
-      persistence (Tom Lane)
-      §
-     
-
-     
-      Since v15, it's been possible to set an identity sequence to be
-      LOGGED when its owning table is UNLOGGED or vice versa.
-      However, pg_dump's method for recreating
-      that situation failed in binary-upgrade mode,
-      causing pg_upgrade to fail when such
-      sequences are present.  Fix by introducing a new option
-      for ADD/ALTER COLUMN GENERATED AS IDENTITY to
-      allow the sequence's persistence to be set correctly at creation.
-      Note that this means a dump from a database containing such a
-      sequence will only load into a server of this minor version or
-      newer.
-     
-    
-
-    
-
@@ -1396,67 +882,6 @@ Branch: REL_17_STABLE [0d635b615] 2024-11-04 10:04:26 -0500
 
     
 
-     
-      Include the source timeline history
-      in pg_rewind's debug output
-      (Heikki Linnakangas)
-      §
-     
-
-     
-      This was the intention to begin with, but a coding error caused the
-      source history to always print as empty.
-     
-    
-
-    
-
-     
-      Fix misbehavior with junction points on Windows, particularly
-      in pg_rewind (Alexandra Wang)
-     
-
-     
-      This entailed back-patching previous fixes by Thomas Munro, Peter
-      Eisentraut, Alexander Lakhin, and Juan José Santamaría Flecha.
-      Those changes were originally not back-patched out of caution, but
-      they have been in use in later branches for long enough to deem
-      them safe.
-     
-    
-
-    
-
-     
-      Allow inspection of sequence relations in relevant functions
-      of contrib/pageinspect
-      and contrib/pgstattuple (Nathan Bossart, Ayush
-      Vatsa)
-      §
-      §
-     
-
-     
-      This had been allowed in the past, but it got broken during the
-      introduction of non-default access methods for tables.
-     
-    
-
-    
-
-     
-      Prevent nothing provides
-      perl(PostgreSQL::Test::Utils) failures while building RPM
-      packages of PostgreSQL (Noah Misch)
-     
-    
-
-    
-
-     
-      Fix building with Strawberry Perl on Windows (Andrew Dunstan)
-      §
-     
-    
-
-    
-
-     
-      Prevent missing declaration for inet_pton compiler
-      warning or error when building with MinGW (Thomas Munro, Andrew
-      Dunstan)
-     
-    
-
-    
-