<!-- doc/src/sgml/release-9.5.sgml -->
<!-- See header comment in release.sgml about typical markup -->

 <sect1 id="release-9-5-25">
  <title>Release 9.5.25</title>

  <formalpara>
  <title>Release date:</title>
  <para>2021-02-11</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.24.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <para>
   This is expected to be the last <productname>PostgreSQL</productname>
   release in the 9.5.X series.  Users are encouraged to update to a newer
   release branch soon.
  </para>

  <sect2>
   <title>Migration to Version 9.5.25</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, see the first changelog item below,
    which describes cases in which reindexing indexes after the upgrade
    may be advisable.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.20,
    see <xref linkend="release-9-5-20">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [8a54e12a3] 2021-01-30 00:00:27 -0800
Branch: REL_13_STABLE [86a5b309c] 2021-01-30 00:00:42 -0800
Branch: REL_12_STABLE [be843ce29] 2021-01-30 00:01:56 -0800
Branch: REL_11_STABLE [d1ab4bf6e] 2021-01-30 00:02:08 -0800
Branch: REL_10_STABLE [179775135] 2021-01-30 00:02:11 -0800
Branch: REL9_6_STABLE [d683d6528] 2021-01-30 00:04:05 -0800
Branch: REL9_5_STABLE [77a0e14f0] 2021-01-30 00:05:34 -0800
-->
     <para>
      Fix <command>CREATE INDEX CONCURRENTLY</command> to wait for
      concurrent prepared transactions (Andrey Borodin)
     </para>

     <para>
      At the point where <command>CREATE INDEX CONCURRENTLY</command>
      waits for all concurrent transactions to complete so that it can see
      rows they inserted, it must also wait for all prepared transactions
      to complete, for the same reason.  Its failure to do so meant that
      rows inserted by prepared transactions might be omitted from the new
      index, causing queries relying on the index to miss such rows.
      In installations that have enabled prepared transactions
      (<varname>max_prepared_transactions</varname> &gt; 0),
      it's recommended to reindex any concurrently-built indexes in
      case this problem occurred when they were built.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a0efda88a] 2021-01-19 13:25:33 -0500
Branch: REL_13_STABLE [188cd4f44] 2021-01-19 13:25:40 -0500
Branch: REL_12_STABLE [625315996] 2021-01-19 13:25:45 -0500
Branch: REL_11_STABLE [794562d07] 2021-01-19 13:25:49 -0500
Branch: REL_10_STABLE [fac54bd5e] 2021-01-19 13:25:54 -0500
Branch: REL9_6_STABLE [fe8edbb82] 2021-01-19 13:26:01 -0500
Branch: REL9_5_STABLE [0ab177bec] 2021-01-19 13:26:05 -0500
-->
     <para>
      Avoid incorrect results when <literal>WHERE CURRENT OF</literal> is
      applied to a cursor whose plan contains a MergeAppend node (Tom
      Lane)
     </para>

     <para>
      This case is unsupported (in general, a cursor using <literal>ORDER
      BY</literal> is not guaranteed to be simply updatable); but the code
      previously did not reject it, and could silently give false matches.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [60661bbf2] 2021-01-18 18:32:30 -0500
Branch: REL_13_STABLE [f0f53195b] 2021-01-18 18:32:40 -0500
Branch: REL_12_STABLE [ba80489c6] 2021-01-18 18:32:45 -0500
Branch: REL_11_STABLE [de622e677] 2021-01-18 18:32:49 -0500
Branch: REL_10_STABLE [5cd94de77] 2021-01-18 18:32:55 -0500
Branch: REL9_6_STABLE [ffbf17463] 2021-01-18 18:33:02 -0500
Branch: REL9_5_STABLE [33a46993f] 2021-01-18 18:33:07 -0500
-->
     <para>
      Fix crash when <literal>WHERE CURRENT OF</literal> is applied to a
      cursor whose plan contains a custom scan node (David Geier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b1738ff6a] 2020-11-30 12:22:43 -0500
Branch: REL_13_STABLE [666a4de93] 2020-11-30 12:22:43 -0500
Branch: REL_12_STABLE [4f728a1f5] 2020-11-30 12:22:43 -0500
Branch: REL_11_STABLE [caecab229] 2020-11-30 12:22:43 -0500
Branch: REL_10_STABLE [785f4462d] 2020-11-30 12:22:43 -0500
Branch: REL9_6_STABLE [ab4cbb4bc] 2020-11-30 12:22:43 -0500
Branch: REL9_5_STABLE [8c5da2d51] 2020-11-30 12:22:43 -0500
-->
     <para>
      Fix planner's handling of a placeholder that is computed at some
      join level and used only at that same level (Tom Lane)
     </para>

     <para>
      This oversight could lead to <quote>failed to build
      any <replaceable>N</replaceable>-way joins</quote> planner errors.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [660b89928] 2020-11-24 21:58:32 +0000
Branch: REL_13_STABLE [6dda05704] 2020-11-24 21:16:58 +0000
Branch: REL_12_STABLE [ae5aa26dc] 2020-11-24 21:17:02 +0000
Branch: REL_11_STABLE [018e7d98d] 2020-11-24 21:18:37 +0000
Branch: REL_10_STABLE [321c87e5c] 2020-11-24 21:18:59 +0000
Branch: REL9_6_STABLE [6402afd98] 2020-11-24 21:19:50 +0000
Branch: REL9_5_STABLE [59ed45e27] 2020-11-24 21:36:09 +0000
-->
     <para>
      Be more careful about whether index AMs support mark/restore
      (Andrew Gierth)
     </para>

     <para>
      This prevents errors about missing support functions in rare edge
      cases.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [21378e1fe] 2021-01-20 11:38:17 +0900
Branch: REL_13_STABLE [31e0f9d76] 2021-01-20 11:39:14 +0900
Branch: REL_12_STABLE [5ad672fc2] 2021-01-20 11:39:17 +0900
Branch: REL_11_STABLE [1c3a4d44d] 2021-01-20 11:39:21 +0900
Branch: REL_10_STABLE [74ee3abcf] 2021-01-20 11:39:24 +0900
Branch: REL9_6_STABLE [7dc3be9df] 2021-01-20 11:39:31 +0900
Branch: REL9_5_STABLE [0ddb529cf] 2021-01-20 11:39:35 +0900
-->
     <para>
      Fix <command>ALTER DEFAULT PRIVILEGES</command> to handle duplicated
      arguments safely (Michael Paquier)
     </para>

     <para>
      Duplicate role or schema names within the same command could lead
      to <quote>tuple already updated by self</quote> errors or
      unique-constraint violations.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [08db7c63f] 2020-12-25 10:41:59 -0800
Branch: REL_13_STABLE [9f8a48bb2] 2020-12-25 10:42:02 -0800
Branch: REL_12_STABLE [c96698806] 2020-12-25 10:42:03 -0800
Branch: REL_11_STABLE [e83e8509b] 2020-12-25 10:42:03 -0800
Branch: REL_10_STABLE [d7c197f46] 2020-12-25 10:42:03 -0800
Branch: REL9_6_STABLE [b81d3791e] 2020-12-25 10:42:04 -0800
Branch: REL9_5_STABLE [90383a613] 2020-12-25 10:42:04 -0800
Branch: REL_10_STABLE [d176b9d5e] 2020-12-25 11:02:56 -0800
Branch: REL9_6_STABLE [3f920e876] 2020-12-25 11:03:05 -0800
Branch: REL9_5_STABLE [14649bf50] 2020-12-25 11:06:23 -0800
-->
     <para>
      Flush ACL-related caches when <structname>pg_authid</structname>
      changes (Noah Misch)
     </para>

     <para>
      This change ensures that permissions-related decisions will promptly
      reflect the results of <command>ALTER ROLE ... [NO] INHERIT</command>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f7f83a55b] 2020-12-01 14:02:27 -0500
Branch: REL_13_STABLE [dffc82a5b] 2020-12-01 14:02:27 -0500
Branch: REL_12_STABLE [5f9b05ada] 2020-12-01 14:02:28 -0500
Branch: REL_11_STABLE [28bb8c496] 2020-12-01 14:02:28 -0500
Branch: REL_10_STABLE [d98e27dc6] 2020-12-01 14:02:28 -0500
Branch: REL9_6_STABLE [f00c44002] 2020-12-01 14:02:28 -0500
Branch: REL9_5_STABLE [fb500296d] 2020-12-01 14:02:28 -0500
-->
     <para>
      Prevent misprocessing of ambiguous <command>CREATE TABLE
      LIKE</command> clauses (Tom Lane)
     </para>

     <para>
      A <literal>LIKE</literal> clause is re-examined after initial
      creation of the new table, to handle importation of indexes and
      such.  It was possible for this re-examination to find a different
      table of the same name, causing unexpected behavior; one example is
      where the new table is a temporary table of the same name as
      the <literal>LIKE</literal> target.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [97390fe8a] 2020-11-19 15:03:17 -0500
Branch: REL_13_STABLE [98f3f1d5c] 2020-11-19 15:03:17 -0500
Branch: REL_12_STABLE [87ab46421] 2020-11-19 15:03:17 -0500
Branch: REL_11_STABLE [c690ebbef] 2020-11-19 15:03:17 -0500
Branch: REL_10_STABLE [513db7b70] 2020-11-19 15:03:17 -0500
Branch: REL9_6_STABLE [159b6775f] 2020-11-19 15:03:17 -0500
Branch: REL9_5_STABLE [6631d5f26] 2020-11-19 15:03:17 -0500
-->
     <para>
      Rearrange order of operations in <command>CREATE TABLE
      LIKE</command> so that indexes are cloned before building foreign
      key constraints (Tom Lane)
     </para>

     <para>
      This fixes the case where a self-referential foreign key constraint
      declared in the outer <command>CREATE TABLE</command> depends on an
      index that's coming from the <literal>LIKE </literal> clause.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [dd705a039] 2021-02-06 15:17:01 -0500
Branch: REL_13_STABLE [4353bc878] 2021-02-06 15:17:01 -0500
Branch: REL_12_STABLE [f73321957] 2021-02-06 15:17:01 -0500
Branch: REL_11_STABLE [580069037] 2021-02-06 15:17:02 -0500
Branch: REL_10_STABLE [ad85e5efa] 2021-02-06 15:17:02 -0500
Branch: REL9_6_STABLE [7736ab05f] 2021-02-06 15:17:02 -0500
Branch: REL9_5_STABLE [5ad03374b] 2021-02-06 15:17:02 -0500
-->
     <para>
      Disallow converting an inheritance child table to a view
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [9f35f9437] 2020-12-01 13:21:03 +1300
Branch: REL_13_STABLE [fd3a75d82] 2020-12-01 13:22:01 +1300
Branch: REL_12_STABLE [50f338574] 2020-12-01 13:37:00 +1300
Branch: REL_11_STABLE [d5706ad7b] 2020-12-01 13:46:27 +1300
Branch: REL_10_STABLE [22701755d] 2020-12-01 14:43:04 +1300
Branch: REL9_6_STABLE [d0bbe2122] 2020-12-01 14:50:41 +1300
Branch: REL9_5_STABLE [e00928de8] 2020-12-01 14:54:49 +1300
-->
     <para>
      Ensure that disk space allocated for a dropped relation is released
      promptly at commit (Thomas Munro)
     </para>

     <para>
      Previously, if the dropped relation spanned multiple 1GB segments,
      only the first segment was truncated immediately.  Other segments
      were simply unlinked, which doesn't authorize the kernel to release
      the storage so long as any other backends still have the files open.
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [c444472af] 2021-02-05 11:14:56 +0200
Branch: REL_13_STABLE [c87cbd51e] 2021-02-05 11:19:48 +0200
Branch: REL_12_STABLE [9b0ce8957] 2021-02-05 11:16:33 +0200
Branch: REL_11_STABLE [d9b4163c5] 2021-02-05 11:16:53 +0200
Branch: REL_10_STABLE [c06632e48] 2021-02-05 11:17:07 +0200
Branch: REL9_6_STABLE [e152ccc7f] 2021-02-05 11:17:13 +0200
Branch: REL9_5_STABLE [aaf266157] 2021-02-05 11:17:27 +0200
-->
     <para>
      Fix handling of backslash-escaped multibyte characters
      in <command>COPY FROM</command> (Heikki Linnakangas)
     </para>

     <para>
      A backslash followed by a multibyte character was not handled
      correctly.  In some client character encodings, this could lead to
      misinterpreting part of a multibyte character as a field separator
      or end-of-copy-data marker.
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [2cccb627f] 2020-11-18 12:39:15 +0200
Branch: REL_13_STABLE [340ae3cfb] 2020-11-20 14:41:14 +0200
Branch: REL_12_STABLE [888fa2bae] 2020-11-20 14:46:47 +0200
Branch: REL_11_STABLE [57b5d8484] 2020-11-20 14:49:25 +0200
Branch: REL_10_STABLE [1dbe627fd] 2020-11-20 14:49:42 +0200
Branch: REL9_6_STABLE [02a2dbe91] 2020-11-20 14:57:15 +0200
Branch: REL9_5_STABLE [ded7db4c1] 2020-11-20 14:57:51 +0200
-->
     <para>
      Avoid preallocating executor hash tables
      in <command>EXPLAIN</command> without <literal>ANALYZE</literal>
      (Alexey Bashtanov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9c83b54a9] 2020-11-28 14:03:40 -0500
Branch: REL_13_STABLE [f5de090cc] 2020-11-28 14:03:40 -0500
Branch: REL_12_STABLE [cbc7a7a10] 2020-11-28 14:03:40 -0500
Branch: REL_11_STABLE [40f2fbe71] 2020-11-28 14:03:40 -0500
Branch: REL_10_STABLE [f6324bbbe] 2020-11-28 14:03:40 -0500
Branch: REL9_6_STABLE [8a4069766] 2020-11-28 14:03:40 -0500
Branch: REL9_5_STABLE [60d6c7143] 2020-11-28 14:03:40 -0500
-->
     <para>
      Fix recently-introduced race conditions
      in <command>LISTEN</command>/<command>NOTIFY</command> queue
      handling (Tom Lane)
     </para>

     <para>
      A newly-listening backend could attempt to read SLRU pages that
      were in process of being truncated, possibly causing an error.
     </para>

     <para>
      The queue tail pointer could become
      set to a value that's not equal to the queue position of any
      backend, resulting in effective disabling of the queue truncation
      logic.  Continued use of <command>NOTIFY</command> then led to
      queue-fill warnings, and eventually to inability to send any more
      notifies until the server is restarted.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ff5d5611c] 2020-12-21 13:11:50 -0500
Branch: REL_13_STABLE [38d30a14b] 2020-12-21 13:11:51 -0500
Branch: REL_12_STABLE [38bef9e43] 2020-12-21 13:11:29 -0500
Branch: REL_11_STABLE [75c8ef5ae] 2020-12-21 13:11:29 -0500
Branch: REL_10_STABLE [542248f9d] 2020-12-21 13:11:30 -0500
Branch: REL9_6_STABLE [1d5f3f976] 2020-12-21 13:11:30 -0500
Branch: REL9_5_STABLE [edcdbc44e] 2020-12-21 13:11:30 -0500
-->
     <para>
      Allow the <type>jsonb</type> concatenation operator to handle all
      combinations of JSON data types (Tom Lane)
     </para>

     <para>
      We can concatenate two JSON objects or two JSON arrays.  Handle
      other cases by wrapping non-array inputs in one-element arrays,
      then performing an array concatenation.  Previously, some
      combinations of inputs followed this rule but others arbitrarily
      threw an error.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [afcc8772e] 2021-01-08 12:16:00 -0500
Branch: REL_13_STABLE [49c928c0c] 2021-01-08 12:16:00 -0500
Branch: REL_12_STABLE [8354371d0] 2021-01-08 12:16:00 -0500
Branch: REL_11_STABLE [769908811] 2021-01-08 12:16:00 -0500
Branch: REL_10_STABLE [2d540ac5f] 2021-01-08 12:16:00 -0500
Branch: REL9_6_STABLE [085a1cfb3] 2021-01-08 12:16:00 -0500
Branch: REL9_5_STABLE [0c23f30fa] 2021-01-08 12:16:00 -0500
-->
     <para>
      Fix use of uninitialized value while parsing a <literal>*</literal>
      quantifier in a BRE-mode regular expression (Tom Lane)
     </para>

     <para>
      This error could cause the quantifier to act non-greedy, that is
      behave like a <literal>*?</literal> quantifier would do in full
      regular expressions.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [6db992833] 2021-01-16 12:21:35 -0800
Branch: REL_13_STABLE [6eb3fc7fc] 2021-01-16 12:21:38 -0800
Branch: REL_12_STABLE [66087f7e9] 2021-01-16 12:21:39 -0800
Branch: REL_11_STABLE [677f6cb1d] 2021-01-16 12:21:39 -0800
Branch: REL_10_STABLE [9afba9b0e] 2021-01-16 12:21:39 -0800
Branch: REL9_6_STABLE [1a31d8c52] 2021-01-16 12:21:39 -0800
Branch: REL9_5_STABLE [c424c75f5] 2021-01-16 12:21:39 -0800
-->
     <para>
      Prevent possible data loss from incorrect detection of the
      wraparound point of an SLRU log
      (Noah Misch)
     </para>

     <para>
      The wraparound point typically falls in the middle of a page, which
      must be rounded off to a page boundary, and that was not done
      correctly.  No issue could arise unless an installation had gotten
      to within one page of SLRU overflow, which is unlikely in a
      properly-functioning system.  If this did happen, it would manifest
      in later <quote>apparent wraparound</quote> or <quote>could not
      access status of transaction</quote> errors.
     </para>
    </listitem>

    <listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [ee1b38f65] 2021-01-13 08:19:50 +0530
Branch: REL_13_STABLE [0685c5c1b] 2021-01-13 08:31:45 +0530
Branch: REL_12_STABLE [0b2ae3c92] 2021-01-13 08:40:06 +0530
Branch: REL_11_STABLE [7adc408f4] 2021-01-13 08:50:13 +0530
Branch: REL_10_STABLE [636b6f99c] 2021-01-13 09:01:57 +0530
Branch: REL9_6_STABLE [f2b268ee0] 2021-01-13 09:12:59 +0530
Branch: REL9_5_STABLE [4bccceaa9] 2021-01-13 09:22:03 +0530
-->
     <para>
      Fix memory leak in walsender processes while sending new snapshots
      for logical decoding (Amit Kapila)
     </para>
    </listitem>

    <listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
Branch: master [a58db3aa1] 2020-12-14 23:47:30 -0800
Branch: REL_13_STABLE [fde5f130c] 2020-12-14 23:48:44 -0800
Branch: REL_12_STABLE [706d84fe7] 2020-12-14 23:48:04 -0800
Branch: REL_11_STABLE [4ee058a3b] 2020-12-14 23:49:06 -0800
Branch: REL_10_STABLE [ac7df6e8f] 2020-12-14 23:49:29 -0800
Branch: REL9_6_STABLE [f10da1e9c] 2020-12-14 23:49:57 -0800
Branch: REL9_5_STABLE [133a0906d] 2020-12-14 23:50:20 -0800
-->
     <para>
      Fix walsender to accept additional commands after
      terminating replication (Jeff Davis)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [07d46fceb] 2021-01-25 13:03:43 -0500
Branch: REL_13_STABLE [a26194f22] 2021-01-25 13:03:11 -0500
Branch: REL_12_STABLE [4641b2a30] 2021-01-25 13:03:11 -0500
Branch: REL_11_STABLE [a7cdd3f71] 2021-01-25 13:03:11 -0500
Branch: REL_10_STABLE [d09e8789f] 2021-01-25 13:03:11 -0500
Branch: REL9_6_STABLE [57a7d6f49] 2021-01-25 13:03:12 -0500
Branch: REL9_5_STABLE [41309f716] 2021-01-25 13:03:12 -0500
-->
     <para>
      Avoid assertion failure in <function>pg_get_functiondef()</function>
      when examining a function with a <literal>TRANSFORM</literal> option
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7e5e1bba0] 2020-11-29 15:22:04 -0500
Branch: REL_13_STABLE [72b930f50] 2020-11-29 15:22:04 -0500
Branch: REL_12_STABLE [3958abdad] 2020-11-29 15:22:04 -0500
Branch: REL_11_STABLE [777ac03a6] 2020-11-29 15:22:04 -0500
Branch: REL_10_STABLE [946277fd4] 2020-11-29 15:22:04 -0500
Branch: REL9_6_STABLE [3f59a05f0] 2020-11-29 15:22:04 -0500
Branch: REL9_5_STABLE [e2d5de150] 2020-11-29 15:22:04 -0500
-->
     <para>
      In <application>psql</application>, re-allow including a password
      in a <replaceable>connection_string</replaceable> argument of a
      <command>\connect</command> command (Tom Lane)
     </para>

     <para>
      This used to work, but a recent bug fix caused the password to be
      ignored (resulting in prompting for a password).
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f76a85000] 2021-01-26 13:04:52 -0500
Branch: REL_13_STABLE [64bdb6e5f] 2021-01-26 13:04:52 -0500
Branch: REL_12_STABLE [82f97d33f] 2021-01-26 13:04:52 -0500
Branch: REL_11_STABLE [3fa7b9078] 2021-01-26 13:04:52 -0500
Branch: REL_10_STABLE [564cb2579] 2021-01-26 13:04:52 -0500
Branch: REL9_6_STABLE [2c2e134b7] 2021-01-26 13:04:52 -0500
Branch: REL9_5_STABLE [131825cd5] 2021-01-26 13:04:52 -0500
-->
     <para>
      Fix assorted bugs
      in <application>psql</application>'s <command>\help</command>
      command (Kyotaro Horiguchi, Tom Lane)
     </para>

     <para>
      <command>\help</command> with two argument words failed to find a
      command description using only the first word, for
      example <literal>\help reset all</literal> should show the help
      for <command>RESET</command> but did not.
      Also, <command>\help</command> often failed to invoke the pager when
      it should.  It also leaked memory.
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [2b4f31303] 2020-12-03 15:57:48 +0200
Branch: REL_13_STABLE [abd0abfb7] 2020-12-03 15:57:52 +0200
Branch: REL_12_STABLE [020f153db] 2020-12-03 15:57:54 +0200
Branch: REL_11_STABLE [63e316f0b] 2020-12-03 15:57:57 +0200
Branch: REL_10_STABLE [8b5c353ec] 2020-12-03 15:58:00 +0200
Branch: REL9_6_STABLE [0740857de] 2020-12-03 15:58:02 +0200
Branch: REL9_5_STABLE [81e3c868f] 2020-12-03 15:58:06 +0200
Branch: master [36a4ac20f] 2020-12-04 18:26:46 +0200
Branch: REL_13_STABLE [e41a2efbc] 2020-12-04 18:24:34 +0200
Branch: REL_12_STABLE [ad3fb04b9] 2020-12-04 18:24:57 +0200
Branch: REL_11_STABLE [cda50f211] 2020-12-04 18:25:12 +0200
Branch: REL_10_STABLE [45d363145] 2020-12-04 18:25:23 +0200
Branch: REL9_6_STABLE [a075c84f2] 2020-12-04 18:25:45 +0200
Branch: REL9_5_STABLE [1dd608bba] 2020-12-04 18:25:54 +0200
Branch: master [6ba581cf1] 2020-12-07 14:50:20 +0200
Branch: REL_13_STABLE [e6dc04d43] 2020-12-07 14:50:37 +0200
Branch: REL_12_STABLE [98f8cdd48] 2020-12-07 14:55:22 +0200
Branch: REL_11_STABLE [10d9c9d03] 2020-12-07 14:55:23 +0200
Branch: REL_10_STABLE [d137b14c3] 2020-12-07 14:55:25 +0200
Branch: REL9_6_STABLE [3ea8e660c] 2020-12-07 14:55:27 +0200
Branch: REL9_5_STABLE [beb6b45ab] 2020-12-07 14:55:28 +0200
-->
     <para>
      In <application>pg_rewind</application>, ensure that all WAL is
      accounted for when rewinding a standby server
      (Ian Barwick, Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: REL_13_STABLE [f17e8f33f] 2021-01-26 16:42:13 -0300
Branch: REL_12_STABLE [fdf9d0054] 2021-01-26 16:42:13 -0300
Branch: REL_11_STABLE [fdd405c63] 2021-01-26 16:42:13 -0300
Branch: REL_10_STABLE [11a708f81] 2021-01-26 16:42:13 -0300
Branch: REL9_6_STABLE [bcae842b9] 2021-01-26 16:42:13 -0300
Branch: REL9_5_STABLE [f2dc96236] 2021-01-26 16:42:13 -0300
-->
     <para>
      Report the correct database name in connection failure error
      messages from some client programs (&Aacute;lvaro Herrera)
     </para>

     <para>
      If the database name was defaulted rather than given on the command
      line, <application>pg_dumpall</application>,
      <application>pgbench</application>, <application>oid2name</application>,
      and <application>vacuumlo</application> would produce misleading
      error messages after a connection failure.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5c0f7cc54] 2021-02-02 13:49:08 -0500
Branch: REL_13_STABLE [586891394] 2021-02-02 13:49:08 -0500
Branch: REL_12_STABLE [742846958] 2021-02-02 13:49:08 -0500
Branch: REL_11_STABLE [5fc5ff61c] 2021-02-02 13:49:08 -0500
Branch: REL_10_STABLE [2671125c7] 2021-02-02 13:49:08 -0500
Branch: REL9_6_STABLE [608cf2bfd] 2021-02-02 13:49:08 -0500
Branch: REL9_5_STABLE [f0f9ed68d] 2021-02-02 13:49:08 -0500
-->
     <para>
      Fix memory leak in <filename>contrib/auto_explain</filename>
      (Japin Li)
     </para>

     <para>
      Memory consumed while producing the <literal>EXPLAIN</literal>
      output was not freed until the end of the current transaction (for a
      top-level statement) or the end of the surrounding statement (for a
      nested statement).  This was particularly a problem
      with <varname>log_nested_statements</varname> enabled.
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [e3ebcca84] 2020-12-28 19:56:13 +0900
Branch: REL_13_STABLE [546f14374] 2020-12-28 19:57:51 +0900
Branch: REL_12_STABLE [e792ca4ac] 2020-12-28 19:59:00 +0900
Branch: REL_11_STABLE [294cdd7d0] 2020-12-28 19:59:40 +0900
Branch: REL_10_STABLE [744357d84] 2020-12-28 20:00:15 +0900
Branch: REL9_6_STABLE [03b7a1ee7] 2020-12-28 20:00:54 +0900
Branch: REL9_5_STABLE [b5c73eef8] 2020-12-28 20:01:31 +0900
-->
     <para>
      In <filename>contrib/postgres_fdw</filename>, avoid leaking open
      connections to remote servers when a user mapping or foreign server
      object is dropped (Bharath Rupireddy)
     </para>

     <para>
      Open connections that depend on a dropped user mapping or foreign
      server can no longer be referenced, but formerly they were kept
      around anyway for the duration of the local session.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [28d1601ad] 2020-12-08 15:22:12 +0900
Branch: REL_13_STABLE [dfd8bf2b9] 2020-12-08 15:22:38 +0900
Branch: REL_12_STABLE [d7ecba937] 2020-12-08 15:22:43 +0900
Branch: REL_11_STABLE [b88afd8b6] 2020-12-08 15:22:48 +0900
Branch: REL_10_STABLE [5ba1df0f1] 2020-12-08 15:22:53 +0900
Branch: REL9_6_STABLE [95992e5ed] 2020-12-08 15:22:59 +0900
Branch: REL9_5_STABLE [f95d9fd81] 2020-12-08 15:23:02 +0900
-->
     <para>
      In <filename>contrib/pgcrypto</filename>, check for error returns
      from OpenSSL's EVP functions (Michael Paquier)
     </para>

     <para>
      We do not really expect errors here, but this change silences
      warnings from static analysis tools.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [3836d4b64] 2020-11-12 14:34:37 +0000
Branch: REL_13_STABLE [48ab1fa30] 2020-11-12 14:59:06 +0000
Branch: REL_12_STABLE [7f69ed4ae] 2020-11-12 14:56:58 +0000
Branch: REL_11_STABLE [7e3dc147d] 2020-11-12 14:57:04 +0000
Branch: REL_10_STABLE [068de9dd4] 2020-11-12 14:57:08 +0000
Branch: REL9_6_STABLE [245a35f96] 2020-11-12 14:57:13 +0000
Branch: REL9_5_STABLE [4b212b7c8] 2020-11-12 14:55:51 +0000
-->
     <para>
      In <filename>contrib/pg_trgm</filename>'s GiST index support, avoid
      crash in the rare case that picksplit is called on exactly two index
      items (Andrew Gierth, Alexander Korotkov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ec29427ce] 2020-11-10 22:51:54 -0500
Branch: REL_13_STABLE [afce7908d] 2020-11-10 22:51:55 -0500
Branch: REL_12_STABLE [171c457cd] 2020-11-10 22:51:55 -0500
Branch: REL_11_STABLE [3a89ea0eb] 2020-11-10 22:51:56 -0500
Branch: REL_10_STABLE [e87139b43] 2020-11-10 22:51:57 -0500
Branch: REL9_6_STABLE [cd39c23a2] 2020-11-10 22:51:57 -0500
Branch: REL9_5_STABLE [210564a74] 2020-11-10 22:51:58 -0500
-->
     <para>
      Fix miscalculation of timeouts
      in <filename>contrib/pg_prewarm</filename>
      and <filename>contrib/postgres_fdw</filename>
      (Alexey Kondratov, Tom Lane)
     </para>

     <para>
      The main loop in <filename>contrib/pg_prewarm</filename>'s
      autoprewarm parent process underestimated its desired sleep time by
      a factor of 1000, causing it to consume much more CPU than intended.
      When waiting for a result from a remote
      server, <filename>contrib/postgres_fdw</filename> overestimated the
      desired timeout by a factor of 1000 (though this error had been
      mitigated by imposing a clamp to 60 seconds).
     </para>

     <para>
      Both of these errors stemmed from incorrectly converting
      seconds-and-microseconds to milliseconds.  Introduce a new
      API <function>TimestampDifferenceMilliseconds()</function>
      to make it easier to get this right in the future.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4823621db] 2021-01-15 11:28:51 -0500
Branch: REL_13_STABLE [f44ae4db5] 2021-01-15 11:29:05 -0500
Branch: REL_12_STABLE [f5d044eae] 2021-01-15 11:29:13 -0500
Branch: REL_11_STABLE [046c8face] 2021-01-15 11:29:18 -0500
Branch: REL_10_STABLE [5fa060c8f] 2021-01-15 11:29:26 -0500
Branch: REL9_6_STABLE [fc6d08b27] 2021-01-15 11:29:34 -0500
Branch: REL9_5_STABLE [3934543c2] 2021-01-15 11:29:43 -0500
Branch: master [9d23c15a0] 2021-01-20 12:07:23 -0500
Branch: REL_13_STABLE [6671e8194] 2021-01-20 12:07:31 -0500
Branch: REL_12_STABLE [561dd8d8a] 2021-01-20 12:07:35 -0500
Branch: REL_11_STABLE [cbcff1729] 2021-01-20 12:07:41 -0500
Branch: REL_10_STABLE [a3345383d] 2021-01-20 12:07:46 -0500
Branch: REL9_6_STABLE [cbcf7b130] 2021-01-20 12:07:52 -0500
Branch: REL9_5_STABLE [175f716a8] 2021-01-20 12:07:57 -0500
-->
     <para>
      Improve <application>configure</application>'s heuristics for
      selecting <varname>PG_SYSROOT</varname> on macOS (Tom Lane)
     </para>

     <para>
      The new method is more likely to produce desirable results when
      Xcode is newer than the underlying operating system.  Choosing
      a sysroot that does not match the OS version may result in
      nonfunctional executables.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [49407dc32] 2020-11-20 00:07:09 -0500
Branch: REL_13_STABLE [9e9a31bd0] 2020-11-20 00:58:26 -0500
Branch: REL_12_STABLE [5b8360427] 2020-11-20 00:58:26 -0500
Branch: REL_11_STABLE [d01e37845] 2020-11-20 00:58:26 -0500
Branch: REL_10_STABLE [153bf8d20] 2020-11-20 00:58:26 -0500
Branch: REL9_6_STABLE [e7abc1111] 2020-11-20 00:58:26 -0500
Branch: REL9_5_STABLE [2bb8c0f1d] 2020-11-20 00:58:26 -0500
-->
     <para>
      While building on macOS, specify <option>-isysroot</option> in
      link steps as well as compile steps (James Hilliard)
     </para>

     <para>
      This likewise improves the results when Xcode is out of sync with
      the operating system.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c7edf4ac2] 2021-01-24 16:29:47 -0500
Branch: REL_13_STABLE [58a545344] 2021-01-24 16:29:47 -0500
Branch: REL_12_STABLE [5db6ba303] 2021-01-24 16:29:47 -0500
Branch: REL_11_STABLE [c82c015b5] 2021-01-24 16:29:47 -0500
Branch: REL_10_STABLE [728971d5f] 2021-01-24 16:29:48 -0500
Branch: REL9_6_STABLE [7e0786751] 2021-01-24 16:29:48 -0500
Branch: REL9_5_STABLE [c26a0865d] 2021-01-24 16:29:48 -0500
-->
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2021a for DST law changes in Russia (Volgograd zone) and
      South Sudan, plus historical corrections for Australia, Bahamas,
      Belize, Bermuda, Ghana, Israel, Kenya, Nigeria, Palestine,
      Seychelles, and Vanuatu.
     </para>

     <para>
      Notably, the Australia/Currie zone has been corrected to the point
      where it is identical to Australia/Hobart.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-24">
  <title>Release 9.5.24</title>

  <formalpara>
  <title>Release date:</title>
  <para>2020-11-12</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.23.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <para>
   The <productname>PostgreSQL</productname> community will stop
   releasing updates for the 9.5.X release series in February 2021.
   Users are encouraged to update to a newer release branch soon.
  </para>

  <sect2>
   <title>Migration to Version 9.5.24</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.20,
    see <xref linkend="release-9-5-20">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [0c3185e96] 2020-11-09 07:32:09 -0800
Branch: REL_13_STABLE [c90c84b3f] 2020-11-09 07:32:12 -0800
Branch: REL_12_STABLE [ac8f6243c] 2020-11-09 07:32:12 -0800
Branch: REL_11_STABLE [43ebfea5a] 2020-11-09 07:32:13 -0800
Branch: REL_10_STABLE [f97ecea1e] 2020-11-09 07:32:13 -0800
Branch: REL9_6_STABLE [ff3de4c21] 2020-11-09 07:32:13 -0800
Branch: REL9_5_STABLE [aefc625de] 2020-11-09 07:32:14 -0800
-->
     <para>
      Block <command>DECLARE CURSOR ... WITH HOLD</command> and firing of
      deferred triggers within index expressions and materialized view
      queries (Noah Misch)
     </para>

     <para>
      This is essentially a leak in the <quote>security restricted
      operation</quote> sandbox mechanism.  An attacker having permission
      to create non-temporary SQL objects could parlay this leak to
      execute arbitrary SQL code as a superuser.
     </para>

     <para>
      The <productname>PostgreSQL</productname> Project thanks
      Etienne Stalmans for reporting this problem.
      (CVE-2020-25695)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a45bc8a4f] 2020-09-24 18:19:38 -0400
Branch: REL_13_STABLE [cb8885ac4] 2020-09-24 18:19:38 -0400
Branch: REL_12_STABLE [fb93f784f] 2020-09-24 18:19:38 -0400
Branch: REL_11_STABLE [1738a61c8] 2020-09-24 18:19:39 -0400
Branch: REL_10_STABLE [1888ff8d0] 2020-09-24 18:19:39 -0400
Branch: REL9_6_STABLE [7c154f2fd] 2020-09-24 18:19:39 -0400
Branch: REL9_5_STABLE [56b46d3a1] 2020-09-24 18:19:39 -0400
Branch: master [8e5793ab6] 2020-10-19 19:03:46 -0400
Branch: REL_13_STABLE [1814f915b] 2020-10-19 19:03:46 -0400
Branch: REL_12_STABLE [c6d0b9b16] 2020-10-19 19:03:46 -0400
Branch: REL_11_STABLE [5a9f99bed] 2020-10-19 19:03:47 -0400
Branch: REL_10_STABLE [68f236993] 2020-10-19 19:03:47 -0400
Branch: REL9_6_STABLE [5c78f7977] 2020-10-19 19:03:47 -0400
Branch: REL9_5_STABLE [da129a04a] 2020-10-19 19:03:47 -0400
-->
     <para>
      Fix usage of complex connection-string parameters
      in <application>pg_dump</application>,
      <application>pg_restore</application>,
      <application>clusterdb</application>,
      <application>reindexdb</application>,
      and <application>vacuumdb</application> (Tom Lane)
     </para>

     <para>
      The <option>-d</option> parameter
      of <application>pg_dump</application>
      and <application>pg_restore</application>, or
      the <option>--maintenance-db</option> parameter of the other
      programs mentioned, can be a <quote>connection string</quote>
      containing multiple connection parameters rather than just a
      database name.  In cases where these programs need to initiate
      additional connections, such as parallel processing or processing of
      multiple databases, the connection string was forgotten and just the
      basic connection parameters (database name, host, port, and
      username) were used for the additional connections.  This could lead
      to connection failures if the connection string included any other
      essential information, such as non-default SSL or GSS parameters.
      Worse, the connection might succeed but not be encrypted as
      intended, or be vulnerable to man-in-the-middle attacks that the
      intended connection parameters would have prevented.
      (CVE-2020-25694)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [85c54287a] 2020-10-21 16:19:00 -0400
Branch: REL_13_STABLE [2e4af4110] 2020-10-21 16:19:00 -0400
Branch: REL_12_STABLE [f656517ec] 2020-10-21 16:19:01 -0400
Branch: REL_11_STABLE [20be76d5c] 2020-10-21 16:19:01 -0400
Branch: REL_10_STABLE [8175da6e7] 2020-10-21 16:19:02 -0400
Branch: REL9_6_STABLE [870a23230] 2020-10-21 16:18:41 -0400
Branch: REL9_5_STABLE [6997da09a] 2020-10-21 16:18:41 -0400
-->
     <para>
      When <application>psql</application>'s <command>\connect</command>
      command re-uses connection parameters, ensure that all
      non-overridden parameters from a previous connection string are
      re-used (Tom Lane)
     </para>

     <para>
      This avoids cases where reconnection might fail due to omission of
      relevant parameters, such as non-default SSL or GSS options.
      Worse, the reconnection might succeed but not be encrypted as
      intended, or be vulnerable to man-in-the-middle attacks that the
      intended connection parameters would have prevented.
      This is largely the same problem as just cited
      for <application>pg_dump</application> et al,
      although <application>psql</application>'s behavior is more complex
      since the user may intentionally override some connection
      parameters.
      (CVE-2020-25694)
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [098fb0079] 2020-11-09 07:32:09 -0800
Branch: REL_13_STABLE [67029845b] 2020-11-09 07:32:12 -0800
Branch: REL_12_STABLE [3855e5b47] 2020-11-09 07:32:13 -0800
Branch: REL_11_STABLE [7b356c78f] 2020-11-09 07:32:13 -0800
Branch: REL_10_STABLE [a498db87b] 2020-11-09 07:32:13 -0800
Branch: REL9_6_STABLE [12fd81cb7] 2020-11-09 07:32:14 -0800
Branch: REL9_5_STABLE [a54dfbee1] 2020-11-09 07:32:14 -0800
-->
     <para>
      Prevent <application>psql</application>'s <command>\gset</command>
      command from modifying specially-treated variables (Noah Misch)
     </para>

     <para>
      <command>\gset</command> without a prefix would overwrite whatever
      variables the server told it to.  Thus, a compromised server could
      set specially-treated variables such as <varname>PROMPT1</varname>,
      giving the ability to execute arbitrary shell code in the user's
      session.
     </para>

     <para>
      The <productname>PostgreSQL</productname> Project thanks
      Nick Cleaton for reporting this problem.
      (CVE-2020-25696)
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [566372b3d] 2020-08-15 10:15:53 -0700
Branch: REL_13_STABLE Release: REL_13_0 [592a589a0] 2020-08-15 10:15:56 -0700
Branch: REL_12_STABLE [30e68a2ab] 2020-08-15 10:15:56 -0700
Branch: REL_11_STABLE [d4031d784] 2020-08-15 10:15:57 -0700
Branch: REL_10_STABLE [e525770dd] 2020-08-15 10:15:57 -0700
Branch: REL9_6_STABLE [5ae01df6f] 2020-08-15 10:15:57 -0700
Branch: REL9_5_STABLE [3fbbf64ce] 2020-08-15 10:15:57 -0700
Branch: REL_12_STABLE [06e50d8f7] 2020-08-15 16:15:59 -0700
Branch: REL_11_STABLE [6af0b12a5] 2020-08-15 16:16:15 -0700
Branch: REL_10_STABLE [e8e44e890] 2020-08-15 16:16:29 -0700
Branch: REL9_6_STABLE [85aa22cb1] 2020-08-15 16:16:34 -0700
Branch: REL9_5_STABLE [d8a22a387] 2020-08-15 16:16:42 -0700
-->
     <para>
      Prevent possible data loss from concurrent truncations of SLRU logs
      (Noah Misch)
     </para>

     <para>
      This rare problem would manifest in later <quote>apparent
      wraparound</quote> or <quote>could not access status of
      transaction</quote> errors.
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [aca74843e] 2020-09-24 10:39:52 +1200
Branch: REL_13_STABLE [052014a20] 2020-09-24 10:27:22 +1200
Branch: REL_12_STABLE [7664cc869] 2020-09-24 10:30:47 +1200
Branch: REL_11_STABLE [c5a5bd0bb] 2020-09-24 10:31:57 +1200
Branch: REL_10_STABLE [dd36d6b00] 2020-09-24 10:33:00 +1200
Branch: REL9_6_STABLE [d38e15979] 2020-09-24 10:35:10 +1200
Branch: REL9_5_STABLE [23d8b3577] 2020-09-24 10:36:27 +1200
-->
     <para>
      Ensure that SLRU directories are properly fsync'd during checkpoints
      (Thomas Munro)
     </para>

     <para>
      This prevents possible data loss in a subsequent operating system
      crash.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d907bd054] 2020-11-03 15:41:32 -0500
Branch: REL_13_STABLE [768dbef0d] 2020-11-03 15:41:32 -0500
Branch: REL_12_STABLE [136f87ea5] 2020-11-03 15:41:32 -0500
Branch: REL_11_STABLE [501035a0a] 2020-11-03 15:41:32 -0500
Branch: REL_10_STABLE [df4405b78] 2020-11-03 15:41:32 -0500
Branch: REL9_6_STABLE [04c4b495b] 2020-11-03 15:41:32 -0500
Branch: REL9_5_STABLE [77df80cf6] 2020-11-03 15:41:32 -0500
-->
     <para>
      Fix <command>ALTER ROLE</command> for users with
      the <literal>BYPASSRLS</literal> attribute (Tom Lane, Stephen Frost)
     </para>

     <para>
      The <literal>BYPASSRLS</literal> attribute is only allowed to be
      changed by superusers, but other <command>ALTER ROLE</command>
      operations, such as password changes, should be allowed with only
      ordinary permission checks.  The previous coding erroneously
      restricted all changes on such a role to superusers.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [502898192] 2020-08-21 15:00:47 -0400
Branch: REL_13_STABLE Release: REL_13_0 [894f5dea7] 2020-08-21 15:00:48 -0400
Branch: REL_12_STABLE [d9253df12] 2020-08-21 15:00:43 -0400
Branch: REL_11_STABLE [373796524] 2020-08-21 15:00:43 -0400
Branch: REL_10_STABLE [e22e29c25] 2020-08-21 15:00:43 -0400
Branch: REL9_6_STABLE [37681d7e9] 2020-08-21 15:00:43 -0400
Branch: REL9_5_STABLE [21f8b1811] 2020-08-21 15:00:43 -0400
Branch: master [19f5a37b9] 2020-09-13 12:51:21 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b380484a8] 2020-09-13 12:51:21 -0400
Branch: REL_12_STABLE [1371a1e41] 2020-09-13 12:51:21 -0400
Branch: REL_11_STABLE [f11210013] 2020-09-13 12:51:21 -0400
Branch: REL_10_STABLE [783a21eff] 2020-09-13 12:51:21 -0400
Branch: REL9_6_STABLE [1a9c93ec3] 2020-09-13 12:51:21 -0400
Branch: REL9_5_STABLE [86b8ef139] 2020-09-13 12:51:21 -0400
-->
     <para>
      Fix handling of expressions in <command>CREATE TABLE LIKE</command>
      with inheritance (Tom Lane)
     </para>

     <para>
      If a <command>CREATE TABLE</command> command uses
      both <literal>LIKE</literal> and traditional inheritance, column
      references in <literal>CHECK</literal> constraints and expression
      indexes that came from a <literal>LIKE</literal> parent table tended
      to get mis-numbered, resulting in wrong answers and/or bizarre error
      messages.  The same could happen in <literal>GENERATED</literal>
      expressions, in branches that have that feature.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [489c9c340] 2020-09-30 15:40:23 -0400
Branch: REL_13_STABLE [99fd38c02] 2020-09-30 15:40:23 -0400
Branch: REL_12_STABLE [c5232dca8] 2020-09-30 15:40:23 -0400
Branch: REL_11_STABLE [b0fe0b022] 2020-09-30 15:40:23 -0400
Branch: REL_10_STABLE [db96be24c] 2020-09-30 15:40:23 -0400
Branch: REL9_6_STABLE [19e798268] 2020-09-30 15:40:23 -0400
Branch: REL9_5_STABLE [4857e6fe1] 2020-09-30 15:40:23 -0400
-->
     <para>
      Fix off-by-one conversion of negative years to BC dates
      in <function>to_date()</function>
      and <function>to_timestamp()</function> (Dar Alathar-Yemen, Tom Lane)
     </para>

     <para>
      Also, arrange for the combination of a negative year and an
      explicit <quote>BC</quote> marker to cancel out and produce AD.
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [fd26f7823] 2020-09-29 16:21:46 +0900
Branch: REL_13_STABLE [059caf36c] 2020-09-29 16:23:57 +0900
Branch: REL_12_STABLE [4d342b9d4] 2020-09-29 16:24:20 +0900
Branch: REL_11_STABLE [462ff7966] 2020-09-29 16:24:47 +0900
Branch: REL_10_STABLE [334417538] 2020-09-29 16:25:08 +0900
Branch: REL9_6_STABLE [7be02a3bf] 2020-09-29 16:25:20 +0900
Branch: REL9_5_STABLE [40a8fb1e0] 2020-09-29 16:25:51 +0900
-->
     <para>
      Ensure that standby servers will archive WAL timeline history files
      when <varname>archive_mode</varname> is set
      to <literal>always</literal> (Grigory Smolkin, Fujii Masao)
     </para>

     <para>
      This oversight could lead to failure of subsequent PITR recovery
      attempts.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bedadc732] 2020-09-09 15:32:45 -0400
Branch: REL_13_STABLE Release: REL_13_0 [35e59398a] 2020-09-09 15:32:34 -0400
Branch: REL_12_STABLE [d038c6c63] 2020-09-09 15:32:34 -0400
Branch: REL_11_STABLE [67dde49a3] 2020-09-09 15:32:34 -0400
Branch: REL_10_STABLE [95cd8902e] 2020-09-09 15:32:34 -0400
Branch: REL9_6_STABLE [b2eaddd9b] 2020-09-09 15:32:34 -0400
Branch: REL9_5_STABLE [581855b6a] 2020-09-09 15:32:34 -0400
Branch: master [58c6feccf] 2020-09-10 12:06:37 -0400
Branch: REL_13_STABLE Release: REL_13_0 [3f29aa48b] 2020-09-10 12:06:26 -0400
Branch: REL_12_STABLE [4e10c0c8a] 2020-09-10 12:06:26 -0400
Branch: REL_11_STABLE [93871b693] 2020-09-10 12:06:26 -0400
Branch: REL_10_STABLE [ac695b8f2] 2020-09-10 12:06:26 -0400
Branch: REL9_6_STABLE [dc71c6409] 2020-09-10 12:06:26 -0400
Branch: REL9_5_STABLE [e2c9bedc9] 2020-09-10 12:06:26 -0400
-->
     <para>
      Avoid running <systemitem>atexit</systemitem> handlers when exiting
      due to SIGQUIT (Kyotaro Horiguchi, Tom Lane)
     </para>

     <para>
      Most server processes followed this practice already, but the
      archiver process was overlooked.  Backends that were still waiting
      for a client startup packet got it wrong, too.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4d346def1] 2020-08-22 14:46:40 -0400
Branch: REL_13_STABLE Release: REL_13_0 [de627adaa] 2020-08-22 14:46:40 -0400
Branch: REL_12_STABLE [6b701eaaa] 2020-08-22 14:46:40 -0400
Branch: REL_11_STABLE [b439adcab] 2020-08-22 14:46:40 -0400
Branch: REL_10_STABLE [6fa403e61] 2020-08-22 14:46:40 -0400
Branch: REL9_6_STABLE [d3701bc8a] 2020-08-22 14:46:40 -0400
Branch: REL9_5_STABLE [7edd36eae] 2020-08-22 14:46:40 -0400
-->
     <para>
      Avoid misoptimization of subquery qualifications that reference
      apparently-constant grouping columns (Tom Lane)
     </para>

     <para>
      A <quote>constant</quote> subquery output column isn't really
      constant if it is a grouping column that appears in only some of the
      grouping sets.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1e7629d2c] 2020-08-14 22:14:03 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b538e83f1] 2020-08-14 22:14:03 -0400
Branch: REL_12_STABLE [912fb290c] 2020-08-14 22:14:03 -0400
Branch: REL_11_STABLE [9d472b51e] 2020-08-14 22:14:03 -0400
Branch: REL_10_STABLE [dea07098a] 2020-08-14 22:14:03 -0400
Branch: REL9_6_STABLE [7241edc4f] 2020-08-14 22:14:03 -0400
Branch: REL9_5_STABLE [5190707d7] 2020-08-14 22:14:03 -0400
-->
     <para>
      Avoid failure when SQL function inlining changes the shape of a
      potentially-hashable subplan comparison expression (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [a811ea5bd] 2020-08-13 17:33:49 -0400
Branch: REL_13_STABLE Release: REL_13_0 [2f29fd4cb] 2020-08-13 17:33:49 -0400
Branch: REL_12_STABLE [1122a903e] 2020-08-13 17:33:49 -0400
Branch: REL_11_STABLE [704de3739] 2020-08-13 17:33:49 -0400
Branch: REL_10_STABLE [385cbe8e4] 2020-08-13 17:33:49 -0400
Branch: REL9_6_STABLE [e5902117d] 2020-08-13 17:33:49 -0400
Branch: REL9_5_STABLE [40bceae7b] 2020-08-13 17:33:49 -0400
Branch: master [6e70443ed] 2020-08-17 16:20:06 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b83f1bcca] 2020-08-17 16:20:06 -0400
Branch: REL_12_STABLE [4f47c8e7d] 2020-08-17 16:20:06 -0400
Branch: REL_11_STABLE [060e5bd70] 2020-08-17 16:20:06 -0400
Branch: REL_10_STABLE [3a45ac076] 2020-08-17 16:20:05 -0400
Branch: REL9_6_STABLE [d4d214903] 2020-08-17 16:20:05 -0400
Branch: REL9_5_STABLE [aa4da2674] 2020-08-17 16:20:05 -0400
-->
     <para>
      While building or re-building an index, tolerate the appearance of
      new HOT chains due to concurrent updates
      (Anastasia Lubennikova, &Aacute;lvaro Herrera)
     </para>

     <para>
      This oversight could lead to <quote>failed to find parent tuple for
      heap-only tuple</quote> errors.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [7577dd848] 2020-11-07 00:39:19 +0100
Branch: REL_13_STABLE [6a7b55f37] 2020-11-07 00:40:06 +0100
Branch: REL_12_STABLE [8149e9f9a] 2020-11-07 00:40:40 +0100
Branch: REL_11_STABLE [895d0f0e8] 2020-11-07 00:41:02 +0100
Branch: REL_10_STABLE [0b96fc977] 2020-11-07 00:41:19 +0100
Branch: REL9_6_STABLE [bae31e75f] 2020-11-07 00:41:36 +0100
Branch: REL9_5_STABLE [d2d3a4bd3] 2020-11-07 00:41:52 +0100
-->
     <para>
      Ensure that data is detoasted before being inserted into a BRIN
      index (Tomas Vondra)
     </para>

     <para>
      Index entries are not supposed to contain out-of-line TOAST
      pointers, but BRIN didn't get that memo.  This could lead to errors
      like <quote>missing chunk number 0 for toast value NNN</quote>.
      (If you are faced with such an error from an existing
      index, <command>REINDEX</command> should be enough to fix it.)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [1f42d35a1] 2020-08-12 15:33:36 -0400
Branch: REL_13_STABLE Release: REL_13_0 [8782ea2f3] 2020-08-12 15:33:36 -0400
Branch: REL_12_STABLE [0426c75e7] 2020-08-12 15:33:36 -0400
Branch: REL_11_STABLE [7af39993a] 2020-08-12 15:33:36 -0400
Branch: REL_10_STABLE [721ef4d28] 2020-08-12 15:33:36 -0400
Branch: REL9_6_STABLE [7a3c261fb] 2020-08-12 15:33:36 -0400
Branch: REL9_5_STABLE [ce3a8fde8] 2020-08-12 15:33:36 -0400
-->
     <para>
      Handle concurrent desummarization correctly during BRIN index scans
      (Alexander Lakhin, &Aacute;lvaro Herrera)
     </para>

     <para>
      Previously, if a page range was desummarized at just the wrong time,
      an index scan might falsely raise an error indicating index
      corruption.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [10564ee02] 2020-08-27 17:36:13 -0400
Branch: REL_13_STABLE Release: REL_13_0 [1df14a566] 2020-08-27 17:36:13 -0400
Branch: REL_12_STABLE [ff3c16d1e] 2020-08-27 17:36:13 -0400
Branch: REL_11_STABLE [11ecf4bd2] 2020-08-27 17:36:13 -0400
Branch: REL_10_STABLE [0d3ad6540] 2020-08-27 17:36:13 -0400
Branch: REL9_6_STABLE [0dfec43c8] 2020-08-27 17:36:13 -0400
Branch: REL9_5_STABLE [fabd2f9c9] 2020-08-27 17:36:13 -0400
-->
     <para>
      Fix rare <quote>lost saved point in index</quote> errors in scans of
      multicolumn GIN indexes (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [ced138e8c] 2020-09-15 21:03:14 -0300
Branch: REL_13_STABLE Release: REL_13_0 [873cb8fca] 2020-09-15 21:03:14 -0300
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL_12_STABLE [93f726c04] 2020-10-27 15:37:13 -0400
Branch: REL_11_STABLE [66c036b4f] 2020-10-27 15:37:13 -0400
Branch: REL_10_STABLE [41c742a43] 2020-10-27 15:37:13 -0400
Branch: REL9_6_STABLE [cc623ed2f] 2020-10-27 15:37:13 -0400
Branch: REL9_5_STABLE [7978ad025] 2020-10-27 15:37:13 -0400
-->
     <para>
      Fix use-after-free hazard when an event trigger monitors
      an <command>ALTER TABLE</command> operation (Jehan-Guillaume de
      Rorthais)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [19ad7e1d7] 2020-09-06 12:55:13 -0400
Branch: REL_13_STABLE Release: REL_13_0 [f04203ab7] 2020-09-06 12:55:28 -0400
Branch: REL_12_STABLE [f45dd3fed] 2020-09-06 12:55:37 -0400
Branch: REL_11_STABLE [baef6e5e9] 2020-09-06 12:55:44 -0400
Branch: REL_10_STABLE [f71b93b86] 2020-09-06 12:55:51 -0400
Branch: REL9_6_STABLE [2939f613f] 2020-09-06 12:55:59 -0400
Branch: REL9_5_STABLE [e0b4c7dd0] 2020-09-06 12:56:10 -0400
-->
     <para>
      Fix incorrect error message about inconsistent moving-aggregate
      data types (Jeff Janes)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [be4b0c007] 2020-09-03 16:52:09 -0400
Branch: REL_13_STABLE Release: REL_13_0 [17424e79d] 2020-09-03 16:52:09 -0400
Branch: REL_12_STABLE [82dd373f2] 2020-09-03 16:52:09 -0400
Branch: REL_11_STABLE [526df0a23] 2020-09-03 16:52:09 -0400
Branch: REL_10_STABLE [2a938c793] 2020-09-03 16:52:09 -0400
Branch: REL9_6_STABLE [2500e51e7] 2020-09-03 16:52:09 -0400
Branch: REL9_5_STABLE [3738651f5] 2020-09-03 16:52:09 -0400
-->
     <para>
      Avoid lockup when a parallel worker reports a very long error
      message (Vignesh C)
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: REL_13_STABLE [1f53d0b9f] 2020-10-20 14:09:16 +0200
Branch: REL_12_STABLE [bd0677bb8] 2020-10-20 14:31:52 +0200
Branch: REL_11_STABLE [6e03a8a30] 2020-10-20 14:50:43 +0200
Branch: REL_10_STABLE [f78ebbe68] 2020-10-20 15:19:47 +0200
Branch: REL9_6_STABLE [d4e654d15] 2020-10-20 15:35:31 +0200
Branch: REL9_5_STABLE [d27c18d26] 2020-10-20 17:22:41 +0200
-->
     <para>
      Avoid unnecessary failure when transferring very large payloads
      through shared memory queues (Markus Wanner)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e55f718fc] 2020-09-26 16:04:06 -0400
Branch: REL_13_STABLE [f7873900f] 2020-09-26 16:04:06 -0400
Branch: REL_12_STABLE [bda32733c] 2020-09-26 16:04:06 -0400
Branch: REL_11_STABLE [dd89ba578] 2020-09-26 16:04:06 -0400
Branch: REL_10_STABLE [de6725deb] 2020-09-26 16:04:06 -0400
Branch: REL9_6_STABLE [acab757ce] 2020-09-26 16:04:06 -0400
Branch: REL9_5_STABLE [bf34ae930] 2020-09-26 16:04:06 -0400
-->
     <para>
      Fix relation cache memory leaks with RLS policies (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [397ea901e] 2020-10-12 13:31:24 -0400
Branch: REL_13_STABLE [9343bfefa] 2020-10-12 13:31:24 -0400
Branch: REL_12_STABLE [f35c11770] 2020-10-12 13:31:24 -0400
Branch: REL_11_STABLE [cfa4cff30] 2020-10-12 13:31:24 -0400
Branch: REL_10_STABLE [a5c77e6b8] 2020-10-12 13:31:24 -0400
Branch: REL9_6_STABLE [c7573ab1e] 2020-10-12 13:31:24 -0400
Branch: REL9_5_STABLE [43ca5e07d] 2020-10-12 13:31:24 -0400
-->
     <para>
      Fix small memory leak when SIGHUP processing decides that a new GUC
      variable value cannot be applied without a restart (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b55b4dad9] 2020-09-01 13:14:44 -0400
Branch: REL_13_STABLE Release: REL_13_0 [4178b7499] 2020-09-01 13:14:44 -0400
Branch: REL_12_STABLE [55aea0c70] 2020-09-01 13:14:44 -0400
Branch: REL_11_STABLE [df8020b32] 2020-09-01 13:14:44 -0400
Branch: REL_10_STABLE [0c0a3a859] 2020-09-01 13:14:44 -0400
Branch: REL9_6_STABLE [ba23174dd] 2020-09-01 13:14:44 -0400
Branch: REL9_5_STABLE [8d486cfbf] 2020-09-01 13:14:44 -0400
Branch: master [4d41823c5] 2020-09-04 21:01:58 -0400
Branch: REL_13_STABLE Release: REL_13_0 [8df601bd4] 2020-09-04 21:01:59 -0400
Branch: REL_12_STABLE [fc37c6f61] 2020-09-04 21:01:59 -0400
Branch: REL_11_STABLE [d7ae549e3] 2020-09-04 21:01:59 -0400
Branch: REL_10_STABLE [546479f34] 2020-09-04 21:01:59 -0400
-->
     <para>
      Make <application>libpq</application> support arbitrary-length lines
      in <filename>.pgpass</filename> files (Tom Lane)
     </para>

     <para>
      This is mostly useful to allow using very long security tokens as
      passwords.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7d00a6b2d] 2020-10-17 16:53:48 -0400
Branch: REL_13_STABLE [d2074daeb] 2020-10-19 11:23:51 -0400
Branch: REL_12_STABLE [407580aab] 2020-10-19 11:23:51 -0400
Branch: REL_11_STABLE [883226441] 2020-10-19 11:23:52 -0400
Branch: REL_10_STABLE [6670e9107] 2020-10-19 11:23:52 -0400
Branch: REL9_6_STABLE [cdc7ace16] 2020-10-19 11:23:52 -0400
Branch: REL9_5_STABLE [6acc31a20] 2020-10-19 11:23:52 -0400
-->
     <para>
      In <application>libpq</application> for Windows,
      call <function>WSAStartup()</function> once per process
      and <function>WSACleanup()</function> not at all (Tom Lane,
      Alexander Lakhin)
     </para>

     <para>
      Previously, <application>libpq</application>
      invoked <function>WSAStartup()</function> at connection start
      and <function>WSACleanup()</function> at connection cleanup.
      However, it appears that calling <function>WSACleanup()</function>
      can interfere with other program operations; notably, we have
      observed rare failures to emit expected output to stdout.  There
      appear to be no ill effects from omitting the call, so do that.
      (This also eliminates a performance issue from repeated DLL loads and
      unloads when a program performs a series of database connections.)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [21d36747d] 2020-10-24 13:12:08 -0400
Branch: REL_13_STABLE [fd048e0cb] 2020-10-24 13:12:19 -0400
Branch: REL_12_STABLE [bdc79ddd1] 2020-10-24 13:12:26 -0400
Branch: REL_11_STABLE [12a73f29f] 2020-10-24 13:12:31 -0400
Branch: REL_10_STABLE [f38b66ec0] 2020-10-24 13:12:41 -0400
Branch: REL9_6_STABLE [379c43bda] 2020-10-24 13:12:47 -0400
Branch: REL9_5_STABLE [758b45e83] 2020-10-24 13:12:53 -0400
-->
     <para>
      Fix <application>ecpg</application> library's per-thread
      initialization logic for Windows (Tom Lane, Alexander Lakhin)
     </para>

     <para>
      Multi-threaded <application>ecpg</application> applications could
      suffer rare misbehavior due to incorrect locking.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [66f8687a8] 2020-10-28 14:35:53 -0400
Branch: REL_13_STABLE [ba4f5413e] 2020-10-28 14:35:53 -0400
Branch: REL_12_STABLE [cb0982ba9] 2020-10-28 14:35:53 -0400
Branch: REL_11_STABLE [9eb250339] 2020-10-28 14:35:53 -0400
Branch: REL_10_STABLE [504f963f7] 2020-10-28 14:35:53 -0400
Branch: REL9_6_STABLE [204d77969] 2020-10-28 14:35:53 -0400
Branch: REL9_5_STABLE [aff06436c] 2020-10-28 14:35:53 -0400
-->
     <para>
      On Windows, make <application>psql</application> read the output of
      a backtick command in text mode, not binary mode (Tom Lane)
     </para>

     <para>
      This ensures proper handling of newlines.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [3eb3d3e78] 2020-09-04 13:54:54 -0400
Branch: REL_13_STABLE Release: REL_13_0 [72857482c] 2020-09-04 13:55:11 -0400
Branch: REL_12_STABLE [616110eac] 2020-09-04 13:55:03 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9e5f1f21a] 2020-10-07 12:51:02 -0400
Branch: REL_13_STABLE [2ea624b4b] 2020-10-07 12:51:03 -0400
Branch: REL_12_STABLE [d8c2a2199] 2020-10-07 12:51:04 -0400
Branch: REL_11_STABLE [f2c6e94f0] 2020-10-07 12:51:05 -0400
Branch: REL_10_STABLE [0c79dcb36] 2020-10-07 12:51:05 -0400
Branch: REL9_6_STABLE [710c0a66d] 2020-10-07 12:51:06 -0400
Branch: REL9_5_STABLE [0bfe356c5] 2020-10-07 12:51:06 -0400
-->
     <para>
      Ensure that <application>pg_dump</application> collects per-column
      information about extension configuration tables (Fabr&iacute;zio de
      Royes Mello, Tom Lane)
     </para>

     <para>
      Failure to do this led to crashes when
      specifying <option>--inserts</option>, or underspecified (though
      usually correct) <command>COPY</command> commands when
      using <command>COPY</command> to reload the tables' data.
     </para>
    </listitem>

    <listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [3c0471b5f] 2020-10-15 19:33:46 -0400
Branch: REL_13_STABLE [59cfff65b] 2020-10-15 19:33:45 -0400
Branch: REL_12_STABLE [a106236d8] 2020-10-15 19:33:43 -0400
Branch: REL_11_STABLE [eb421c83b] 2020-10-15 19:33:42 -0400
Branch: REL_10_STABLE [85fedf39f] 2020-10-15 19:33:36 -0400
Branch: REL9_6_STABLE [39c23c199] 2020-10-15 19:33:36 -0400
Branch: REL9_5_STABLE [d9ae2297b] 2020-10-15 19:33:36 -0400
Branch: master [536de14e2] 2020-10-15 20:37:20 -0400
Branch: REL_13_STABLE [79fe23465] 2020-10-15 20:37:20 -0400
Branch: REL_12_STABLE [0ab7ca98a] 2020-10-15 20:37:20 -0400
Branch: REL_11_STABLE [16be4e435] 2020-10-15 20:37:19 -0400
Branch: REL_10_STABLE [6e34cc8ab] 2020-10-15 20:37:19 -0400
Branch: REL9_6_STABLE [9dcffe69a] 2020-10-15 20:37:19 -0400
Branch: REL9_5_STABLE [b05672c72] 2020-10-15 20:37:19 -0400
-->
     <para>
      Make <application>pg_upgrade</application> check for pre-existence
      of tablespace directories in the target cluster (Bruce Momjian)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [ca2a12c93] 2020-10-19 09:36:56 +0900
Branch: REL_13_STABLE [1bd9b2b23] 2020-10-19 09:37:50 +0900
Branch: REL_12_STABLE [57bdf29dd] 2020-10-19 09:37:55 +0900
Branch: REL_11_STABLE [914139081] 2020-10-19 09:38:01 +0900
Branch: REL_10_STABLE [e8d36f9ec] 2020-10-19 09:38:06 +0900
Branch: REL9_6_STABLE [994a02f7f] 2020-10-19 09:38:13 +0900
Branch: REL9_5_STABLE [099238322] 2020-10-19 09:38:18 +0900
-->
     <para>
      Fix potential memory leak in <filename>contrib/pgcrypto</filename>
      (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [02a75f836] 2020-10-16 11:59:13 -0400
Branch: REL_13_STABLE [3d338a46a] 2020-10-16 11:59:25 -0400
Branch: REL_12_STABLE [7004ce758] 2020-10-16 11:59:31 -0400
Branch: REL_11_STABLE [1eb2d7e3e] 2020-10-16 11:59:36 -0400
Branch: REL_10_STABLE [3e1a4c260] 2020-10-16 11:59:41 -0400
Branch: REL9_6_STABLE [e15115b4d] 2020-10-16 11:59:47 -0400
Branch: REL9_5_STABLE [9c3032881] 2020-10-16 11:59:52 -0400
-->
     <para>
      Add check for an unlikely failure case
      in <filename>contrib/pgcrypto</filename> (Daniel Gustafsson)
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: REL9_6_STABLE [27acbd51e] 2020-09-08 10:09:43 +0200
Branch: REL9_5_STABLE [69fdf3d2e] 2020-09-08 10:09:56 +0200
-->
     <para>
      Use <literal>return</literal> not <literal>exit()</literal> in
      <application>configure</application>'s
      test programs (Peter Eisentraut)
     </para>

     <para>
      This avoids failures with pickier compilers.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c4a803ac7] 2020-10-16 21:53:33 -0400
Branch: REL_13_STABLE [3f26dca76] 2020-10-16 21:53:43 -0400
Branch: REL_12_STABLE [b39c94097] 2020-10-16 21:53:50 -0400
Branch: REL_11_STABLE [2b9166dbc] 2020-10-16 21:53:55 -0400
Branch: REL_10_STABLE [aae4097b0] 2020-10-16 21:54:03 -0400
Branch: REL9_6_STABLE [13dbf4ab8] 2020-10-16 21:54:09 -0400
Branch: REL9_5_STABLE [c8cb243cb] 2020-10-16 21:54:14 -0400
Branch: master [7d6d6bce4] 2020-10-22 21:23:47 -0400
Branch: REL_13_STABLE [96ed2ae93] 2020-10-22 21:24:01 -0400
Branch: REL_12_STABLE [78ccf7f42] 2020-10-22 21:24:07 -0400
Branch: REL_11_STABLE [02f86d523] 2020-10-22 21:24:12 -0400
Branch: REL_10_STABLE [a357cc05d] 2020-10-22 21:24:17 -0400
Branch: REL9_6_STABLE [05a36321a] 2020-10-22 21:24:23 -0400
Branch: REL9_5_STABLE [0abebb58f] 2020-10-22 21:24:28 -0400
-->
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2020d for DST law changes in Fiji, Morocco, Palestine, the
      Canadian Yukon, Macquarie Island, and Casey Station (Antarctica);
      plus historical corrections for France, Hungary, Monaco, and
      Palestine.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ce0e97f80] 2020-10-16 21:40:16 -0400
Branch: REL_13_STABLE [e0cf5e9b2] 2020-10-16 21:40:16 -0400
Branch: REL_12_STABLE [3d13a8307] 2020-10-16 21:40:16 -0400
Branch: REL_11_STABLE [4a2528bfa] 2020-10-16 21:40:16 -0400
Branch: REL_10_STABLE [41eeeb348] 2020-10-16 21:40:16 -0400
Branch: REL9_6_STABLE [5515c73a6] 2020-10-16 21:40:16 -0400
Branch: REL9_5_STABLE [38fac9c1f] 2020-10-16 21:40:16 -0400
Branch: master [c5054da0d] 2020-10-22 21:15:22 -0400
Branch: REL_13_STABLE [0e551533b] 2020-10-22 21:15:37 -0400
Branch: REL_12_STABLE [f56c42e50] 2020-10-22 21:16:04 -0400
Branch: REL_11_STABLE [d2ffe0a00] 2020-10-22 21:16:16 -0400
Branch: REL_10_STABLE [34285083b] 2020-10-22 21:16:23 -0400
Branch: REL9_6_STABLE [58f9f52a3] 2020-10-22 21:16:31 -0400
Branch: REL9_5_STABLE [ff26f804a] 2020-10-22 21:16:38 -0400
-->
     <para>
      Sync our copy of the timezone library with IANA tzcode release 2020d
      (Tom Lane)
     </para>

     <para>
      This absorbs upstream's change of <application>zic</application>'s
      default output option from <quote>fat</quote>
      to <quote>slim</quote>.  That's just cosmetic for our purposes, as
      we continue to select the <quote>fat</quote> mode in pre-v13
      branches.  This change also ensures
      that <function>strftime()</function> does not
      change <varname>errno</varname> unless it fails.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-23">
  <title>Release 9.5.23</title>

  <formalpara>
  <title>Release date:</title>
  <para>2020-08-13</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.22.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <para>
   The <productname>PostgreSQL</productname> community will stop
   releasing updates for the 9.5.X release series in February 2021.
   Users are encouraged to update to a newer release branch soon.
  </para>

  <sect2>
   <title>Migration to Version 9.5.23</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.20,
    see <xref linkend="release-9-5-20">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7eeb1d986] 2020-08-10 10:44:42 -0400
Branch: REL_13_STABLE [98ca64899] 2020-08-10 10:44:42 -0400
Branch: REL_12_STABLE [3ba967084] 2020-08-10 10:44:42 -0400
Branch: REL_11_STABLE [afa358786] 2020-08-10 10:44:43 -0400
Branch: REL_10_STABLE [96cbfe92d] 2020-08-10 10:44:43 -0400
Branch: REL9_6_STABLE [2ea8a60fc] 2020-08-10 10:44:43 -0400
Branch: REL9_5_STABLE [6b11a4687] 2020-08-10 10:44:43 -0400
-->
     <para>
      Make contrib modules' installation scripts more secure (Tom Lane)
     </para>

     <para>
      Attacks similar to those described in CVE-2018-1058 could be carried
      out against an extension installation script, if the attacker can
      create objects in either the extension's target schema or the schema
      of some prerequisite extension.  Since extensions often require
      superuser privilege to install, this can open a path to obtaining
      superuser privilege.  To mitigate this risk, be more careful about
      the <varname>search_path</varname> used to run an installation
      script; disable <varname>check_function_bodies</varname> within the
      script; and fix catalog-adjustment queries used in some contrib
      modules to ensure they are secure.  Also provide documentation to
      help third-party extension authors make their installation scripts
      secure.  This is not a complete solution; extensions that depend on
      other extensions can still be at risk if installed carelessly.
      (CVE-2020-14350)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [470687b4a] 2020-08-08 12:31:55 -0400
Branch: REL_13_STABLE [900429d0c] 2020-08-08 12:31:55 -0400
Branch: REL_12_STABLE [85cb4ec50] 2020-08-08 12:31:55 -0400
Branch: REL_11_STABLE [1fa6eec97] 2020-08-08 12:31:55 -0400
Branch: REL_10_STABLE [d81387da9] 2020-08-08 12:31:55 -0400
Branch: REL9_6_STABLE [55d42c917] 2020-08-08 12:31:55 -0400
Branch: REL9_5_STABLE [ca8e87ea0] 2020-08-08 12:31:55 -0400
-->
     <para>
      In logical replication walsender, fix failure to send feedback
      messages after sending a keepalive message (&Aacute;lvaro Herrera)
     </para>

     <para>
      This is a relatively minor problem when using built-in logical
      replication, because the built-in walreceiver will send a feedback
      reply (which clears the incorrect state) fairly frequently anyway.
      But with some other replication systems, such
      as <application>pglogical</application>, it causes significant
      performance issues.
     </para>
    </listitem>

    <listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master Release: REL_13_BR [887cdff4d] 2020-05-28 13:19:00 -0400
Branch: REL_12_STABLE [3ccae5445] 2020-05-28 13:19:10 -0400
Branch: REL_11_STABLE [36758c472] 2020-05-28 13:19:16 -0400
Branch: REL_10_STABLE [2cbe3a954] 2020-05-28 13:17:11 -0400
Branch: REL9_6_STABLE [28e2c6eac] 2020-05-28 13:17:20 -0400
Branch: REL9_5_STABLE [bfb9595a7] 2020-05-28 13:17:28 -0400
-->
     <para>
      Ensure the <function>repeat()</function> function can be interrupted
      by query cancel (Joe Conway)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [63d2ac23b] 2020-06-22 11:46:41 -0400
Branch: REL_13_STABLE [57f8b9913] 2020-06-22 11:46:41 -0400
Branch: REL_12_STABLE [d3d875518] 2020-06-22 11:46:41 -0400
Branch: REL_11_STABLE [35a8e227e] 2020-06-22 11:46:41 -0400
Branch: REL_10_STABLE [6d9f7a094] 2020-06-22 11:46:41 -0400
Branch: REL9_6_STABLE [bd53ea2b2] 2020-06-22 11:46:41 -0400
Branch: REL9_5_STABLE [dda25c599] 2020-06-22 11:46:41 -0400
-->
     <para>
      Undo double-quoting of index names in <command>EXPLAIN</command>'s
      non-text output formats (Tom Lane, Euler Taveira)
     </para>
    </listitem>

    <listitem>
<!--
Author: David Rowley <drowley@postgresql.org>
Branch: master [f1fcf2d3b] 2020-07-14 16:55:35 +1200
Branch: REL_13_STABLE [b82730429] 2020-07-14 16:57:41 +1200
Branch: REL_12_STABLE [1231a0b0e] 2020-07-14 17:03:12 +1200
Branch: REL_11_STABLE [d2761b680] 2020-07-14 16:59:57 +1200
Branch: REL_10_STABLE [4e02f88a4] 2020-07-14 17:00:28 +1200
Branch: REL9_6_STABLE [c732df133] 2020-07-14 17:00:57 +1200
Branch: REL9_5_STABLE [e20003fa0] 2020-07-14 17:01:25 +1200
-->
     <para>
      Fix timing of constraint revalidation in <command>ALTER
      TABLE</command> (David Rowley)
     </para>

     <para>
      If <command>ALTER TABLE</command> needs to fully rewrite the table's
      contents (for example, due to change of a column's data type) and
      also needs to scan the table to re-validate foreign keys
      or <literal>CHECK</literal> constraints, it sometimes did things in
      the wrong order, leading to odd errors such as <quote>could not read
      block 0 in file "base/nnnnn/nnnnn": read only 0 of 8192 bytes</quote>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a742ecf9c] 2020-07-13 20:38:20 -0400
Branch: REL_13_STABLE [0734dbc45] 2020-07-13 20:38:20 -0400
Branch: REL_12_STABLE [d3b642ad9] 2020-07-13 20:38:21 -0400
Branch: REL_11_STABLE [3753df8f8] 2020-07-13 20:38:21 -0400
Branch: REL_10_STABLE [6443cd2e2] 2020-07-13 20:38:21 -0400
Branch: REL9_6_STABLE [dc6bb0994] 2020-07-13 20:38:21 -0400
Branch: REL9_5_STABLE [80d8f6d1d] 2020-07-13 20:38:21 -0400
-->
     <para>
      Cope with <literal>LATERAL</literal> references in restriction
      clauses attached to an un-flattened sub-<literal>SELECT</literal> in
      the <literal>FROM</literal> clause (Tom Lane)
     </para>

     <para>
      This oversight could result in assertion failures or crashes at
      query execution.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ca5e93f76] 2020-07-03 19:01:21 -0400
Branch: REL_13_STABLE [9233624b1] 2020-07-03 19:01:21 -0400
Branch: REL_12_STABLE [153c14cdd] 2020-07-03 19:01:21 -0400
Branch: REL_11_STABLE [ef799bdd0] 2020-07-03 19:01:21 -0400
Branch: REL_10_STABLE [5144a40f3] 2020-07-03 19:01:22 -0400
Branch: REL9_6_STABLE [69a3fe6e6] 2020-07-03 19:01:22 -0400
Branch: REL9_5_STABLE [d83d59e42] 2020-07-03 19:01:22 -0400
-->
     <para>
      Avoid believing that a never-analyzed foreign table has zero tuples
      (Tom Lane)
     </para>

     <para>
      This primarily affected the planner's estimate of the number of
      groups that would be obtained by <literal>GROUP BY</literal>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [7897e3bb9] 2020-06-16 16:59:07 +1200
Branch: REL_13_STABLE [3e0b08c40] 2020-06-16 17:00:06 +1200
Branch: REL_12_STABLE [28ee12669] 2020-06-16 17:00:21 +1200
Branch: REL_11_STABLE [9c14d6024] 2020-06-16 17:00:37 +1200
Branch: REL_10_STABLE [95647a1c7] 2020-06-16 17:00:53 +1200
Branch: REL9_6_STABLE [02b71f06b] 2020-06-16 17:01:07 +1200
Branch: REL9_5_STABLE [89020a92f] 2020-06-16 17:01:22 +1200
Branch: master [42dee8b8e] 2020-07-23 21:10:49 +1200
Branch: REL_13_STABLE [6b366190d] 2020-07-23 21:15:01 +1200
Branch: REL_12_STABLE [8bf4e69a7] 2020-07-23 21:17:47 +1200
Branch: REL_11_STABLE [028f0c3a8] 2020-07-23 21:18:02 +1200
Branch: REL_10_STABLE [fac4145bf] 2020-07-23 21:18:13 +1200
Branch: REL9_6_STABLE [47adb2488] 2020-07-23 21:18:25 +1200
Branch: REL9_5_STABLE [3725c8ce4] 2020-07-23 21:18:34 +1200
-->
     <para>
      Improve error handling in the server's <filename>buffile</filename>
      module (Thomas Munro)
     </para>

     <para>
      Fix some cases where I/O errors were indistinguishable from reaching
      EOF, or were not reported at all.  Also add details such as block
      numbers and byte counts where appropriate.
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [5940ffb22] 2020-06-11 10:09:47 -0700
Branch: REL_13_STABLE [6df7105e5] 2020-06-11 10:09:45 -0700
Branch: REL_12_STABLE [e620a38c2] 2020-06-11 10:09:43 -0700
Branch: REL_11_STABLE [dd616f2ec] 2020-06-11 10:09:40 -0700
Branch: REL_10_STABLE [19a6e1bc3] 2020-06-11 10:09:37 -0700
Branch: REL9_6_STABLE [e81dc2b7e] 2020-06-11 10:09:35 -0700
Branch: REL9_5_STABLE [c05f6b354] 2020-06-11 10:09:32 -0700
-->
     <para>
      Fix conflict-checking anomalies in <literal>SERIALIZABLE</literal>
      isolation mode (Peter Geoghegan)
     </para>

     <para>
      If a concurrently-inserted tuple was updated by a different
      concurrent transaction, and neither tuple version was visible to the
      current transaction's snapshot, serialization conflict checking
      could draw the wrong conclusions about whether the tuple was relevant
      to the results of the current transaction.  This could allow a
      serializable transaction to commit when it should have failed with a
      serialization error.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master Release: REL_13_BR [242dfcbaf] 2020-05-15 16:50:34 -0400
Branch: REL_12_STABLE [1d84751c6] 2020-05-15 16:50:34 -0400
Branch: REL_11_STABLE [37b5c5fde] 2020-05-15 16:50:34 -0400
Branch: REL_10_STABLE [09f2752b0] 2020-05-15 16:50:34 -0400
Branch: REL9_6_STABLE [4649eb919] 2020-05-15 16:50:34 -0400
Branch: REL9_5_STABLE [0a319699d] 2020-05-15 16:50:34 -0400
-->
     <para>
      Avoid repeated marking of dead btree index entries as dead (Masahiko
      Sawada)
     </para>

     <para>
      While functionally harmless, this led to useless WAL traffic when
      checksums are enabled or <varname>wal_log_hints</varname> is on.
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [57cb80630] 2020-06-08 13:57:24 +1200
Branch: REL_13_STABLE [acefa2cca] 2020-06-08 13:58:10 +1200
Branch: REL_12_STABLE [72766ad63] 2020-06-08 13:58:35 +1200
Branch: REL_11_STABLE [48eb6a3c8] 2020-06-08 13:59:57 +1200
Branch: REL_10_STABLE [fd11b842e] 2020-06-08 14:01:07 +1200
Branch: REL9_6_STABLE [644cac32a] 2020-06-08 14:01:51 +1200
Branch: REL9_5_STABLE [09dc17486] 2020-06-08 14:02:20 +1200
-->
     <para>
      Fix failure of some code paths to acquire the correct lock before
      modifying <filename>pg_control</filename> (Nathan Bossart, Fujii
      Masao)
     </para>

     <para>
      This oversight could allow <filename>pg_control</filename> to be
      written out with an inconsistent checksum, possibly causing trouble
      later, including inability to restart the database if it crashed
      before the next <filename>pg_control</filename> update.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [ce1c5b9ae] 2020-06-01 14:41:18 +0900
Branch: REL_12_STABLE [894041eb2] 2020-06-01 14:41:25 +0900
Branch: REL_11_STABLE [8bc74490d] 2020-06-01 14:41:32 +0900
Branch: REL_10_STABLE [a36f21620] 2020-06-01 14:41:37 +0900
Branch: REL9_6_STABLE [e2fa9732f] 2020-06-01 14:41:42 +0900
Branch: REL9_5_STABLE [a8c6eb5b4] 2020-06-01 14:41:46 +0900
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [e786be5fc] 2020-06-01 10:32:06 +0900
Branch: REL_12_STABLE [95e389b3c] 2020-06-01 10:32:53 +0900
-->
     <para>
      Fix errors in <function>currtid()</function>
      and <function>currtid2()</function> (Michael Paquier)
     </para>

     <para>
      These functions (which are undocumented and used only by ancient
      versions of the ODBC driver) contained coding errors that could
      result in crashes, or in confusing error messages such as <quote>could
      not open file</quote> when applied to a relation having no storage.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [c1669fd58] 2020-06-04 10:17:49 +0900
Branch: REL_12_STABLE [03aa25b6e] 2020-06-04 10:18:02 +0900
Branch: REL_11_STABLE [b41a85f53] 2020-06-04 10:18:06 +0900
Branch: REL_10_STABLE [5ed8b4a98] 2020-06-04 10:18:11 +0900
Branch: REL9_6_STABLE [e7a134b58] 2020-06-04 10:18:17 +0900
Branch: REL9_5_STABLE [4a9809e34] 2020-06-04 10:18:27 +0900
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [f88bd3139] 2020-06-03 12:36:23 -0400
Branch: REL_12_STABLE [3d474a079] 2020-06-03 12:36:24 -0400
Branch: REL_11_STABLE [7a8cb4a61] 2020-06-03 12:36:00 -0400
Branch: REL_10_STABLE [0c735c686] 2020-06-03 12:36:00 -0400
-->
     <para>
      Avoid calling <function>elog()</function>
      or <function>palloc()</function> while holding a spinlock (Michael
      Paquier, Tom Lane)
     </para>

     <para>
      Logic associated with replication slots had several violations of
      this coding rule.  While the odds of trouble are quite low, an error
      in the called function would lead to a stuck spinlock.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [ae3259c55] 2020-06-19 16:46:07 -0400
Branch: REL_13_STABLE [e74559c97] 2020-06-19 16:46:07 -0400
Branch: REL_12_STABLE [5b52008a6] 2020-06-19 16:46:07 -0400
Branch: REL_11_STABLE [2e155d90d] 2020-06-19 16:46:07 -0400
Branch: REL_10_STABLE [411febd53] 2020-06-19 16:46:07 -0400
Branch: REL9_6_STABLE [83762d0a9] 2020-06-19 16:46:07 -0400
Branch: REL9_5_STABLE [bbbce94dc] 2020-06-19 16:46:06 -0400
-->
     <para>
      Report out-of-disk-space errors properly
      in <application>pg_dump</application>
      and <application>pg_basebackup</application> (Justin Pryzby, Tom
      Lane, &Aacute;lvaro Herrera)
     </para>

     <para>
      Some code paths could produce silly reports like <quote>could not
      write file: Success</quote>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ea9125304] 2020-07-11 13:36:50 -0400
Branch: REL_13_STABLE [bc9aaac1a] 2020-07-11 13:36:50 -0400
Branch: REL_12_STABLE [5fea14f4b] 2020-07-11 13:36:50 -0400
Branch: REL_11_STABLE [4fdc559c8] 2020-07-11 13:36:50 -0400
Branch: REL_10_STABLE [2d43c3057] 2020-07-11 13:36:51 -0400
Branch: REL9_6_STABLE [303322c5a] 2020-07-11 13:36:51 -0400
Branch: REL9_5_STABLE [db820b9a9] 2020-07-11 13:36:51 -0400
-->
     <para>
      Fix parallel restore of tables having both table-level privileges
      and per-column privileges (Tom Lane)
     </para>

     <para>
      The table-level privilege grants have to be applied first, but a
      parallel restore did not reliably order them that way; this could
      lead to <quote>tuple concurrently updated</quote> errors, or to
      disappearance of some per-column privilege grants.  The fix for this
      is to include dependency links between such entries in the archive
      file, meaning that a new dump has to be taken with a
      corrected <application>pg_dump</application> to ensure that the
      problem will not recur.
     </para>
    </listitem>

    <listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [3f5863e15] 2020-06-15 20:59:40 -0400
Branch: REL_13_STABLE [a2c72851a] 2020-06-15 20:59:40 -0400
Branch: REL_12_STABLE [8e933596c] 2020-06-15 20:59:40 -0400
Branch: REL_11_STABLE [aeb785c0f] 2020-06-15 20:59:40 -0400
Branch: REL_10_STABLE [9170da96d] 2020-06-15 20:59:40 -0400
Branch: REL9_6_STABLE [5c1bfd627] 2020-06-15 20:59:40 -0400
Branch: REL9_5_STABLE [39c698cff] 2020-06-15 20:59:40 -0400
-->
     <para>
      Ensure that <application>pg_upgrade</application> runs
      with <varname>vacuum_defer_cleanup_age</varname> set to zero in the
      target cluster (Bruce Momjian)
     </para>

     <para>
      If the target cluster's configuration has been modified to
      set <varname>vacuum_defer_cleanup_age</varname> to a nonzero value,
      that prevented freezing of the system catalogs from working properly,
      which caused the upgrade to fail in confusing ways.  Ensure that any
      such setting is overridden for the duration of the upgrade.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master Release: REL_13_BR [cee9cadb5] 2020-05-13 20:42:09 -0700
Branch: REL_12_STABLE [73a5c0d81] 2020-05-13 20:42:24 -0700
Branch: REL_11_STABLE [a26789452] 2020-05-13 20:42:37 -0700
Branch: REL_10_STABLE [970ed4493] 2020-05-13 20:42:42 -0700
Branch: REL9_6_STABLE [1ab5b672e] 2020-05-13 20:42:46 -0700
Branch: REL9_5_STABLE [595b4115c] 2020-05-13 20:42:49 -0700
Author: Noah Misch <noah@leadboat.com>
Branch: master Release: REL_13_BR [8222a9d9a] 2020-05-13 20:42:09 -0700
Branch: REL_12_STABLE [7130be8aa] 2020-05-13 20:42:23 -0700
Branch: REL_11_STABLE [357012e17] 2020-05-13 20:42:34 -0700
Branch: REL_10_STABLE [a28db2081] 2020-05-13 20:42:42 -0700
-->
     <para>
      Fix <application>pg_recvlogical</application> to drain pending
      messages before exiting (Noah Misch)
     </para>

     <para>
      Without this, the replication sender might detect a send failure and
      exit without making the expected final update to the replication
      slot's LSN position.  That led to re-transmitting data after the
      next connection.  It was also possible to miss error messages sent
      after the last data that <application>pg_recvlogical</application>
      wants to consume.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [1d09fb1f0] 2020-07-15 15:17:23 +0900
Branch: REL_13_STABLE [5f89bb4cf] 2020-07-15 15:17:32 +0900
Branch: REL_12_STABLE [92927477f] 2020-07-15 15:17:36 +0900
Branch: REL_11_STABLE [c6d33d144] 2020-07-15 15:17:44 +0900
Branch: REL_10_STABLE [23924feca] 2020-07-15 15:17:49 +0900
Branch: REL9_6_STABLE [14fe80413] 2020-07-15 15:17:55 +0900
Branch: REL9_5_STABLE [18ec25412] 2020-07-15 15:18:01 +0900
-->
     <para>
      Fix <application>pg_rewind</application>'s handling of just-deleted
      files in the source data directory (Justin Pryzby, Michael Paquier)
     </para>

     <para>
      When working with an on-line source database, concurrent file
      deletions are possible, but <application>pg_rewind</application>
      would get confused if deletion happened between seeing a file's
      directory entry and examining it with <function>stat()</function>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [932f9fb50] 2020-07-16 15:52:37 +0900
Branch: REL_13_STABLE [beebbb39d] 2020-07-16 15:52:54 +0900
Branch: REL_12_STABLE [cd113a0b4] 2020-07-16 15:52:58 +0900
Branch: REL_11_STABLE [de559c2b0] 2020-07-16 15:53:01 +0900
Branch: REL_10_STABLE [800ec48f5] 2020-07-16 15:53:04 +0900
Branch: REL9_6_STABLE [a452b239e] 2020-07-16 15:53:09 +0900
Branch: REL9_5_STABLE [ab7ce97ec] 2020-07-16 15:53:12 +0900
-->
     <para>
      Make <application>pg_test_fsync</application> use binary I/O mode on
      Windows (Michael Paquier)
     </para>

     <para>
      Previously it wrote the test file in text mode, which is not an
      accurate reflection of <productname>PostgreSQL</productname>'s
      actual usage.
     </para>
    </listitem>

    <listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master Release: REL_13_BR [9003b76e1] 2020-05-28 13:44:54 -0400
Branch: REL_12_STABLE [e8eb48595] 2020-05-28 13:44:59 -0400
Branch: REL_11_STABLE [49a00e07c] 2020-05-28 13:45:02 -0400
Branch: REL_10_STABLE [43d3d7318] 2020-05-28 13:45:06 -0400
Branch: REL9_6_STABLE [43d7934a3] 2020-05-28 13:45:11 -0400
Branch: REL9_5_STABLE [f140d9b6e] 2020-05-28 13:45:15 -0400
-->
     <para>
      Fix failure to initialize local state correctly
      in <filename>contrib/dblink</filename> (Joe Conway)
     </para>

     <para>
      With the right combination of circumstances, this could lead to
      <function>dblink_close()</function> issuing an unexpected
      remote <command>COMMIT</command>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b9b610577] 2020-07-23 17:20:01 -0400
Branch: REL_13_STABLE [7dab4569d] 2020-07-23 17:20:01 -0400
Branch: REL_12_STABLE [3d4a77815] 2020-07-23 17:20:02 -0400
Branch: REL_11_STABLE [475c69c97] 2020-07-23 17:20:03 -0400
Branch: REL_10_STABLE [d8ec3b126] 2020-07-23 17:20:03 -0400
Branch: REL9_6_STABLE [ccf964a80] 2020-07-23 17:20:04 -0400
Branch: REL9_5_STABLE [d0519e9fe] 2020-07-23 17:20:04 -0400
-->
     <para>
      Fix <filename>contrib/pgcrypto</filename>'s misuse
      of <function>deflate()</function> (Tom Lane)
     </para>

     <para>
      The <function>pgp_sym_encrypt</function> functions could produce
      incorrect compressed data due to mishandling
      of <application>zlib</application>'s API requirements.  We have no
      reports of this error manifesting with
      stock <application>zlib</application>, but it can be seen when using
      IBM's <application>zlibNX</application> implementation.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [a3ab7a707] 2020-07-27 15:58:32 +0900
Branch: REL_13_STABLE [0caf1fc6e] 2020-07-27 15:58:54 +0900
Branch: REL_12_STABLE [5bd087eb5] 2020-07-27 15:58:59 +0900
Branch: REL_11_STABLE [202fc4ca5] 2020-07-27 15:59:03 +0900
Branch: REL_10_STABLE [9729f9979] 2020-07-27 15:59:07 +0900
Branch: REL9_6_STABLE [8a60f541f] 2020-07-27 15:59:13 +0900
Branch: REL9_5_STABLE [aaa132a65] 2020-07-27 15:59:22 +0900
Branch: REL_11_STABLE [1785ac8ad] 2020-08-02 11:00:12 -0400
Branch: REL_10_STABLE [e1b4135cf] 2020-08-02 11:00:12 -0400
-->
     <para>
      Fix corner case in decompression logic
      in <filename>contrib/pgcrypto</filename>'s
      <function>pgp_sym_decrypt</function> functions (Kyotaro Horiguchi,
      Michael Paquier)
     </para>

     <para>
      A compressed stream can validly end with an empty packet, but the
      decompressor failed to handle this and would complain about corrupt
      data.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL_11_STABLE [c6d43ffab] 2020-07-15 22:05:12 -0400
Branch: REL_10_STABLE [0140dec18] 2020-07-15 22:05:12 -0400
Branch: REL9_6_STABLE [9e043d93c] 2020-07-15 22:05:13 -0400
Branch: REL9_5_STABLE [d61dcccaf] 2020-07-15 22:05:13 -0400
-->
     <para>
      Use POSIX-standard <function>strsignal()</function> in place of the
      BSD-ish <literal>sys_siglist[]</literal> (Tom Lane)
     </para>

     <para>
      This avoids build failures with very recent versions
      of <application>glibc</application>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master Release: REL_13_BR [a16915545] 2020-05-14 09:24:33 +0530
Branch: REL_12_STABLE [98171e59a] 2020-05-14 09:34:46 +0530
Branch: REL_11_STABLE [1fbfc3d8a] 2020-05-14 09:39:04 +0530
Branch: REL_10_STABLE [33b772801] 2020-05-14 09:44:21 +0530
Branch: REL9_6_STABLE [a1466e194] 2020-05-14 09:50:10 +0530
Branch: REL9_5_STABLE [650952aeb] 2020-05-14 09:55:04 +0530
-->
     <para>
      Support building our NLS code with Microsoft Visual Studio 2015 or
      later (Juan Jos&eacute; Santamar&iacute;a Flecha, Davinder Singh,
      Amit Kapila)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [d2a995990] 2020-05-21 14:41:15 +0900
Branch: REL_12_STABLE [089baec6f] 2020-05-21 14:41:30 +0900
Branch: REL_11_STABLE [bb24af50d] 2020-05-21 14:41:33 +0900
Branch: REL_10_STABLE [8dfc7d888] 2020-05-21 14:41:36 +0900
Branch: REL9_6_STABLE [57dc672c2] 2020-05-21 14:41:40 +0900
Branch: REL9_5_STABLE [8de137017] 2020-05-21 14:41:43 +0900
-->
     <para>
      Avoid possible failure of our MSVC install script when there is a
      file named <filename>configure</filename> several levels above the
      source code tree (Arnold M&uuml;ller)
     </para>

     <para>
      This could confuse some logic that looked
      for <filename>configure</filename> to identify the top level of the
      source tree.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-22">
  <title>Release 9.5.22</title>

  <formalpara>
  <title>Release date:</title>
  <para>2020-05-14</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.21.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <para>
   The <productname>PostgreSQL</productname> community will stop
   releasing updates for the 9.5.X release series in February 2021.
   Users are encouraged to update to a newer release branch soon.
  </para>

  <sect2>
   <title>Migration to Version 9.5.22</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.20,
    see <xref linkend="release-9-5-20">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [a40caf5f8] 2020-04-06 11:03:49 +0900
Branch: REL_12_STABLE [3e62dd3a9] 2020-04-06 11:05:47 +0900
Branch: REL_11_STABLE [41faafbd7] 2020-04-06 11:05:54 +0900
Branch: REL_10_STABLE [cef2b8d52] 2020-04-06 11:05:57 +0900
Branch: REL9_6_STABLE [61a161fe4] 2020-04-06 11:06:04 +0900
Branch: REL9_5_STABLE [3f77a6702] 2020-04-06 11:06:07 +0900
-->
     <para>
      Preserve the <structfield>indisclustered</structfield> setting of
      indexes rewritten by <command>ALTER TABLE</command> (Amit Langote,
      Justin Pryzby)
     </para>

     <para>
      Previously, <command>ALTER TABLE</command> lost track of which index
      had been used for <command>CLUSTER</command>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [1cc9c2412] 2020-03-13 11:57:06 +0100
Branch: REL_12_STABLE [c9ef507e8] 2020-03-13 11:57:20 +0100
Branch: REL_11_STABLE [15cbbf81a] 2020-03-13 12:24:44 +0100
Branch: REL_10_STABLE [02530da73] 2020-03-13 13:03:28 +0100
Branch: REL9_6_STABLE [2f0dd9d93] 2020-03-13 13:21:05 +0100
Branch: REL9_5_STABLE [c15d35041] 2020-03-13 13:21:30 +0100
-->
     <para>
      Preserve the replica identity properties of indexes rewritten
      by <command>ALTER TABLE</command> (Quan Zongliang, Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [5be594caf] 2020-05-06 12:29:41 -0400
Branch: REL_12_STABLE [2eea49471] 2020-05-06 12:29:41 -0400
Branch: REL_11_STABLE [59273a7ce] 2020-05-06 12:29:41 -0400
Branch: REL_10_STABLE [4d21263ff] 2020-05-06 12:29:41 -0400
Branch: REL9_6_STABLE [2bf56f50e] 2020-05-06 12:29:41 -0400
Branch: REL9_5_STABLE [91d97462c] 2020-05-06 12:29:41 -0400
-->
     <para>
      Lock objects sooner during <command>DROP OWNED BY</command>
      (&Aacute;lvaro Herrera)
     </para>

     <para>
      This avoids failures in race-condition cases where another session is
      deleting some of the same objects.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [d9a4cce29] 2020-04-25 05:09:30 +0100
Branch: REL_12_STABLE [d0360632d] 2020-04-25 05:10:24 +0100
Branch: REL_11_STABLE [0f4970d1a] 2020-04-25 05:10:19 +0100
Branch: REL_10_STABLE [287f6d2d9] 2020-04-25 05:10:13 +0100
Branch: REL9_6_STABLE [86b7a4e6f] 2020-04-25 05:10:10 +0100
Branch: REL9_5_STABLE [b3824ca22] 2020-04-25 05:10:05 +0100
-->
     <para>
      Fix error-case processing for <command>CREATE ROLE ... IN
      ROLE</command> (Andrew Gierth)
     </para>

     <para>
      Some error cases would be reported as <quote>unexpected node
      type</quote> or the like, instead of the intended message.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e41955faf] 2020-04-03 13:15:45 -0400
Branch: REL_12_STABLE [05f4a8818] 2020-04-03 13:15:30 -0400
Branch: REL_11_STABLE [0912fb39c] 2020-04-03 13:15:30 -0400
Branch: REL_10_STABLE [44c763fe9] 2020-04-03 13:15:30 -0400
Branch: REL9_6_STABLE [49b0d13d7] 2020-04-03 13:15:30 -0400
Branch: REL9_5_STABLE [8150f7813] 2020-04-03 13:15:30 -0400
Branch: REL9_5_STABLE [e82b6e00a] 2020-04-06 12:29:54 -0400
-->
     <para>
      Fix bugs in <varname>gin_fuzzy_search_limit</varname> processing
      (Ad&eacute; Heyward, Tom Lane)
     </para>

     <para>
      A small value of <varname>gin_fuzzy_search_limit</varname> could
      result in unexpected slowness due to unintentionally rescanning the
      same index page many times.  Another code path failed to apply the
      intended filtering at all, possibly returning too many values.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [41a194f49] 2020-04-07 20:50:28 -0400
Branch: REL_12_STABLE [35d1eefb2] 2020-04-07 20:50:02 -0400
Branch: REL_11_STABLE [5fae66410] 2020-04-07 20:50:02 -0400
Branch: REL_10_STABLE [4c7a311a2] 2020-04-07 20:50:02 -0400
Branch: REL9_6_STABLE [049e9f48e] 2020-04-07 20:50:02 -0400
Branch: REL9_5_STABLE [ebd194ac5] 2020-04-07 20:50:02 -0400
-->
     <para>
      Allow input of type <type>circle</type> to accept the format
      <quote><literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>),<replaceable>r</replaceable></literal></quote>
      as the documentation says it does (David Zhang)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [26a944cf2] 2020-04-07 15:57:58 -0400
Branch: REL_12_STABLE [6e6b74a20] 2020-04-07 16:30:55 -0400
Branch: REL_11_STABLE [5d79fc60c] 2020-04-07 16:30:55 -0400
Branch: REL_10_STABLE [889786e0e] 2020-04-07 16:30:55 -0400
Branch: REL9_6_STABLE [e40c4d491] 2020-04-07 16:30:55 -0400
Branch: REL9_5_STABLE [dbb121038] 2020-04-07 16:30:55 -0400
-->
     <para>
      Make the <function>get_bit()</function>
      and <function>set_bit()</function> functions cope
      with <type>bytea</type> strings longer than 256MB (Movead Li)
     </para>

     <para>
      Since the bit number argument is only <type>int4</type>, it's
      impossible to use these functions to access bits beyond the first
      256MB of a long <type>bytea</type>.  We'll widen the argument
      to <type>int8</type> in v13, but in the meantime, allow these
      functions to work on the initial substring of a
      long <type>bytea</type>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [085b6b667] 2020-03-11 15:27:59 -0400
Branch: REL_12_STABLE [3c8864fc1] 2020-03-11 15:27:59 -0400
Branch: REL_11_STABLE [63b51dfec] 2020-03-11 15:27:59 -0400
Branch: REL_10_STABLE [05283dd5b] 2020-03-11 15:28:00 -0400
Branch: master [a029a0641] 2020-03-11 18:24:11 -0400
Branch: REL_12_STABLE [630590d6f] 2020-03-11 18:24:13 -0400
Branch: REL_11_STABLE [13f353b0e] 2020-03-11 18:24:14 -0400
Branch: REL_10_STABLE [064e029e6] 2020-03-11 18:24:15 -0400
Branch: master [b4570d33a] 2020-03-16 21:05:52 -0400
Branch: REL_12_STABLE [2a89455aa] 2020-03-16 21:05:53 -0400
Branch: REL_11_STABLE [819d55257] 2020-03-16 21:05:54 -0400
Branch: REL_10_STABLE [5e4a0b719] 2020-03-16 21:05:55 -0400
Branch: REL9_6_STABLE [cd6a05187] 2020-03-16 21:05:56 -0400
Branch: REL9_5_STABLE [da254148f] 2020-03-16 21:05:29 -0400
-->
     <para>
      Avoid possibly leaking an open-file descriptor for a directory
      in <function>pg_ls_dir()</function>,
      <function>pg_timezone_names()</function>,
      <function>pg_tablespace_databases()</function>, and allied functions
      (Justin Pryzby)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4dbcb3f84] 2020-03-14 14:42:22 -0400
Branch: REL_12_STABLE [390984f92] 2020-03-14 14:42:22 -0400
Branch: REL_11_STABLE [540ef37cc] 2020-03-14 14:42:22 -0400
Branch: REL_10_STABLE [61d14971d] 2020-03-14 14:42:22 -0400
Branch: REL9_6_STABLE [30e491653] 2020-03-14 14:42:22 -0400
Branch: REL9_5_STABLE [a1ef0f373] 2020-03-14 14:42:22 -0400
-->
     <para>
      Fix polymorphic-function type resolution to correctly infer the
      actual type of an <type>anyarray</type> output when given only
      an <type>anyrange</type> input (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d12bdba77] 2020-04-21 15:58:42 -0400
Branch: REL_12_STABLE [5a4efd100] 2020-04-21 15:58:42 -0400
Branch: REL_11_STABLE [56259c377] 2020-04-21 15:58:42 -0400
Branch: REL_10_STABLE [e6c17c85a] 2020-04-21 15:58:42 -0400
Branch: REL9_6_STABLE [5c1c27eef] 2020-04-21 15:58:43 -0400
Branch: REL9_5_STABLE [36714f8ca] 2020-04-21 15:58:43 -0400
-->
     <para>
      Avoid unlikely crash when <command>REINDEX</command> is terminated
      by a session-shutdown signal (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5c27bce7f] 2020-04-11 12:29:06 -0400
Branch: REL_12_STABLE [8ffb86644] 2020-04-11 12:29:06 -0400
Branch: REL_11_STABLE [f3d06e524] 2020-04-11 12:29:06 -0400
Branch: REL_10_STABLE [1e6bb6125] 2020-04-11 12:29:06 -0400
Branch: REL9_6_STABLE [242ca479f] 2020-04-11 12:29:06 -0400
Branch: REL9_5_STABLE [30ce86367] 2020-04-11 12:29:06 -0400
-->
     <para>
      Prevent printout of possibly-incorrect hash join table statistics
      in <command>EXPLAIN</command> (Konstantin Knizhnik, Tom Lane, Thomas
      Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [007491979] 2020-02-19 20:37:26 +0900
Branch: REL_12_STABLE [16e6c968b] 2020-02-19 20:38:38 +0900
Branch: REL_11_STABLE [414ed1ca2] 2020-02-19 20:39:02 +0900
Branch: REL_10_STABLE [79f344d52] 2020-02-19 20:39:37 +0900
Branch: REL9_6_STABLE [307c27037] 2020-02-19 20:40:38 +0900
Branch: REL9_5_STABLE [4a3f164b7] 2020-02-19 20:43:59 +0900
-->
     <para>
      Fix reporting of elapsed time for heap truncation steps
      in <command>VACUUM VERBOSE</command> (Tatsuhito Kasahara)
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [17d3fcdc3] 2020-03-10 00:14:43 +0900
Branch: REL_12_STABLE [82c04e483] 2020-03-10 00:15:25 +0900
Branch: REL_11_STABLE [e54183cb0] 2020-03-10 00:16:48 +0900
Branch: REL_10_STABLE [e9c4eaacd] 2020-03-10 00:18:24 +0900
Branch: REL9_6_STABLE [d1b414e7e] 2020-03-10 00:19:57 +0900
Branch: REL9_5_STABLE [c9a47b81e] 2020-03-10 00:23:22 +0900
-->
     <para>
      Avoid possibly showing <quote>waiting</quote> twice in a process's
      PS status (Masahiko Sawada)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [4e87c4836] 2020-04-24 08:48:28 +0900
Branch: REL_12_STABLE [22db5269b] 2020-04-24 08:48:35 +0900
Branch: REL_11_STABLE [2d24ca00b] 2020-04-24 08:48:40 +0900
Branch: REL_10_STABLE [02657c421] 2020-04-24 08:48:45 +0900
Branch: REL9_6_STABLE [c2d8ae0df] 2020-04-24 08:48:51 +0900
Branch: REL9_5_STABLE [9eff11653] 2020-04-24 08:48:55 +0900
Branch: master [f9c1b8dba] 2020-04-24 11:33:41 +0900
Branch: REL_12_STABLE [26057550d] 2020-04-24 11:33:58 +0900
Branch: REL_11_STABLE [0d04e9d76] 2020-04-24 11:34:03 +0900
Branch: REL_10_STABLE [3d9cae5ad] 2020-04-24 11:34:06 +0900
Branch: REL9_6_STABLE [11f004699] 2020-04-24 11:34:11 +0900
Branch: REL9_5_STABLE [a4726998d] 2020-04-24 11:34:16 +0900
-->
     <para>
      Avoid premature recycling of WAL segments during crash recovery
      (Jehan-Guillaume de Rorthais)
     </para>

     <para>
      WAL segments that become ready to be archived during crash recovery
      were potentially recycled without being archived.
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [4bd0ad9e4] 2020-04-08 00:49:29 +0900
Branch: REL_12_STABLE [683e0ef55] 2020-05-09 12:00:27 +0900
Branch: REL_11_STABLE [dcd1569fb] 2020-05-09 12:04:51 +0900
Branch: REL_10_STABLE [660f1fc40] 2020-05-09 12:11:11 +0900
Branch: REL9_6_STABLE [70b597974] 2020-05-09 12:16:37 +0900
Branch: REL9_5_STABLE [e3f5b148e] 2020-05-09 12:19:47 +0900
-->
     <para>
      Avoid scanning irrelevant timelines during archive recovery (Kyotaro
      Horiguchi)
     </para>

     <para>
      This can eliminate many attempts to fetch non-existent WAL files from
      archive storage, which is helpful if archive access is slow.
     </para>
    </listitem>

    <listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [e3ff789ac] 2020-02-19 08:15:49 +0530
Branch: REL_12_STABLE [59112f235] 2020-02-19 08:27:15 +0530
Branch: REL_11_STABLE [bff456d7a] 2020-02-19 08:35:16 +0530
Branch: REL_10_STABLE [b448aa441] 2020-02-19 08:44:16 +0530
Branch: REL9_6_STABLE [59c1a03f0] 2020-02-19 08:52:08 +0530
Branch: REL9_5_STABLE [05555f7aa] 2020-02-19 08:59:18 +0530
-->
     <para>
      Remove bogus <quote>subtransaction logged without previous top-level
      txn record</quote> error check in logical decoding (Arseny Sher,
      Amit Kapila)
     </para>

     <para>
      This condition is legitimately reachable in various scenarios, so
      remove the check.
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [49bf81536] 2020-03-26 13:29:20 +0100
Branch: REL_12_STABLE [223e9c77d] 2020-03-26 13:31:07 +0100
Branch: REL_11_STABLE [ba4cc05ce] 2020-03-26 13:51:07 +0100
Branch: REL_10_STABLE [f36a10434] 2020-03-26 13:51:22 +0100
Branch: REL9_6_STABLE [2d8597ba6] 2020-03-26 14:01:56 +0100
Branch: REL9_5_STABLE [ce28a43ff] 2020-03-26 14:08:15 +0100
Branch: master [a9d9bdd3a] 2020-04-05 10:02:00 +0200
Branch: REL_12_STABLE [d278d4e1a] 2020-04-05 10:03:04 +0200
Branch: REL_11_STABLE [250041a56] 2020-04-05 10:03:41 +0200
Branch: REL_10_STABLE [038c9bbe9] 2020-04-05 10:04:13 +0200
Branch: REL9_6_STABLE [3dcaea4b0] 2020-04-05 10:04:26 +0200
Branch: REL9_5_STABLE [72b2b9c52] 2020-04-05 10:05:18 +0200
-->
     <para>
      Ensure that a replication
      slot's <literal>io_in_progress_lock</literal> is released in failure
      code paths (Pavan Deolasee)
     </para>

     <para>
      This could result in a walsender later becoming stuck waiting for
      the lock.
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: REL_11_STABLE [a493f9334] 2020-03-12 18:06:54 +1300
Branch: REL_10_STABLE [05e0aff58] 2020-03-12 18:09:14 +1300
Branch: REL9_6_STABLE [4e8cad2da] 2020-03-12 18:16:44 +1300
Branch: REL9_5_STABLE [d22ac5378] 2020-03-12 18:15:59 +1300
-->
     <para>
      Ensure <varname>nextXid</varname> can't go backwards on a standby
      server (Eka Palamadai)
     </para>

     <para>
      This race condition could allow incorrect hot standby feedback
      messages to be sent back to the primary server, potentially allowing
      <command>VACUUM</command> to run too soon on the primary.
     </para>
    </listitem>

    <listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [b4f140869] 2020-03-18 09:27:14 +0530
Branch: REL_12_STABLE [e37824136] 2020-03-18 09:33:01 +0530
Branch: REL_11_STABLE [18c41cb6b] 2020-03-18 09:37:08 +0530
Branch: REL_10_STABLE [569f9354b] 2020-03-18 09:46:52 +0530
Branch: REL9_6_STABLE [fe27ce1c1] 2020-03-18 10:08:56 +0530
Branch: REL9_5_STABLE [6bdfe428d] 2020-03-18 10:10:27 +0530
-->
     <para>
      Add missing SQLSTATE values to a few error reports (Sawada Masahiko)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [761a5688b] 2020-02-19 14:45:17 -0500
Branch: REL_12_STABLE [32aa14d40] 2020-02-19 14:44:58 -0500
Branch: REL_11_STABLE [612d207bc] 2020-02-19 14:44:58 -0500
Branch: REL_10_STABLE [6af63cf8c] 2020-02-19 14:44:58 -0500
Branch: REL9_6_STABLE [3e5308969] 2020-02-19 14:44:58 -0500
Branch: REL9_5_STABLE [bbefb1154] 2020-02-19 14:44:58 -0500
-->
     <para>
      Fix PL/pgSQL to reliably refuse to execute an event trigger function
      as a plain function (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [27dbe1a18] 2020-04-22 07:27:03 +0900
Branch: REL_12_STABLE [e1c08722a] 2020-04-22 07:27:45 +0900
Branch: REL_11_STABLE [35d08658d] 2020-04-22 07:27:49 +0900
Branch: REL_10_STABLE [1bb0293d8] 2020-04-22 07:27:53 +0900
Branch: REL9_6_STABLE [c9c15790d] 2020-04-22 07:28:00 +0900
Branch: REL9_5_STABLE [e5e295d50] 2020-04-22 07:28:04 +0900
-->
     <para>
      Fix memory leak in <application>libpq</application> when
      using <literal>sslmode=verify-full</literal> (Roman Peshkurov)
     </para>

     <para>
      Certificate verification during connection startup could leak some
      memory.  This would become an issue if a client process opened many
      database connections during its lifetime.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [980a70b97] 2020-03-23 11:58:00 -0400
Branch: REL_12_STABLE [036fdf6be] 2020-03-23 11:58:01 -0400
Branch: REL_11_STABLE [aae7e8530] 2020-03-23 11:58:01 -0400
Branch: REL_10_STABLE [ef7d6d79a] 2020-03-23 11:58:01 -0400
Branch: REL9_6_STABLE [c0eb57dd9] 2020-03-23 11:58:01 -0400
Branch: REL9_5_STABLE [5f9eace5d] 2020-03-23 11:58:01 -0400
-->
     <para>
      Fix <application>ecpg</application> to treat an argument of
      just <quote><literal>-</literal></quote> as meaning <quote>read
      from stdin</quote> on all platforms (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f31364676] 2020-02-17 18:40:02 -0500
Branch: REL_12_STABLE [6da7d3630] 2020-02-17 18:40:02 -0500
Branch: REL_11_STABLE [bd2cd138f] 2020-02-17 18:40:02 -0500
Branch: REL_10_STABLE [f9d7bb68d] 2020-02-17 18:40:02 -0500
Branch: REL9_6_STABLE [3380b9931] 2020-02-17 18:40:02 -0500
Branch: REL9_5_STABLE [d9ec8d1d7] 2020-02-17 18:40:02 -0500
-->
     <para>
      Fix <application>pg_dump</application> to dump comments on RLS
      policy objects (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8728b2c70] 2020-03-09 14:58:26 -0400
Branch: REL_12_STABLE [4c40b27b5] 2020-03-09 14:58:11 -0400
Branch: REL_11_STABLE [f5d49f226] 2020-03-09 14:58:11 -0400
Branch: REL_10_STABLE [475b061c8] 2020-03-09 14:58:11 -0400
Branch: REL9_6_STABLE [fab545635] 2020-03-09 14:58:11 -0400
Branch: REL9_5_STABLE [0b0247644] 2020-03-09 14:58:11 -0400
Branch: master [a9d70c108] 2020-04-08 11:23:39 -0400
Branch: REL_12_STABLE [983ed99a6] 2020-04-08 11:23:39 -0400
Branch: REL_11_STABLE [d050c6113] 2020-04-08 11:23:39 -0400
Branch: REL_10_STABLE [830471e0d] 2020-04-08 11:23:39 -0400
Branch: REL9_6_STABLE [778066052] 2020-04-08 11:23:40 -0400
Branch: REL9_5_STABLE [564c1e6d7] 2020-04-08 11:23:40 -0400
-->
     <para>
      In <application>pg_dump</application>, postpone restore of event
      triggers till the end (Fabr&iacute;zio de Royes Mello, Hamid Akhtar,
      Tom Lane)
     </para>

     <para>
      This minimizes the risk that an event trigger could interfere with
      the restoration of other objects.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [008cf0409] 2020-02-27 11:20:46 +0900
Branch: REL_12_STABLE [943affb3d] 2020-02-27 11:21:00 +0900
Branch: REL_11_STABLE [83bd732eb] 2020-02-27 11:21:07 +0900
Branch: REL_10_STABLE [240c7c75f] 2020-02-27 11:21:14 +0900
Branch: REL9_6_STABLE [3340034f2] 2020-02-27 11:21:23 +0900
Branch: REL9_5_STABLE [49300e4cf] 2020-02-27 11:21:28 +0900
Branch: master [c4b0edb07] 2020-02-27 21:58:37 +0900
Branch: REL_12_STABLE [aeb846edb] 2020-02-27 21:58:45 +0900
Branch: REL_11_STABLE [8e076f4f9] 2020-02-27 21:58:50 +0900
-->
     <para>
      Fix quoting of <option>--encoding</option>, <option>--lc-ctype</option>
      and <option>--lc-collate</option> values
      in <application>createdb</application> utility (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6dd9f3577] 2020-04-03 11:24:56 -0400
Branch: REL_12_STABLE [d56657c35] 2020-04-03 11:24:56 -0400
Branch: REL_11_STABLE [7b1552283] 2020-04-03 11:24:56 -0400
Branch: REL_10_STABLE [85f0d4703] 2020-04-03 11:24:56 -0400
Branch: REL9_6_STABLE [a9f821f48] 2020-04-03 11:24:56 -0400
Branch: REL9_5_STABLE [82bc56e63] 2020-04-03 11:24:56 -0400
-->
     <para>
      <filename>contrib/lo</filename>'s <function>lo_manage()</function>
      function crashed if called directly rather than as a trigger (Tom
      Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [95f7ddfda] 2020-03-28 17:09:51 -0400
Branch: REL_12_STABLE [2bb6bdbe5] 2020-03-28 17:09:51 -0400
Branch: REL_11_STABLE [5feb3d0b3] 2020-03-28 17:09:51 -0400
Branch: REL_10_STABLE [2618ac6c6] 2020-03-28 17:09:51 -0400
Branch: REL9_6_STABLE [39491aa0d] 2020-03-28 17:09:51 -0400
Branch: REL9_5_STABLE [8e1e630d0] 2020-03-28 17:09:52 -0400
-->
     <para>
      In <filename>contrib/ltree</filename>,
      protect against overflow of <type>ltree</type>
      and <type>lquery</type> length fields (Nikita Glukhov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fc576b7c4] 2020-04-16 14:45:54 -0400
Branch: REL_12_STABLE [687e566b9] 2020-04-16 14:45:54 -0400
Branch: REL_11_STABLE [cc2737ab0] 2020-04-16 14:45:54 -0400
Branch: REL_10_STABLE [f4a420056] 2020-04-16 14:45:54 -0400
Branch: REL9_6_STABLE [3cdf2421a] 2020-04-16 14:45:54 -0400
Branch: REL9_5_STABLE [46b1b6379] 2020-04-16 14:45:54 -0400
-->
     <para>
      Fix cache reference leak in <filename>contrib/sepgsql</filename>
      (Michael Luo)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8c49454ca] 2020-03-30 11:14:58 -0400
Branch: REL_12_STABLE [de5b9db36] 2020-03-30 11:14:58 -0400
Branch: REL_11_STABLE [4bc3a1667] 2020-03-30 11:14:58 -0400
Branch: REL_10_STABLE [d59e83cf5] 2020-03-30 11:14:58 -0400
Branch: REL9_6_STABLE [f15f5edee] 2020-03-30 11:14:58 -0400
Branch: REL9_5_STABLE [6dac1e858] 2020-03-30 11:14:58 -0400
-->
     <para>
      Avoid failures when dealing with Unix-style locale names on
      Windows (Juan Jos&eacute; Santamar&iacute;a Flecha)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [beb2516e9] 2020-05-06 21:08:15 +0900
Branch: REL_12_STABLE [8c0939dad] 2020-05-06 21:08:22 +0900
Branch: REL_11_STABLE [984aca448] 2020-05-06 21:08:26 +0900
Branch: REL_10_STABLE [307ed98b0] 2020-05-06 21:08:31 +0900
Branch: REL9_6_STABLE [e07fdc126] 2020-05-06 21:08:38 +0900
Branch: REL9_5_STABLE [ad53d6efe] 2020-05-06 21:08:42 +0900
-->
     <para>
      In MSVC builds, cope with spaces in the path name for Python
      (Victor Wagner)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [a9659fb65] 2020-04-17 14:44:33 -0400
Branch: REL_12_STABLE [6b02bee66] 2020-04-17 14:52:42 -0400
Branch: REL_11_STABLE [758814224] 2020-04-17 14:53:56 -0400
Branch: REL_10_STABLE [ddac64f2d] 2020-04-17 14:55:55 -0400
Branch: REL9_6_STABLE [4c9239d08] 2020-04-17 14:56:56 -0400
Branch: REL9_5_STABLE [3ca17999f] 2020-04-17 14:57:15 -0400
-->
     <para>
      In MSVC builds, fix detection of Visual Studio version to work with
      more language settings (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [71c2fd0c0] 2020-03-20 13:55:15 -0400
Branch: REL_12_STABLE [d0747714e] 2020-03-20 14:02:05 -0400
Branch: REL_11_STABLE [e8a6391fc] 2020-03-20 14:02:15 -0400
Branch: REL_10_STABLE [3163349fd] 2020-03-20 14:02:43 -0400
Branch: REL9_6_STABLE [80370836f] 2020-03-20 14:03:13 -0400
Branch: REL9_5_STABLE [467b40832] 2020-03-20 14:03:31 -0400
-->
     <para>
      In MSVC builds, use <literal>-Wno-deprecated</literal> with bison
      versions newer than 3.0, as non-Windows builds already do (Andrew
      Dunstan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4cac3a49e] 2020-04-24 10:54:47 -0400
Branch: REL_12_STABLE [c820692bd] 2020-04-24 10:55:00 -0400
Branch: REL_11_STABLE [eb335bc62] 2020-04-24 10:55:05 -0400
Branch: REL_10_STABLE [898921a18] 2020-04-24 10:55:10 -0400
Branch: REL9_6_STABLE [66be99742] 2020-04-24 10:55:17 -0400
Branch: REL9_5_STABLE [39006ae7a] 2020-04-24 10:55:23 -0400
Branch: master [6c5f91616] 2020-04-24 17:53:23 -0400
Branch: REL_12_STABLE [1e07e3fc0] 2020-04-24 17:53:23 -0400
Branch: REL_11_STABLE [b31f9fd63] 2020-04-24 17:53:23 -0400
Branch: REL_10_STABLE [40d4bc5ac] 2020-04-24 17:53:23 -0400
Branch: REL9_6_STABLE [f65f3a5d8] 2020-04-24 17:53:23 -0400
Branch: REL9_5_STABLE [3cdb45c54] 2020-04-24 17:53:23 -0400
Branch: master [bd8c5cee9] 2020-04-24 17:21:44 -0400
Branch: REL_12_STABLE [a2342c658] 2020-04-24 17:21:44 -0400
Branch: REL_11_STABLE [99c9ed224] 2020-04-24 17:21:44 -0400
Branch: REL_10_STABLE [4985b3b84] 2020-04-24 17:21:44 -0400
Branch: REL9_6_STABLE [351252904] 2020-04-24 17:21:44 -0400
Branch: REL9_5_STABLE [3f3ab184c] 2020-04-24 17:21:44 -0400
-->
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2020a for DST law changes in Morocco and the Canadian Yukon,
      plus historical corrections for Shanghai.
     </para>

     <para>
      The America/Godthab zone has been renamed to America/Nuuk to reflect
      current English usage; however, the old name remains available as a
      compatibility link.
     </para>

     <para>
      Also, update <application>initdb</application>'s list of known
      Windows time zone names to include recent additions, improving the
      odds that it will correctly translate the system time zone setting
      on that platform.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-21">
  <title>Release 9.5.21</title>

  <formalpara>
  <title>Release date:</title>
  <para>2020-02-13</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.20.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.21</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.20,
    see <xref linkend="release-9-5-20">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [d20703805] 2020-01-02 11:41:04 +0530
Branch: REL_12_STABLE [f8a6d8e71] 2020-01-02 11:53:53 +0530
Branch: REL_11_STABLE [3e3a79735] 2020-01-02 12:04:13 +0530
Branch: REL_10_STABLE [27b5f48c7] 2020-01-02 12:11:55 +0530
Branch: REL9_6_STABLE [ba5b4e506] 2020-01-02 11:29:50 +0530
Branch: REL9_5_STABLE [a6f4f407a] 2020-01-02 12:28:02 +0530
Branch: REL9_4_STABLE [1ad47e875] 2020-01-02 12:38:29 +0530
Branch: master [ed7bb5c31] 2020-01-14 07:53:50 +0530
Branch: REL_12_STABLE [fa1eaebfa] 2020-01-14 08:05:05 +0530
Branch: REL_11_STABLE [17869eca7] 2020-01-14 08:12:12 +0530
Branch: REL_10_STABLE [f9e95252a] 2020-01-14 08:20:11 +0530
-->
     <para>
      Avoid failure in logical decoding when a large transaction must be
      spilled into many separate temporary files (Amit Khandekar)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [15cac3a52] 2020-01-17 18:00:39 -0300
Branch: REL_12_STABLE [bc2140627] 2020-01-17 18:00:39 -0300
Branch: REL_11_STABLE [fe955ebee] 2020-01-17 18:00:39 -0300
Branch: REL_10_STABLE [e3154aae3] 2020-01-17 18:00:39 -0300
Branch: REL9_6_STABLE [cdb14154b] 2020-01-17 18:00:39 -0300
Branch: REL9_5_STABLE [58997ace5] 2020-01-17 18:00:39 -0300
Branch: REL9_4_STABLE [20a1dc1e3] 2020-01-17 18:00:39 -0300
-->
     <para>
      Fix failure in logical replication publisher after a database crash
      and restart (Vignesh C)
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [93745f1e0] 2020-02-01 14:29:13 +1300
Branch: REL_12_STABLE [24dd34af1] 2020-02-01 14:49:57 +1300
Branch: REL_11_STABLE [600387f5d] 2020-02-01 22:57:46 +1300
Branch: REL_10_STABLE [aab30cd4e] 2020-02-01 14:54:48 +1300
Branch: REL9_6_STABLE [93be45245] 2020-02-01 14:57:40 +1300
Branch: REL9_5_STABLE [a5f45c3dd] 2020-02-01 14:59:58 +1300
Branch: REL9_4_STABLE [95936c795] 2020-02-01 15:10:20 +1300
-->
     <para>
      Avoid memory leak when there are no free dynamic shared memory slots
      (Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [a904abe2e] 2020-01-22 09:49:18 +0900
Branch: REL_12_STABLE [817a1b88a] 2020-01-22 09:49:24 +0900
Branch: REL_11_STABLE [5b4b07fa9] 2020-01-22 09:49:28 +0900
Branch: REL_10_STABLE [9055344b4] 2020-01-22 09:49:33 +0900
Branch: REL9_6_STABLE [ef33edeb5] 2020-01-22 09:49:39 +0900
Branch: REL9_5_STABLE [c39f45598] 2020-01-22 09:49:44 +0900
Branch: REL9_4_STABLE [d76652edc] 2020-01-22 09:49:48 +0900
-->
     <para>
      Ignore the <literal>CONCURRENTLY</literal> option when performing an
      index creation, drop, or rebuild on a temporary table (Michael
      Paquier, Heikki Linnakangas, Andres Freund)
     </para>

     <para>
      This avoids strange failures if the temporary table has
      an <literal>ON COMMIT</literal> action.  There is no benefit in
      using <literal>CONCURRENTLY</literal> for a temporary table anyway,
      since other sessions cannot access the table, making the extra
      processing pointless.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c35b714ca] 2019-12-01 13:09:26 -0500
Branch: REL_12_STABLE [b154d70f7] 2019-12-01 13:09:26 -0500
Branch: REL_11_STABLE [768a401e2] 2019-12-01 13:09:26 -0500
Branch: REL_10_STABLE [25c7183c0] 2019-12-01 13:09:27 -0500
Branch: REL9_6_STABLE [283f095d0] 2019-12-01 13:09:27 -0500
Branch: REL9_5_STABLE [cfffa8a6b] 2019-12-01 13:09:27 -0500
Branch: REL9_4_STABLE [0c84e992c] 2019-12-01 13:09:27 -0500
-->
     <para>
      Fix possible failure when resetting expression indexes on temporary
      tables that are marked <literal>ON COMMIT DELETE ROWS</literal>
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [4c8701098] 2020-01-20 10:36:35 +0200
Branch: REL_12_STABLE [fd436bba0] 2020-01-20 10:36:45 +0200
Branch: REL_11_STABLE [da7abcf0f] 2020-01-20 10:36:47 +0200
Branch: REL_10_STABLE [ff0c567cb] 2020-01-20 10:36:50 +0200
Branch: REL9_6_STABLE [e96f30d89] 2020-01-20 10:36:52 +0200
Branch: REL9_5_STABLE [98f0d2837] 2020-01-20 10:36:55 +0200
-->
     <para>
      Fix possible crash in BRIN index operations
      with <type>box</type>, <type>range</type> and <type>inet</type> data
      types (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [b10714080] 2019-11-20 00:12:33 +0300
Branch: REL_12_STABLE [a64e7e05a] 2019-11-20 00:17:58 +0300
Branch: REL_11_STABLE [7d467dee0] 2019-11-20 00:18:02 +0300
Branch: master [e14641197] 2019-11-20 00:04:09 +0300
Branch: REL_12_STABLE [051c50c01] 2019-11-20 00:04:53 +0300
Branch: REL_11_STABLE [9f2927989] 2019-11-20 00:05:12 +0300
Branch: REL_10_STABLE [21ad61ab3] 2019-11-20 00:05:35 +0300
Branch: master [d5ad7a09a] 2019-11-20 00:04:22 +0300
Branch: REL_12_STABLE [ee437ca74] 2019-11-20 00:05:01 +0300
Branch: REL_11_STABLE [c0bf35421] 2019-11-20 00:05:21 +0300
Branch: REL_10_STABLE [ab64b474d] 2019-11-20 00:05:42 +0300
Branch: REL9_6_STABLE [99f5888d3] 2019-11-19 23:47:29 +0300
Branch: REL9_5_STABLE [4fc485684] 2019-11-20 00:01:55 +0300
Branch: REL9_4_STABLE [1414821e1] 2019-11-20 00:03:04 +0300
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4093ff573] 2020-02-09 12:02:57 -0500
Branch: REL_12_STABLE [baf487123] 2020-02-09 12:02:57 -0500
Branch: REL_11_STABLE [f91706b00] 2020-02-09 12:02:57 -0500
-->
     <para>
      Fix handling of deleted pages in GIN indexes (Alexander Korotkov)
     </para>

     <para>
      Avoid possible deadlocks, incorrect updates of a deleted page's
      state, and failure to traverse through a recently-deleted page.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [41c6f9db2] 2020-01-17 16:17:31 -0500
Branch: REL_12_STABLE [2e2646060] 2020-01-17 16:17:32 -0500
Branch: REL_11_STABLE [d8e877b86] 2020-01-17 16:17:33 -0500
Branch: REL_10_STABLE [167fd022f] 2020-01-17 16:17:35 -0500
Branch: REL9_6_STABLE [45f03cfa5] 2020-01-17 16:17:36 -0500
Branch: REL9_5_STABLE [396472278] 2020-01-17 16:17:37 -0500
Branch: REL9_4_STABLE [eb9d1f050] 2020-01-17 16:17:39 -0500
-->
     <para>
      Fix possible crash with a SubPlan (sub-<literal>SELECT</literal>)
      within a multi-row <literal>VALUES</literal> list (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [affdde2e1] 2020-01-20 23:26:51 -0800
Branch: REL_12_STABLE [21fdfd0e8] 2020-01-20 23:29:35 -0800
Branch: REL_11_STABLE [c8e0e560e] 2020-01-20 23:29:38 -0800
Branch: REL_10_STABLE [8bb006a41] 2020-01-20 23:30:47 -0800
Branch: REL9_6_STABLE [d4c339924] 2020-01-20 23:31:48 -0800
Branch: REL9_5_STABLE [f651976d9] 2020-01-20 23:31:52 -0800
Branch: REL9_4_STABLE [ba1dfbe22] 2020-01-20 23:32:21 -0800
-->
     <para>
      Fix unlikely crash with pass-by-reference aggregate transition
      states (Andres Freund, Teodor Sigaev)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4c70098ff] 2020-01-23 13:42:09 -0500
Branch: REL_12_STABLE [be13f227f] 2020-01-23 13:42:10 -0500
Branch: REL_11_STABLE [fb12aefaa] 2020-01-23 13:42:10 -0500
Branch: REL_10_STABLE [212b870d6] 2020-01-23 13:42:10 -0500
Branch: REL9_6_STABLE [9e24575f6] 2020-01-23 13:42:10 -0500
Branch: REL9_5_STABLE [a576f2a8f] 2020-01-23 13:42:10 -0500
Branch: REL9_4_STABLE [600b953d7] 2020-01-23 13:42:10 -0500
Branch: master [9a3a75cb8] 2020-01-23 16:15:32 -0500
Branch: REL_12_STABLE [f309c812e] 2020-01-23 16:15:32 -0500
Branch: REL_11_STABLE [7a9fef299] 2020-01-23 16:15:32 -0500
Branch: REL_10_STABLE [d6a9548b2] 2020-01-23 16:15:32 -0500
Branch: REL9_6_STABLE [451f50813] 2020-01-23 16:15:32 -0500
Branch: REL9_5_STABLE [0e63d9641] 2020-01-23 16:15:32 -0500
Branch: REL9_4_STABLE [8fc33e6cc] 2020-01-23 16:15:32 -0500
-->
     <para>
      Improve error reporting in <function>to_date()</function>
      and <function>to_timestamp()</function>
      (Tom Lane, &Aacute;lvaro Herrera)
     </para>

     <para>
      Reports about incorrect month or day names in input strings could
      truncate the input in the middle of a multi-byte character, leading
      to an improperly encoded error message that could cause follow-on
      failures.  Truncate at the next whitespace instead.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1a3efa1eb] 2019-12-12 12:30:43 -0500
Branch: REL_12_STABLE [07c4b6ac7] 2019-12-12 12:30:44 -0500
Branch: REL_11_STABLE [332584da9] 2019-12-12 12:30:44 -0500
Branch: REL_10_STABLE [c965c42a5] 2019-12-12 12:30:44 -0500
Branch: REL9_6_STABLE [6e2ac8d66] 2019-12-12 12:30:44 -0500
Branch: REL9_5_STABLE [323c47925] 2019-12-12 12:30:44 -0500
Branch: REL9_4_STABLE [6aa126311] 2019-12-12 12:30:44 -0500
-->
     <para>
      Fix off-by-one result for <literal>EXTRACT(ISOYEAR
      FROM <replaceable>timestamp</replaceable>)</literal> for BC dates
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4a0aab14d] 2019-11-21 16:21:43 -0500
Branch: REL_12_STABLE [5186f7625] 2019-11-21 16:21:43 -0500
Branch: REL_11_STABLE [669138ebd] 2019-11-21 16:21:44 -0500
Branch: REL_10_STABLE [b9f3d7a53] 2019-11-21 16:21:44 -0500
Branch: REL9_6_STABLE [52434ba73] 2019-11-21 16:21:44 -0500
Branch: REL9_5_STABLE [bcd541897] 2019-11-21 16:21:44 -0500
Branch: REL9_4_STABLE [f09829017] 2019-11-21 16:21:44 -0500
-->
     <para>
      Avoid stack overflow in <literal>information_schema</literal> views
      when a self-referential view exists in the system catalogs
      (Tom Lane)
     </para>

     <para>
      A self-referential view can't work; it will always result in
      infinite recursion.  We handled that situation correctly when
      trying to execute the view, but not when inquiring whether it is
      automatically updatable.
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [e69d64454] 2019-12-24 13:05:43 +1300
Branch: REL_12_STABLE [8052aaf52] 2019-12-24 13:07:54 +1300
Branch: REL_11_STABLE [9e551a14c] 2019-12-24 13:09:56 +1300
Branch: REL_10_STABLE [8e89bc6df] 2019-12-24 13:11:13 +1300
Branch: REL9_6_STABLE [15861deb6] 2019-12-24 13:12:50 +1300
Branch: REL9_5_STABLE [893eaf0be] 2019-12-24 13:13:13 +1300
Branch: REL9_4_STABLE [5c0a132cf] 2019-12-24 13:13:30 +1300
-->
     <para>
      Improve performance of hash joins with very large inner relations
      (Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [652686a33] 2020-01-12 14:36:59 -0500
Branch: REL_12_STABLE [70c17a812] 2020-01-12 14:37:00 -0500
Branch: REL_11_STABLE [5832be6ca] 2020-01-12 14:37:00 -0500
Branch: REL_10_STABLE [8c8b456b5] 2020-01-12 14:37:00 -0500
Branch: REL9_6_STABLE [2dd10477c] 2020-01-12 14:37:00 -0500
Branch: REL9_5_STABLE [784c58da1] 2020-01-12 14:37:00 -0500
Branch: REL9_4_STABLE [6bd567b65] 2020-01-12 14:37:00 -0500
-->
     <para>
      Fix edge-case crashes and misestimations in selectivity calculations
      for the <literal>&lt;@</literal> and <literal>@&gt;</literal> range
      operators (Michael Paquier, Andrey Borodin, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Branch: master [d751ba523] 2020-01-14 09:52:21 +0000
Branch: REL_12_STABLE [fd5476b79] 2020-01-14 09:51:28 +0000
Branch: REL_11_STABLE [9bdb1f0e3] 2020-01-14 09:50:51 +0000
Branch: REL_10_STABLE [353cd826f] 2020-01-14 09:50:13 +0000
Branch: REL9_6_STABLE [fd87262de] 2020-01-14 09:49:23 +0000
Branch: REL9_5_STABLE [bb09a9414] 2020-01-14 09:48:44 +0000
Branch: REL9_4_STABLE [9be6fcb3e] 2020-01-14 09:47:44 +0000
-->
     <para>
      Improve error reporting for attempts to use automatic updating of
      views with conditional <literal>INSTEAD</literal> rules (Dean Rasheed)
     </para>

     <para>
      This has never been supported, but previously the error was thrown
      only at execution time, so that it could be masked by planner errors.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fc7695891] 2019-12-23 12:08:23 -0500
Branch: REL_12_STABLE [976cb11f6] 2019-12-23 12:08:23 -0500
Branch: REL_11_STABLE [31dfa40a8] 2019-12-23 12:08:24 -0500
Branch: REL_10_STABLE [4af2531d0] 2019-12-23 12:08:24 -0500
Branch: REL9_6_STABLE [354d913f9] 2019-12-23 12:08:24 -0500
Branch: REL9_5_STABLE [6609c3ad9] 2019-12-23 12:08:24 -0500
Branch: REL9_4_STABLE [0d245d13c] 2019-12-23 12:08:24 -0500
Branch: master [74b35eb46] 2020-01-31 17:03:55 -0500
Branch: REL_12_STABLE [65aa15513] 2020-01-31 17:03:55 -0500
Branch: REL_11_STABLE [25dc267a1] 2020-01-31 17:03:55 -0500
Branch: REL_10_STABLE [de3d2df75] 2020-01-31 17:03:55 -0500
Branch: REL9_6_STABLE [742c646c1] 2020-01-31 17:03:55 -0500
Branch: REL9_5_STABLE [59047b6d0] 2020-01-31 17:03:55 -0500
Branch: REL9_4_STABLE [f521ef0ae] 2020-01-31 17:03:55 -0500
-->
     <para>
      Prevent a composite type from being included in itself indirectly
      via a range type (Tom Lane, Julien Rouhaud)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2acab054b] 2019-12-17 17:44:27 -0500
Branch: REL_12_STABLE [97ba30fab] 2019-12-17 17:44:28 -0500
Branch: REL_11_STABLE [fc449abc3] 2019-12-17 17:44:28 -0500
Branch: REL_10_STABLE [5c5a268c6] 2019-12-17 17:44:28 -0500
Branch: REL9_6_STABLE [275a8ac4f] 2019-12-17 17:44:28 -0500
Branch: REL9_5_STABLE [da5dd4218] 2019-12-17 17:44:28 -0500
Branch: REL9_4_STABLE [298d056d9] 2019-12-17 17:44:28 -0500
-->
     <para>
      Fix error reporting for index expressions of prohibited types
      (Amit Langote)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bf2efc55d] 2019-11-16 20:00:19 -0500
Branch: REL_12_STABLE [fcaf29d87] 2019-11-16 20:00:19 -0500
Branch: REL_11_STABLE [d898edf4f] 2019-11-16 20:00:19 -0500
Branch: REL_10_STABLE [a1b2cf095] 2019-11-16 20:00:19 -0500
Branch: REL9_6_STABLE [e4865bbdc] 2019-11-16 20:00:19 -0500
Branch: REL9_5_STABLE [ecb533af6] 2019-11-16 20:00:20 -0500
Branch: REL9_4_STABLE [65da6dd1d] 2019-11-16 20:00:20 -0500
-->
     <para>
      Fix dumping of views that contain only a <literal>VALUES</literal>
      list to handle cases where a view output column has been renamed
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e60b480d3] 2019-12-20 15:34:07 -0500
Branch: REL_12_STABLE [e8f60e6fe] 2019-12-20 15:34:07 -0500
Branch: REL_11_STABLE [1a77ea02d] 2019-12-20 15:34:08 -0500
Branch: REL_10_STABLE [d09cfa3e2] 2019-12-20 15:34:08 -0500
Branch: REL9_6_STABLE [c11bd6c10] 2019-12-20 15:34:08 -0500
Branch: REL9_5_STABLE [5e22a1111] 2019-12-20 15:34:08 -0500
Branch: REL9_4_STABLE [875c7d70d] 2019-12-20 15:34:08 -0500
-->
     <para>
      Allow <application>libpq</application> to parse all GSS-related
      connection parameters even when the GSSAPI code hasn't been compiled
      in (Tom Lane)
     </para>

     <para>
      This makes the behavior similar to our SSL support, where it was
      long ago deemed to be a good idea to always accept all the related
      parameters, even if some are ignored or restricted due to lack of
      the feature in a particular build.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [3ff660bbe] 2019-11-30 14:51:27 +0100
Branch: REL_12_STABLE [0dafed6fe] 2019-11-30 15:04:02 +0100
Branch: REL_11_STABLE [9668bf5d5] 2019-11-30 15:05:31 +0100
Branch: REL_10_STABLE [f71b22f53] 2019-11-30 15:07:47 +0100
Branch: REL9_6_STABLE [c59414da7] 2019-11-30 15:10:14 +0100
Branch: REL9_5_STABLE [a17602de1] 2019-11-30 15:14:12 +0100
Branch: REL9_4_STABLE [d9b974e99] 2019-11-30 15:16:58 +0100
-->
     <para>
      Fix incorrect handling of <literal>%b</literal>
      and <literal>%B</literal> format codes
      in <application>ecpg</application>'s
      <function>PGTYPEStimestamp_fmt_asc()</function> function
      (Tomas Vondra)
     </para>

     <para>
      Due to an off-by-one error, these codes would print the wrong month
      name, or possibly crash.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2425f8f71] 2020-01-31 14:41:49 -0500
Branch: REL_12_STABLE [0c84199f7] 2020-01-31 14:41:49 -0500
Branch: REL_11_STABLE [63634883f] 2020-01-31 14:41:49 -0500
Branch: REL_10_STABLE [8b1d447a7] 2020-01-31 14:41:49 -0500
Branch: REL9_6_STABLE [cb4c04a4e] 2020-01-31 14:41:49 -0500
Branch: REL9_5_STABLE [1b78759a6] 2020-01-31 14:41:49 -0500
Branch: REL9_4_STABLE [5d60df830] 2020-01-31 14:41:49 -0500
-->
     <para>
      Fix
      parallel <application>pg_dump</application>/<application>pg_restore</application>
      to more gracefully handle failure to create worker processes
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cd23a2019] 2020-01-20 12:57:17 -0500
Branch: REL_12_STABLE [71b121f42] 2020-01-20 12:57:17 -0500
Branch: REL_11_STABLE [4ea5cf403] 2020-01-20 12:57:17 -0500
Branch: REL_10_STABLE [6f6daa1be] 2020-01-20 12:57:17 -0500
Branch: REL9_6_STABLE [208e262f9] 2020-01-20 12:57:17 -0500
Branch: REL9_5_STABLE [b1392a950] 2020-01-20 12:57:17 -0500
Branch: REL9_4_STABLE [42e538fe6] 2020-01-20 12:57:18 -0500
-->
     <para>
      Prevent possible crash or lockup when attempting to terminate a
      parallel <application>pg_dump</application>/<application>pg_restore</application>
      run via a signal (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [29aeda6e4] 2019-11-13 11:35:37 -0500
Branch: REL_12_STABLE [1cd57b05e] 2019-11-13 11:35:37 -0500
Branch: REL_11_STABLE [8e4ef3287] 2019-11-13 11:35:37 -0500
Branch: REL_10_STABLE [c443e3c43] 2019-11-13 11:35:37 -0500
Branch: REL9_6_STABLE [f378d4dac] 2019-11-13 11:35:37 -0500
Branch: REL9_5_STABLE [fb26754af] 2019-11-13 11:35:37 -0500
Branch: REL9_4_STABLE [56c06999d] 2019-11-13 11:35:37 -0500
-->
     <para>
      In <application>pg_upgrade</application>, look inside arrays and
      ranges while searching for non-upgradable data types in tables
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [8fa8e0115] 2020-02-10 12:14:58 -0300
Branch: REL_12_STABLE [87d014da9] 2020-02-10 12:14:58 -0300
Branch: REL_11_STABLE [ca902add6] 2020-02-10 12:14:58 -0300
Branch: REL_10_STABLE [163161723] 2020-02-10 12:14:58 -0300
Branch: REL9_6_STABLE [5575fc208] 2020-02-10 12:14:58 -0300
Branch: REL9_5_STABLE [1b2ae4bcd] 2020-02-10 12:16:40 -0300
Branch: REL9_4_STABLE [6f1e443a6] 2020-02-10 12:14:58 -0300
-->
     <para>
      Apply more thorough syntax checking
      to <application>createuser</application>'s
      <option>--connection-limit</option> option (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [b52739436] 2019-12-03 18:40:07 +0100
Branch: REL_12_STABLE [a8a8c6b29] 2019-12-03 18:40:48 +0100
Branch: REL_11_STABLE [267eb954c] 2019-12-03 18:41:29 +0100
Branch: REL_10_STABLE [46ce37b67] 2019-12-03 18:41:50 +0100
Branch: REL9_6_STABLE [fabdad822] 2019-12-03 18:42:25 +0100
Branch: REL9_5_STABLE [a2fdeb786] 2019-12-03 18:42:54 +0100
Branch: REL9_4_STABLE [44381b1af] 2019-12-03 18:43:15 +0100
-->
     <para>
      In <filename>contrib/dict_int</filename>,
      reject <varname>maxlen</varname> settings less than one
      (Tomas Vondra)
     </para>

     <para>
      This prevents a possible crash with silly settings for that parameter.
     </para>
    </listitem>

    <listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master [d5b9c2baf] 2019-12-23 13:33:25 -0500
Branch: REL_12_STABLE [b5e7569dd] 2019-12-23 13:33:34 -0500
Branch: REL_11_STABLE [f49e5efbc] 2019-12-23 13:33:42 -0500
Branch: REL_10_STABLE [81be0c57e] 2019-12-23 13:33:50 -0500
Branch: REL9_6_STABLE [3757c1640] 2019-12-23 13:33:57 -0500
Branch: REL9_5_STABLE [70fc6c4ef] 2019-12-23 13:34:05 -0500
Branch: REL9_4_STABLE [4a3cdb531] 2019-12-23 13:34:12 -0500
-->
     <para>
      Disallow NULL category values
      in <filename>contrib/tablefunc</filename>'s
      <function>crosstab()</function> function (Joe Conway)
     </para>

     <para>
      This case never worked usefully, and it would crash on some
      platforms.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [62c9b5223] 2020-01-21 13:46:39 +0900
Branch: REL_12_STABLE [ef8e6b2c2] 2020-01-21 13:46:55 +0900
Branch: REL_11_STABLE [7c7026bb7] 2020-01-21 13:47:01 +0900
Branch: REL_10_STABLE [1ef7332b7] 2020-01-21 13:47:05 +0900
Branch: REL9_6_STABLE [9740cdbe5] 2020-01-21 13:47:10 +0900
Branch: REL9_5_STABLE [4a49149b9] 2020-01-21 13:47:13 +0900
Branch: REL9_4_STABLE [dbe405b78] 2020-01-21 13:47:17 +0900
-->
     <para>
      Mark some timeout and statistics-tracking GUC variables
      as <literal>PGDLLIMPORT</literal>, to allow extensions to access
      them on Windows (Pascal Legrand)
     </para>

     <para>
      This applies to
      <literal>lock_timeout</literal>,
      <literal>statement_timeout</literal>,
      <literal>track_activities</literal>,
      <literal>track_counts</literal>, and
      <literal>track_functions</literal>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [28e6a2fd6] 2019-12-09 15:03:51 -0500
Branch: REL_12_STABLE [001362cfd] 2019-12-09 15:03:51 -0500
Branch: REL_11_STABLE [2ed302ab9] 2019-12-09 15:03:51 -0500
Branch: REL_10_STABLE [096ea540e] 2019-12-09 15:03:52 -0500
Branch: REL9_6_STABLE [df44e411c] 2019-12-09 15:03:52 -0500
Branch: REL9_5_STABLE [1a0c65120] 2019-12-09 15:03:52 -0500
Branch: REL9_4_STABLE [7309e75fa] 2019-12-09 15:03:52 -0500
-->
     <para>
      Fix race condition that led to delayed delivery of interprocess
      signals on Windows (Amit Kapila)
     </para>

     <para>
      This caused visible timing oddities in <command>NOTIFY</command>,
      and perhaps other misbehavior.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6d7547c21] 2019-12-16 15:10:55 -0500
Branch: REL_12_STABLE [95f43fee9] 2019-12-16 15:10:55 -0500
Branch: REL_11_STABLE [2cf51809b] 2019-12-16 15:10:55 -0500
Branch: REL_10_STABLE [81b052c31] 2019-12-16 15:10:55 -0500
Branch: REL9_6_STABLE [65cb25e4f] 2019-12-16 15:10:55 -0500
Branch: REL9_5_STABLE [cd0380351] 2019-12-16 15:10:55 -0500
Branch: REL9_4_STABLE [cfb2a4cce] 2019-12-16 15:10:56 -0500
Branch: master [5406513e9] 2019-12-21 17:39:36 -0500
Branch: REL_12_STABLE [90281a3a2] 2019-12-21 17:39:36 -0500
Branch: REL_11_STABLE [b3c4e2418] 2019-12-21 17:39:36 -0500
Branch: REL_10_STABLE [a69f5697a] 2019-12-21 17:39:36 -0500
Branch: REL9_6_STABLE [739201b0e] 2019-12-21 17:39:36 -0500
Branch: REL9_5_STABLE [35b28d983] 2019-12-21 17:39:37 -0500
Branch: REL9_4_STABLE [f1a4020ef] 2019-12-21 17:39:37 -0500
-->
     <para>
      On Windows, retry a few times after
      an <literal>ERROR_ACCESS_DENIED</literal> file access failure
      (Alexander Lakhin, Tom Lane)
     </para>

     <para>
      This helps cope with cases where a file open attempt fails because
      the targeted file is flagged for deletion but not yet actually gone.
      <application>pg_ctl</application>, for example, frequently failed
      with such an error when probing to see if the postmaster had shut
      down yet.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-20">
  <title>Release 9.5.20</title>

  <formalpara>
  <title>Release date:</title>
  <para>2019-11-14</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.19.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.20</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you use the <filename>contrib/intarray</filename>
    extension with a GiST index, and you rely on indexed searches
    for the <literal>&lt;@</literal> operator, see the entry below
    about that.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4d4c66add] 2019-08-18 17:11:57 -0400
Branch: REL_12_STABLE Release: REL_12_0 [328c3f6f9] 2019-08-18 17:11:57 -0400
Branch: REL_11_STABLE [909efc449] 2019-08-18 17:11:58 -0400
Branch: REL_10_STABLE [451432214] 2019-08-18 17:11:58 -0400
Branch: REL9_6_STABLE [3442235f2] 2019-08-18 17:11:58 -0400
Branch: REL9_5_STABLE [c511d367a] 2019-08-18 17:11:58 -0400
-->
     <para>
      Disallow changing a multiply-inherited column's type if not all
      parent tables were changed (Tom Lane)
     </para>

     <para>
      Previously, this was allowed, whereupon queries on the
      now-out-of-sync parent would fail.
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [6bda2af03] 2019-10-17 09:59:21 +1300
Branch: REL_12_STABLE [486a8f152] 2019-10-17 11:08:49 +1300
Branch: REL_11_STABLE [6f1e336de] 2019-10-17 11:01:35 +1300
Branch: REL_10_STABLE [583d86f92] 2019-10-17 10:55:26 +1300
Branch: REL9_6_STABLE [0640f032a] 2019-10-17 11:57:33 +1300
Branch: REL9_5_STABLE [c1443eebe] 2019-10-17 10:28:28 +1300
Branch: REL9_4_STABLE [080cf32d2] 2019-10-17 10:14:51 +1300
-->
     <para>
      Prevent <command>VACUUM</command> from trying to freeze
      an old multixact ID involving a still-running transaction
      (Nathan Bossart, Jeremy Schneider)
     </para>

     <para>
      This case would lead to <command>VACUUM</command> failing until the
      old transaction terminates.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [b7a1c5539] 2019-10-03 10:54:52 +0100
Branch: REL_12_STABLE [0b11dc019] 2019-10-03 11:12:39 +0100
Branch: REL_11_STABLE [0a445f279] 2019-10-03 11:14:30 +0100
Branch: REL_10_STABLE [ede0ab6cc] 2019-10-03 11:15:38 +0100
Branch: REL9_6_STABLE [6db0d7f35] 2019-10-03 11:17:38 +0100
Branch: REL9_5_STABLE [d2427f11b] 2019-10-03 11:18:15 +0100
Branch: REL9_4_STABLE [3473f81dd] 2019-10-03 11:18:20 +0100
-->
     <para>
      Ensure that offset expressions in <literal>WINDOW</literal> clauses
      are processed when a query's expressions are manipulated (Andrew Gierth)
     </para>

     <para>
      This oversight could result in assorted failures when the offsets
      are nontrivial expressions.  One example is that a function
      parameter reference in such an expression would fail if the function
      was inlined.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7f1f72c44] 2019-09-12 18:29:45 -0400
Branch: REL_12_STABLE Release: REL_12_0 [5e9b18c78] 2019-09-12 18:29:17 -0400
Branch: REL_11_STABLE [64d926f2b] 2019-09-12 18:29:48 -0400
Branch: REL_10_STABLE [b54cff2bf] 2019-09-12 18:29:49 -0400
Branch: REL9_6_STABLE [b00132b9a] 2019-09-12 18:29:18 -0400
Branch: REL9_5_STABLE [aee5736f1] 2019-09-12 18:29:18 -0400
Branch: REL9_4_STABLE [ca08ea52b] 2019-09-12 18:29:18 -0400
-->
     <para>
      Fix handling of whole-row variables in <literal>WITH CHECK
      OPTION</literal> expressions and row-level-security policy expressions
      (Andres Freund)
     </para>

     <para>
      Previously, such usage might result in bogus errors about row type
      mismatches.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3887e9455] 2019-10-07 12:39:09 -0400
Branch: REL_12_STABLE [7e8d0eb63] 2019-10-07 12:39:09 -0400
Branch: REL_11_STABLE [021065aac] 2019-10-07 12:39:09 -0400
Branch: REL_10_STABLE [1b5c2ddcd] 2019-10-07 12:39:09 -0400
Branch: REL9_6_STABLE [c69e982a6] 2019-10-07 12:39:09 -0400
Branch: REL9_5_STABLE [8c2910ce5] 2019-10-07 12:39:10 -0400
-->
     <para>
      Avoid postmaster failure if a parallel query requests a background
      worker when no postmaster child process array slots remain free
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1ced082b9] 2019-08-15 20:04:19 -0400
Branch: REL_12_STABLE Release: REL_12_0 [03813a50e] 2019-08-15 20:04:19 -0400
Branch: REL_11_STABLE [aed967d69] 2019-08-15 20:04:19 -0400
Branch: REL_10_STABLE [60886965a] 2019-08-15 20:04:19 -0400
Branch: REL9_6_STABLE [1fe8d209e] 2019-08-15 20:04:19 -0400
Branch: REL9_5_STABLE [cb0c79ae6] 2019-08-15 20:04:19 -0400
Branch: REL9_4_STABLE [afa71d915] 2019-08-15 20:04:19 -0400
-->
     <para>
      Prevent possible double-free if a <literal>BEFORE UPDATE</literal>
      trigger returns the old tuple as-is, and it is not the last such
      trigger (Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [3c8c55dd5] 2019-10-17 13:47:01 +1300
Branch: REL_12_STABLE [3af7c64fe] 2019-10-17 14:00:15 +1300
Branch: REL_11_STABLE [6737111a7] 2019-10-17 13:58:58 +1300
Branch: REL_10_STABLE [89a3cdb32] 2019-10-17 13:57:23 +1300
Branch: REL9_6_STABLE [fd5ffa425] 2019-10-17 13:52:59 +1300
Branch: REL9_5_STABLE [cdbb39213] 2019-10-17 13:50:59 +1300
-->
     <para>
      Provide a relevant error context line when an error occurs while
      setting GUC parameters during parallel worker startup (Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [1169fcf12] 2019-08-07 12:40:49 +0300
Branch: REL_12_STABLE Release: REL_12_0 [f8d30182b] 2019-08-07 12:41:00 +0300
Branch: REL_11_STABLE [c5b796125] 2019-08-07 12:41:16 +0300
Branch: REL_10_STABLE [65468cc70] 2019-08-07 12:41:22 +0300
Branch: REL9_6_STABLE [75774cc22] 2019-08-07 12:41:26 +0300
Branch: REL9_5_STABLE [fd298cd63] 2019-08-07 12:41:31 +0300
Branch: REL9_4_STABLE [54c98fa71] 2019-08-07 12:41:37 +0300
-->
     <para>
      In serializable mode, ensure that row-level predicate locks are
      acquired on the correct version of the row (Thomas Munro, Heikki
      Linnakangas)
     </para>

     <para>
      If the visible version of the row is HOT-updated, the lock might be
      taken on its now-dead predecessor, resulting in subtle failures to
      guarantee serialization.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [a586cc4b6] 2019-10-04 13:34:28 -0700
Branch: REL_12_STABLE [c025165da] 2019-10-04 13:34:39 -0700
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b8e19b932] 2019-10-09 13:30:43 +0900
Branch: REL_12_STABLE [07c314968] 2019-10-09 13:31:13 +0900
Branch: REL_11_STABLE [e34358c43] 2019-10-09 13:31:17 +0900
Branch: REL_10_STABLE [fbfc835b4] 2019-10-09 13:31:22 +0900
Branch: REL9_6_STABLE [4e7a8874a] 2019-10-09 13:31:27 +0900
Branch: REL9_5_STABLE [c50f95272] 2019-10-09 13:31:33 +0900
Branch: REL9_4_STABLE [59800f7ce] 2019-10-09 13:31:38 +0900
-->
     <para>
      Ensure that <function>fsync()</function> is applied only to files
      that are opened read/write (Andres Freund, Michael Paquier)
     </para>

     <para>
      Some code paths tried to do this after opening a file read-only,
      but on some platforms that causes <quote>bad file descriptor</quote>
      or similar errors.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8e10405c7] 2019-10-03 17:34:25 -0400
Branch: REL_12_STABLE [8381242df] 2019-10-03 17:34:25 -0400
Branch: REL_11_STABLE [e5ff97571] 2019-10-03 17:34:25 -0400
Branch: REL_10_STABLE [226551e7c] 2019-10-03 17:34:26 -0400
Branch: REL9_6_STABLE [677989cc0] 2019-10-03 17:34:26 -0400
Branch: REL9_5_STABLE [54d641da0] 2019-10-03 17:34:26 -0400
Branch: REL9_4_STABLE [6899be289] 2019-10-03 17:34:26 -0400
-->
     <para>
      Allow encoding conversion to succeed on longer strings than before
      (&Aacute;lvaro Herrera, Tom Lane)
     </para>

     <para>
      Previously, there was a hard limit of 0.25GB on the input string,
      but now it will work as long as the converted output is not over 1GB.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c477f3e44] 2019-10-03 13:56:26 -0400
Branch: REL_12_STABLE [9a407209a] 2019-10-03 13:56:26 -0400
Branch: REL_11_STABLE [82d0a46ea] 2019-10-03 13:56:26 -0400
Branch: REL_10_STABLE [9ad1b572d] 2019-10-03 13:56:26 -0400
Branch: REL9_6_STABLE [e5e4f12a5] 2019-10-03 13:56:26 -0400
Branch: REL9_5_STABLE [1534531fe] 2019-10-03 13:56:26 -0400
Branch: REL9_4_STABLE [4829576ba] 2019-10-03 13:56:27 -0400
-->
     <para>
      Allow <function>repalloc()</function> to give back space when a
      large chunk is reduced in size (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [df86e52ca] 2019-10-02 15:53:07 +0900
Branch: REL_12_STABLE [2a724cdbf] 2019-10-02 15:53:51 +0900
Branch: REL_11_STABLE [b978de0eb] 2019-10-02 15:53:56 +0900
Branch: REL_10_STABLE [7ca35472c] 2019-10-02 15:54:01 +0900
Branch: REL9_6_STABLE [ac1efdd08] 2019-10-02 15:54:11 +0900
Branch: REL9_5_STABLE [ae205dfe6] 2019-10-02 15:54:16 +0900
-->
     <para>
      Ensure that temporary WAL and history files are removed at the end
      of archive recovery (Sawada Masahiko)
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [ec1259e88] 2019-10-18 22:32:18 +0900
Branch: REL_12_STABLE [9dfbf9a04] 2019-10-18 22:34:05 +0900
Branch: REL_11_STABLE [f7b70700b] 2019-10-18 22:35:07 +0900
Branch: REL_10_STABLE [c455ee88c] 2019-10-18 22:35:19 +0900
Branch: REL9_6_STABLE [579996bc2] 2019-10-18 22:35:30 +0900
Branch: REL9_5_STABLE [1b2ba8874] 2019-10-18 22:35:41 +0900
Branch: REL9_4_STABLE [14c59185b] 2019-10-18 22:35:52 +0900
-->
     <para>
      Avoid failure in archive recovery
      if <varname>recovery_min_apply_delay</varname> is enabled
      (Fujii Masao)
     </para>

     <para>
      <varname>recovery_min_apply_delay</varname> is not typically used in
      this configuration, but it should work.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [38ddeab13] 2019-10-17 15:06:06 +0200
Branch: REL_12_STABLE [1391c13ce] 2019-10-17 15:06:06 +0200
Branch: REL_11_STABLE [45e4067c0] 2019-10-17 15:06:05 +0200
Branch: REL_10_STABLE [0d9fcbada] 2019-10-17 15:06:05 +0200
Branch: REL9_6_STABLE [5f038991e] 2019-10-17 15:06:05 +0200
Branch: REL9_5_STABLE [b2ab06e02] 2019-10-17 15:06:05 +0200
Branch: REL9_4_STABLE [abd5071d2] 2019-10-17 15:06:05 +0200
-->
     <para>
      Avoid unwanted delay during shutdown of a logical replication
      walsender (Craig Ringer, &Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [5f6b1eb0c] 2019-11-06 16:12:21 +0900
Branch: REL_12_STABLE [9ae4bdadf] 2019-11-06 16:12:28 +0900
Branch: REL_11_STABLE [cb6d7f985] 2019-11-06 16:12:34 +0900
Branch: REL_10_STABLE [f7b0d0704] 2019-11-06 16:12:40 +0900
Branch: REL9_6_STABLE [16b43e091] 2019-11-06 16:12:47 +0900
Branch: REL9_5_STABLE [404d25f3c] 2019-11-06 16:12:51 +0900
Branch: REL9_4_STABLE [15d90a02a] 2019-11-06 16:12:56 +0900
-->
     <para>
      Correctly time-stamp replication messages for logical
      decoding (Jeff Janes)
     </para>

     <para>
      This oversight resulted, for example,
      in <structname>pg_stat_subscription</structname>.<structfield>last_msg_send_time</structfield>
      usually reading as NULL.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [bac2fae05] 2019-09-13 16:36:28 -0300
Branch: REL_12_STABLE Release: REL_12_0 [96b5033e1] 2019-09-13 16:36:28 -0300
Branch: REL_11_STABLE [41f3d2626] 2019-09-13 16:36:28 -0300
Branch: REL_10_STABLE [4f7dbf0ef] 2019-09-13 16:36:28 -0300
Branch: REL9_6_STABLE [ae4305f6d] 2019-09-13 16:36:28 -0300
Branch: REL9_5_STABLE [7110f5c37] 2019-09-13 16:36:28 -0300
Branch: REL9_4_STABLE [e8c7f40a1] 2019-09-13 16:36:28 -0300
-->
     <para>
      In logical decoding, ensure that sub-transactions are correctly
      accounted for when reconstructing a snapshot (Masahiko Sawada)
     </para>

     <para>
      This error leads to assertion failures; it's unclear whether any
      bad effects exist in production builds.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [20345197f] 2019-11-01 22:38:32 +0900
Branch: REL_12_STABLE [7b8c2de64] 2019-11-01 22:38:45 +0900
Branch: REL_11_STABLE [61f238392] 2019-11-01 22:38:51 +0900
Branch: REL_10_STABLE [b99bfc3c9] 2019-11-01 22:38:55 +0900
Branch: REL9_6_STABLE [52684bc7d] 2019-11-01 22:39:01 +0900
Branch: REL9_5_STABLE [0927d0c25] 2019-11-01 22:39:05 +0900
Branch: REL9_4_STABLE [f88f7206e] 2019-11-01 22:39:09 +0900
-->
     <para>
      Fix race condition during backend exit, when the backend process has
      previously waited for synchronous replication to occur (Dongming Liu)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f1bf619ac] 2019-08-14 15:09:42 -0400
Branch: REL_12_STABLE Release: REL_12_0 [75b2f011f] 2019-08-14 15:09:20 -0400
Branch: REL_11_STABLE [32d38f54a] 2019-08-14 15:09:20 -0400
Branch: REL_10_STABLE [f8c9a0852] 2019-08-14 15:09:20 -0400
Branch: REL9_6_STABLE [4784ad7a3] 2019-08-14 15:09:20 -0400
Branch: REL9_5_STABLE [29f9b1819] 2019-08-14 15:09:20 -0400
Branch: REL9_4_STABLE [a4b0d955b] 2019-08-14 15:09:20 -0400
-->
     <para>
      Fix <command>ALTER SYSTEM</command> to cope with duplicate entries
      in <filename>postgresql.auto.conf</filename> (Ian Barwick)
     </para>

     <para>
      <command>ALTER SYSTEM</command> itself will not generate such a state,
      but external tools that modify <filename>postgresql.auto.conf</filename>
      could do so.  Duplicate entries for the target variable will now be
      removed, and then the new setting (if any) will be appended at the end.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6e4213056] 2019-08-27 14:44:26 -0400
Branch: REL_12_STABLE Release: REL_12_0 [1510339dc] 2019-08-27 14:44:26 -0400
Branch: REL_11_STABLE [cf86803e8] 2019-08-27 14:44:26 -0400
Branch: REL_10_STABLE [771e12701] 2019-08-27 14:44:26 -0400
Branch: REL9_6_STABLE [465f4ddda] 2019-08-27 14:44:26 -0400
Branch: REL9_5_STABLE [ef47d284d] 2019-08-27 14:44:26 -0400
-->
     <para>
      Reject include directives with empty file names in configuration
      files, and report include-file recursion more clearly
      (Ian Barwick, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3affe76ef] 2019-11-05 14:27:37 -0500
Branch: REL_12_STABLE [f9bd3b6d9] 2019-11-05 14:27:37 -0500
Branch: REL_11_STABLE [97ddc47b9] 2019-11-05 14:27:37 -0500
Branch: REL_10_STABLE [0238a5028] 2019-11-05 14:27:37 -0500
Branch: REL9_6_STABLE [383602f9a] 2019-11-05 14:27:37 -0500
Branch: REL9_5_STABLE [970372037] 2019-11-05 14:27:37 -0500
Branch: REL9_4_STABLE [762b25653] 2019-11-05 14:27:38 -0500
-->
     <para>
      Avoid logging complaints about abandoned connections when using PAM
      authentication (Tom Lane)
     </para>

     <para>
      libpq-based clients will typically make two connection attempts when
      a password is required, since they don't prompt their user for a
      password until their first connection attempt fails.  Therefore the
      server is coded not to generate useless log spam when a client
      closes the connection upon being asked for a password.  However,
      the PAM authentication code hadn't gotten that memo, and would
      generate several messages about a phantom authentication failure.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [64579be64] 2019-08-07 18:16:31 +0900
Branch: REL_12_STABLE Release: REL_12_0 [d8652ec55] 2019-08-07 18:17:34 +0900
Branch: REL_11_STABLE [d16d241a5] 2019-08-07 18:17:39 +0900
Branch: REL_10_STABLE [1ba4d0fe4] 2019-08-07 18:17:46 +0900
Branch: REL9_6_STABLE [7c64a2cd9] 2019-08-07 18:17:52 +0900
Branch: REL9_5_STABLE [1de3e0589] 2019-08-07 18:17:57 +0900
Branch: REL9_4_STABLE [1f7943698] 2019-08-07 18:18:04 +0900
-->
     <para>
      Fix some cases where an incomplete date specification is not
      detected in <type>time with time zone</type> input (Alexander Lakhin)
     </para>

     <para>
      If a time zone with a time-varying UTC offset is specified, then a
      date must be as well, so that the offset can be resolved.  Depending
      on the syntax used, this check was not enforced in some cases,
      allowing bogus output to be produced.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5ac0d9360] 2019-09-22 17:45:59 -0400
Branch: REL_12_STABLE Release: REL_12_0 [860216efa] 2019-09-22 17:46:00 -0400
Branch: REL_11_STABLE [7e7abed05] 2019-09-22 17:46:00 -0400
Branch: REL_10_STABLE [096d34c3b] 2019-09-22 17:46:00 -0400
Branch: REL9_6_STABLE [6ddd164aa] 2019-09-22 17:46:00 -0400
Branch: REL9_5_STABLE [35eb13270] 2019-09-22 17:46:00 -0400
Branch: REL9_4_STABLE [8a17afe84] 2019-09-22 17:46:00 -0400
Branch: master [61aa9f544] 2019-10-04 10:34:40 -0400
Branch: REL_12_STABLE [6c3b6406d] 2019-10-04 10:34:21 -0400
Branch: REL_11_STABLE [b8ddf0bdf] 2019-10-04 10:34:21 -0400
Branch: REL_10_STABLE [9faa9794f] 2019-10-04 10:34:21 -0400
Branch: REL9_6_STABLE [30e5b3bbe] 2019-10-04 10:34:21 -0400
Branch: REL9_5_STABLE [8b77f783b] 2019-10-04 10:34:21 -0400
Branch: REL9_4_STABLE [b6a6c129f] 2019-10-04 10:34:21 -0400
-->
     <para>
      Fix misbehavior of <function>bitshiftright()</function> (Tom Lane)
     </para>

     <para>
      The bitstring right shift operator failed to zero out padding space
      that exists in the last byte of the result when the bitstring length
      is not a multiple of 8.  While invisible to most operations, any
      nonzero bits there would result in unexpected comparison behavior,
      since bitstring comparisons don't bother to ignore the extra bits,
      expecting them to always be zero.
     </para>

     <para>
      If you have inconsistent data as a result of saving the output
      of <function>bitshiftright()</function> in a table, it's possible to
      fix it with something like
<programlisting>
UPDATE mytab SET bitcol = ~(~bitcol) WHERE bitcol != ~(~bitcol);
</programlisting>
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a7145f6bc] 2019-11-07 11:22:58 -0500
Branch: REL_12_STABLE [f6e72dc9c] 2019-11-07 11:22:59 -0500
Branch: REL_11_STABLE [b49b7f944] 2019-11-07 11:23:00 -0500
Branch: REL_10_STABLE [5f794f757] 2019-11-07 11:23:02 -0500
Branch: REL9_6_STABLE [15783d057] 2019-11-07 11:23:03 -0500
Branch: REL9_5_STABLE [84780d468] 2019-11-07 11:23:04 -0500
Branch: REL9_4_STABLE [8d380864a] 2019-11-07 11:23:06 -0500
Branch: REL9_6_STABLE [a55018760] 2019-11-09 15:50:16 -0500
Branch: REL9_5_STABLE [30f6998ff] 2019-11-09 15:50:16 -0500
Branch: REL9_4_STABLE [18622caa3] 2019-11-09 15:50:16 -0500
-->
     <para>
      Fix detection of edge-case integer overflow in interval
      multiplication (Yuya Watari)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [bde7493d1] 2019-08-28 12:55:33 +0300
Branch: REL_12_STABLE Release: REL_12_0 [6b7819a0b] 2019-08-28 12:56:03 +0300
Branch: REL_11_STABLE [1c99acc6e] 2019-08-28 12:57:10 +0300
Branch: REL_10_STABLE [756178232] 2019-08-28 13:02:58 +0300
Branch: REL9_6_STABLE [e2e616579] 2019-08-28 12:58:05 +0300
Branch: REL9_5_STABLE [cf00ca522] 2019-08-28 12:58:10 +0300
Branch: REL9_4_STABLE [6292cde1c] 2019-08-28 12:58:55 +0300
Branch: master [744c848dc] 2019-08-28 12:59:47 -0400
-->
     <para>
      Fix incorrect compression logic for GIN posting lists
      (Heikki Linnakangas)
     </para>

     <para>
      A GIN posting list item can require 7 bytes if the distance between
      adjacent indexed TIDs exceeds 16TB.  One step in the logic was out
      of sync with that, and might try to write the value into a 6-byte
      buffer.  In principle this could cause a stack overrun, but on most
      architectures it's likely that the next byte would be unused
      alignment padding, making the bug harmless.  In any case the bug
      would be very difficult to hit.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [e5d8f3596] 2019-09-08 22:08:12 +0300
Branch: REL_12_STABLE Release: REL_12_0 [bc67f4189] 2019-09-08 21:17:31 +0300
Branch: REL_11_STABLE [749b04d1d] 2019-09-08 21:41:56 +0300
Branch: REL_10_STABLE [8f724002e] 2019-09-08 21:47:34 +0300
Branch: REL9_6_STABLE [b2037afec] 2019-09-08 21:48:44 +0300
Branch: REL9_5_STABLE [986319d46] 2019-09-08 21:49:15 +0300
Branch: REL9_4_STABLE [111fb7e42] 2019-09-08 21:58:17 +0300
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [02f90879e] 2019-09-08 22:08:12 +0300
Branch: REL_12_STABLE Release: REL_12_0 [e6af7b367] 2019-09-08 21:17:37 +0300
Branch: REL_11_STABLE [d807200b4] 2019-09-08 21:46:58 +0300
Branch: REL_10_STABLE [92f6b49c4] 2019-09-08 21:47:34 +0300
Branch: REL9_6_STABLE [a5431b7d5] 2019-09-08 21:48:45 +0300
Branch: REL9_5_STABLE [3c155bafa] 2019-09-08 21:49:16 +0300
Branch: REL9_4_STABLE [1df412304] 2019-09-08 22:30:12 +0300
-->
     <para>
      Fix handling of infinity, NaN, and NULL values in KNN-GiST
      (Alexander Korotkov)
     </para>

     <para>
      The query's output order could be wrong (different from a plain
      sort's result) if some distances computed for non-null column values
      are infinity or NaN.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [6cae9d2c1] 2019-09-19 21:48:39 +0300
Branch: REL_12_STABLE Release: REL_12_0 [31cbd7605] 2019-09-19 21:49:07 +0300
Branch: REL_11_STABLE [d6a90aac5] 2019-09-19 21:49:32 +0300
Branch: REL_10_STABLE [2da8e56db] 2019-09-19 21:50:00 +0300
Branch: REL9_6_STABLE [53d9cf2db] 2019-09-19 21:50:44 +0300
Branch: REL9_5_STABLE [ad458d0cd] 2019-09-19 22:09:51 +0300
Branch: REL9_4_STABLE [332eda5bd] 2019-09-19 22:10:46 +0300
Branch: REL_11_STABLE [984b9ba1d] 2019-09-19 23:36:01 +0300
Branch: REL_10_STABLE [2f0434e8e] 2019-09-19 23:39:26 +0300
Branch: REL9_6_STABLE [140b7b1f9] 2019-09-19 23:39:31 +0300
Branch: REL9_5_STABLE [388939748] 2019-09-19 23:39:35 +0300
-->
     <para>
      Fix handling of searches for NULL in KNN-SP-GiST (Nikita Glukhov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [db477b691] 2019-10-21 14:18:01 -0400
Branch: REL_12_STABLE [4f2ad5226] 2019-10-21 14:18:16 -0400
Branch: REL_11_STABLE [a05a04d0e] 2019-10-21 14:18:31 -0400
Branch: REL_10_STABLE [aebe3ef0e] 2019-10-21 14:18:38 -0400
Branch: REL9_6_STABLE [185253ab8] 2019-10-21 14:18:47 -0400
Branch: REL9_5_STABLE [e3267407e] 2019-10-21 14:18:55 -0400
Branch: REL9_4_STABLE [fedcab352] 2019-10-21 14:19:03 -0400
-->
     <para>
      On Windows, recognize additional spellings of the <quote>Norwegian
      (Bokm&aring;l)</quote> locale name (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c8cb98ec4] 2019-11-07 14:21:52 -0500
Branch: REL_12_STABLE [101654987] 2019-11-07 14:21:52 -0500
Branch: REL_11_STABLE [89f56fc22] 2019-11-07 14:21:52 -0500
Branch: REL_10_STABLE [831ca9513] 2019-11-07 14:21:52 -0500
Branch: REL9_6_STABLE [baa483984] 2019-11-07 14:21:52 -0500
Branch: REL9_5_STABLE [b705d6391] 2019-11-07 14:21:52 -0500
Branch: REL9_4_STABLE [b20233aac] 2019-11-07 14:21:52 -0500
-->
     <para>
      Avoid compile failure if an ECPG client
      includes <filename>ecpglib.h</filename> while
      having <literal>ENABLE_NLS</literal> defined (Tom Lane)
     </para>

     <para>
      This risk was created by a misplaced
      declaration: <function>ecpg_gettext()</function> should not be
      visible to client code.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [aef362385] 2019-09-02 14:03:05 -0400
Branch: REL_12_STABLE Release: REL_12_0 [90433c38e] 2019-09-02 14:02:45 -0400
Branch: REL_11_STABLE [5524ef558] 2019-09-02 14:02:46 -0400
Branch: REL_10_STABLE [3080f8f61] 2019-09-02 14:02:46 -0400
Branch: REL9_6_STABLE [b0b2ef25e] 2019-09-02 14:02:46 -0400
Branch: REL9_5_STABLE [62724bd95] 2019-09-02 14:02:46 -0400
Branch: REL9_4_STABLE [89535db97] 2019-09-02 14:02:46 -0400
-->
     <para>
      In <application>psql</application>, resynchronize internal state
      about the server after an unexpected connection loss and successful
      reconnection (Peter Billen, Tom Lane)
     </para>

     <para>
      Ordinarily this is unnecessary since the state would be the same
      anyway.  But it can matter in corner cases, such as where the
      connection might lead to one of several servers.  This change
      causes <application>psql</application> to re-issue any interactive
      messages that it would have issued at startup, for example about
      whether SSL is in use.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6338fa3e7] 2019-08-25 15:04:04 -0400
Branch: REL_12_STABLE Release: REL_12_0 [363382521] 2019-08-25 15:04:04 -0400
Branch: REL_11_STABLE [5fc7b1e93] 2019-08-25 15:04:04 -0400
Branch: REL_10_STABLE [fb55e9539] 2019-08-25 15:04:04 -0400
Branch: REL9_6_STABLE [28d2ce3c7] 2019-08-25 15:04:04 -0400
Branch: REL9_5_STABLE [65b1cad5a] 2019-08-25 15:04:04 -0400
Branch: REL9_4_STABLE [c693c5c49] 2019-08-25 15:04:04 -0400
-->
     <para>
      Avoid platform-specific null pointer dereference
      in <application>psql</application> (Quentin Rameau)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_6_STABLE [404cbc562] 2019-10-26 17:37:19 -0400
Branch: REL9_5_STABLE [7fc50a8a7] 2019-10-26 17:37:19 -0400
Branch: REL9_4_STABLE [ddcc582a4] 2019-10-26 17:37:20 -0400
-->
     <para>
      Fix <application>pg_dump</application>'s handling of circular
      dependencies in views (Tom Lane)
     </para>

     <para>
      In some cases a view may depend on an object
      that <application>pg_dump</application> needs to dump later than the
      view; the most common example is that a query using <literal>GROUP
      BY</literal> on a primary-key column may be semantically invalid
      without the primary key.  This is now handled by emitting a
      dummy <command>CREATE VIEW</command> command that just establishes
      the view's column names and types, and then later
      emitting <command>CREATE OR REPLACE VIEW</command> with the full
      view definition.  Previously, the dummy definition was actually
      a <command>CREATE TABLE</command> command, and this was
      automagically converted to a view by a later <command>CREATE
      RULE</command> command.  The new approach has been used successfully
      in <productname>PostgreSQL</productname> version 10 and later.  We
      are back-patching it into older releases now because of reports that
      the previous method causes bogus error messages about the view's
      replica identity status.  This change also avoids problems when
      trying to use the <option>--clean</option> option during a restore
      involving such a view.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5102f3944] 2019-11-04 16:25:05 -0500
Branch: REL_12_STABLE [ca27a84c9] 2019-11-04 16:25:05 -0500
Branch: REL_11_STABLE [078f5bc8e] 2019-11-04 16:25:05 -0500
Branch: REL_10_STABLE [ee8b95f26] 2019-11-04 16:25:05 -0500
Branch: REL9_6_STABLE [648f17879] 2019-11-04 16:25:05 -0500
Branch: REL9_5_STABLE [74d32ee70] 2019-11-04 16:25:05 -0500
Branch: REL9_4_STABLE [da5cd7a68] 2019-11-04 16:25:05 -0500
-->
     <para>
      In <application>pg_dump</application>, ensure stable output order
      for similarly-named triggers and row-level-security policy objects
      (Benjie Gillam)
     </para>

     <para>
      Previously, if two triggers on different tables had the same names,
      they would be sorted in OID-based order, which is less desirable
      than sorting them by table name.  Likewise for RLS policies.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [31d43710f] 2019-08-13 16:58:32 -0400
Branch: REL_12_STABLE Release: REL_12_0 [6844adba5] 2019-08-13 16:57:58 -0400
Branch: REL_11_STABLE [4dea8ad56] 2019-08-13 16:57:58 -0400
Branch: REL_10_STABLE [f2bdfebb9] 2019-08-13 16:57:58 -0400
Branch: REL9_6_STABLE [2b608ba31] 2019-08-13 16:57:59 -0400
Branch: REL9_5_STABLE [c56858487] 2019-08-13 16:57:59 -0400
Branch: REL9_4_STABLE [63ae888a9] 2019-08-13 16:57:59 -0400
-->
     <para>
      Fix <application>pg_dump</application> to work again with pre-8.3
      source servers (Tom Lane)
     </para>

     <para>
      A previous fix caused <application>pg_dump</application> to always
      try to query <structname>pg_opfamily</structname>, but that catalog
      doesn't exist before version 8.3.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: REL_11_STABLE [3574c0ac0] 2019-11-05 01:23:39 -0300
Branch: REL_10_STABLE [5ee8f0fe1] 2019-11-05 10:08:55 -0300
Branch: REL9_6_STABLE [12a51e2eb] 2019-11-05 09:57:36 -0300
Branch: REL9_5_STABLE [d38635725] 2019-11-05 09:57:36 -0300
Branch: REL9_4_STABLE [9fb25fda6] 2019-11-05 09:57:35 -0300
-->
     <para>
      In <application>pg_restore</application>, treat
      <option>-f -</option> as meaning <quote>output to stdout</quote>
      (&Aacute;lvaro Herrera)
     </para>

     <para>
      This synchronizes <application>pg_restore</application>'s behavior
      with some other applications, and in particular makes pre-v12 branches
      act similarly to version 12's <application>pg_restore</application>,
      simplifying creation of dump/restore scripts that work across
      multiple <productname>PostgreSQL</productname> versions.  Before this
      change, <application>pg_restore</application> interpreted such a
      switch as meaning <quote>output to a file
      named <filename>-</filename></quote>, but few people would want that.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [8d48e6a72] 2019-10-16 13:23:14 +0200
Branch: REL_12_STABLE [ebb4caa91] 2019-10-16 13:25:25 +0200
Branch: REL_11_STABLE [a970b6cde] 2019-10-16 13:26:22 +0200
Branch: REL_10_STABLE [2218fdca4] 2019-10-16 13:26:53 +0200
Branch: REL9_6_STABLE [0a643de08] 2019-10-16 13:27:24 +0200
Branch: REL9_5_STABLE [f57b01dd7] 2019-10-16 13:27:51 +0200
Branch: REL9_4_STABLE [235a52ca0] 2019-10-16 13:31:00 +0200
Branch: REL9_6_STABLE [e09ab32a2] 2019-10-16 16:20:07 +0200
Branch: REL9_5_STABLE [984aa0ede] 2019-10-16 16:23:09 +0200
Branch: REL9_4_STABLE [bc3a94dc0] 2019-10-16 16:28:48 +0200
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [a524f50d0] 2019-10-16 13:23:18 +0200
Branch: REL_12_STABLE [a8e49ae0c] 2019-10-16 13:25:37 +0200
Branch: REL_11_STABLE [d071a2539] 2019-10-16 13:26:26 +0200
Branch: REL_10_STABLE [e86ece221] 2019-10-16 13:26:56 +0200
-->
     <para>
      Improve <application>pg_upgrade</application>'s checks for the use
      of a data type that has changed representation, such
      as <type>line</type> (Tomas Vondra)
     </para>

     <para>
      The previous coding could be fooled by cases where the data type of
      interest underlies a stored column of a domain or composite type.
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [286af0ce1] 2019-09-06 08:22:32 -0400
Branch: REL_12_STABLE Release: REL_12_0 [ce5542d40] 2019-09-06 08:49:56 -0400
Branch: REL_11_STABLE [61c65cce4] 2019-09-06 08:53:13 -0400
Branch: REL_10_STABLE [62fb12d7e] 2019-09-06 08:56:45 -0400
Branch: REL9_6_STABLE [23df88226] 2019-09-06 09:01:45 -0400
Branch: REL9_5_STABLE [f697c6396] 2019-09-06 09:05:12 -0400
Branch: REL9_4_STABLE [fbe897134] 2019-09-06 09:09:09 -0400
-->
     <para>
      Detect file read errors
      during <application>pg_basebackup</application> (Jeevan Chalke)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [be182e4f9] 2019-08-28 11:47:35 +0900
Branch: REL_12_STABLE Release: REL_12_0 [e96f52443] 2019-08-28 11:48:15 +0900
Branch: REL_11_STABLE [f51006ea9] 2019-08-28 11:48:19 +0900
Branch: REL_10_STABLE [19bfa15a8] 2019-08-28 11:48:23 +0900
Branch: REL9_6_STABLE [d64789e97] 2019-08-28 11:48:29 +0900
Branch: REL9_5_STABLE [e9dcbc9c3] 2019-08-28 11:48:33 +0900
-->
     <para>
      In <application>pg_rewind</application> with an online source
      cluster, disable timeouts, much
      as <application>pg_dump</application> does (Alexander Kukushkin)
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [a0c96856e] 2019-11-07 16:31:36 +0900
Branch: REL_12_STABLE [e5cfb8cbb] 2019-11-07 16:32:37 +0900
Branch: REL_11_STABLE [fb53c4c07] 2019-11-07 16:32:58 +0900
Branch: REL_10_STABLE [127ad57f5] 2019-11-07 16:33:06 +0900
Branch: REL9_6_STABLE [aa7cd6a8e] 2019-11-07 16:33:23 +0900
Branch: REL9_5_STABLE [b1bebc2ce] 2019-11-07 16:33:47 +0900
Branch: REL9_4_STABLE [1accf9974] 2019-11-07 16:33:58 +0900
-->
     <para>
      Fix failure in <application>pg_waldump</application> with
      the <option>-s</option> option, when a continuation WAL record ends
      exactly at a page boundary (Andrey Lepikhov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [3b6b54f17] 2019-09-12 15:45:08 -0700
Branch: REL_12_STABLE Release: REL_12_0 [3097a0d6e] 2019-09-12 15:45:07 -0700
Branch: REL_11_STABLE [e87b00b5f] 2019-09-12 15:45:05 -0700
Branch: REL_10_STABLE [09b236af9] 2019-09-12 15:45:03 -0700
Branch: REL9_6_STABLE [835646503] 2019-09-12 15:45:01 -0700
Branch: REL9_5_STABLE [9064cc139] 2019-09-12 15:44:59 -0700
-->
     <para>
      In <application>pg_waldump</application>,
      include the <literal>newitemoff</literal> field in btree page split
      records (Peter Geoghegan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [e4d92126f] 2019-10-29 22:53:05 -0700
Branch: REL_12_STABLE [d4b5206b2] 2019-10-29 22:53:30 -0700
Branch: REL_11_STABLE [3b24cf732] 2019-10-29 22:53:33 -0700
Branch: REL_10_STABLE [82200115e] 2019-10-29 22:53:37 -0700
Branch: REL9_6_STABLE [bc4f56c18] 2019-10-29 22:54:36 -0700
Branch: REL9_5_STABLE [39ff656a4] 2019-10-29 22:55:19 -0700
-->
     <para>
      In <application>pg_waldump</application> with
      the <option>--bkp-details</option> option, avoid emitting extra
      newlines for WAL records involving full-page writes (Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [e0f76f204] 2019-10-29 19:18:07 -0700
Branch: REL_12_STABLE [4ab353c47] 2019-10-29 19:28:34 -0700
Branch: REL_11_STABLE [af67aee69] 2019-10-29 19:28:34 -0700
Branch: REL_10_STABLE [e3ff8c360] 2019-10-29 19:28:34 -0700
Branch: REL9_6_STABLE [95f2efd50] 2019-10-29 19:28:34 -0700
Branch: REL9_5_STABLE [c3882f8b8] 2019-10-29 19:28:34 -0700
-->
     <para>
      Fix small memory leak in <application>pg_waldump</application>
      (Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [71d84efba] 2019-08-26 11:14:18 +0900
Branch: REL_12_STABLE Release: REL_12_0 [63fc3b124] 2019-08-26 11:14:24 +0900
Branch: REL_11_STABLE [5d76c8037] 2019-08-26 11:14:28 +0900
Branch: REL_10_STABLE [4fca14600] 2019-08-26 11:14:33 +0900
Branch: REL9_6_STABLE [eb91b8ee6] 2019-08-26 11:14:39 +0900
Branch: REL9_5_STABLE [a21ec1a95] 2019-08-26 11:14:44 +0900
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [9acda7311] 2019-08-27 09:11:31 +0900
Branch: REL_12_STABLE Release: REL_12_0 [b783a38d4] 2019-08-27 09:11:38 +0900
Branch: REL_11_STABLE [128e9b2cc] 2019-08-27 09:11:43 +0900
Branch: REL_10_STABLE [c90096009] 2019-08-27 09:11:48 +0900
Branch: REL9_6_STABLE [c4d75313e] 2019-08-27 09:12:10 +0900
Branch: REL9_5_STABLE [4ed3bda49] 2019-08-27 09:12:14 +0900
-->
     <para>
      Fix <application>vacuumdb</application> with a
      high <option>--jobs</option> option to handle running out of file
      descriptors better (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [efc77cf5f] 2019-08-06 18:04:51 -0400
Branch: REL_12_STABLE Release: REL_12_0 [2f76f4182] 2019-08-06 18:04:51 -0400
Branch: REL_11_STABLE [113b3d903] 2019-08-06 18:04:51 -0400
Branch: REL_10_STABLE [5b3e6c13f] 2019-08-06 18:04:51 -0400
Branch: REL9_6_STABLE [e519eded6] 2019-08-06 18:04:51 -0400
Branch: REL9_5_STABLE [ced272d2d] 2019-08-06 18:04:52 -0400
Branch: REL9_4_STABLE [614119d00] 2019-08-06 18:04:52 -0400
-->
     <para>
      Fix <filename>contrib/intarray</filename>'s GiST opclasses to not
      fail for empty arrays with <literal>&lt;@</literal> (Tom Lane)
     </para>

     <para>
      A clause like <literal><replaceable>array_column</replaceable>
      &lt;@ <replaceable>constant_array</replaceable></literal> is
      considered indexable, but the index search may not find empty array
      values; of course, such entries should trivially match the search.
     </para>

     <para>
      The only practical back-patchable fix for this requires
      making <literal>&lt;@</literal> index searches scan the whole index,
      which is what this patch does.  This is unfortunate: it means that
      the query performance is likely worse than a plain sequential scan
      would be.
     </para>

     <para>
      Applications whose performance is adversely impacted by this change
      have a couple of options.  They could switch to a GIN index, which
      doesn't have this bug, or they could replace
      <literal><replaceable>array_column</replaceable>
      &lt;@ <replaceable>constant_array</replaceable></literal>
      with <literal><replaceable>array_column</replaceable>
      &lt;@ <replaceable>constant_array</replaceable>
      AND <replaceable>array_column</replaceable>
      &amp;&amp; <replaceable>constant_array</replaceable></literal>.
      That will provide about the same performance as before, and it will
      find all non-empty subsets of the given constant array, which is all
      that could reliably be expected of the query before.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_6_STABLE [984ee0f6d] 2019-09-08 13:45:13 -0400
Branch: REL9_5_STABLE [f1a9abe61] 2019-09-08 13:45:13 -0400
Branch: REL9_4_STABLE [96db9d5e2] 2019-09-08 13:45:13 -0400
-->
     <para>
      Allow <literal>configure --with-python</literal> to succeed when
      only <filename>python3</filename> or
      only <filename>python2</filename> can be found (Peter Eisentraut,
      Tom Lane)
     </para>

     <para>
      Search for <filename>python</filename>,
      then <filename>python3</filename>,
      then <filename>python2</filename>, so
      that <application>configure</application> can succeed in the
      increasingly-more-common situation where there is no executable
      named simply <filename>python</filename>.  It's still possible to
      override this choice by setting the <envar>PYTHON</envar>
      environment variable.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d995fd667] 2019-10-21 13:52:25 -0400
Branch: REL_12_STABLE [ca658c91a] 2019-10-21 13:52:25 -0400
Branch: REL_11_STABLE [4e19bd41d] 2019-10-21 13:52:25 -0400
Branch: REL_10_STABLE [328b81348] 2019-10-21 13:52:25 -0400
Branch: REL9_6_STABLE [34621cb12] 2019-10-21 13:52:25 -0400
Branch: REL9_5_STABLE [8835e0bd4] 2019-10-21 13:52:26 -0400
Branch: REL9_4_STABLE [6d2b18d07] 2019-10-21 13:52:26 -0400
Branch: master [44273ce4f] 2019-10-21 12:32:35 -0400
Branch: REL_12_STABLE [aa5bb828a] 2019-10-21 12:32:35 -0400
Branch: REL_11_STABLE [99c51d5ed] 2019-10-21 12:32:36 -0400
Branch: REL_10_STABLE [e167b1ae3] 2019-10-21 12:32:36 -0400
Branch: REL9_6_STABLE [62ca50ad7] 2019-10-21 12:32:36 -0400
Branch: REL9_5_STABLE [11330c311] 2019-10-21 12:32:36 -0400
Branch: REL9_4_STABLE [727c2ccfe] 2019-10-21 12:32:36 -0400
-->
     <para>
      Fix <application>configure</application>'s test for presence of
      libperl so that it works on recent Red Hat releases (Tom Lane)
     </para>

     <para>
      Previously, it could fail if the user sets <literal>CFLAGS</literal>
      to <literal>-O0</literal>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [89b4d7744] 2019-10-18 20:20:28 -0700
Branch: REL_12_STABLE [ef13f914e] 2019-10-18 20:20:31 -0700
Branch: REL_11_STABLE [af4477b00] 2019-10-18 20:20:32 -0700
Branch: REL_10_STABLE [083929372] 2019-10-18 20:20:32 -0700
Branch: REL9_6_STABLE [09d74aef3] 2019-10-18 20:20:32 -0700
Branch: REL9_5_STABLE [62e881946] 2019-10-18 20:20:32 -0700
Branch: REL9_4_STABLE [930787c7f] 2019-10-18 20:20:33 -0700
-->
     <para>
      Ensure correct code generation for spinlocks on PowerPC (Noah Misch)
     </para>

     <para>
      The previous spinlock coding allowed the compiler to select register
      zero for use with an assembly instruction that does not accept that
      register, causing a build failure.  We have seen only one long-ago
      report that matches this bug, but it could cause problems for people
      trying to build modified <productname>PostgreSQL</productname> code
      or use atypical compiler options.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [dd50f1a43] 2019-09-13 19:34:06 -0700
Branch: REL_12_STABLE Release: REL_12_0 [1c6b62a7d] 2019-09-13 19:34:18 -0700
Branch: REL_11_STABLE [40ad42025] 2019-09-13 19:34:18 -0700
Branch: REL_10_STABLE [8972ac696] 2019-09-13 19:34:19 -0700
Branch: REL9_6_STABLE [a1df9a015] 2019-09-13 19:34:19 -0700
Branch: REL9_5_STABLE [75941f257] 2019-09-13 19:34:19 -0700
-->
     <para>
      On PowerPC, avoid depending on the xlc
      compiler's <function>__fetch_and_add()</function> function
      (Noah Misch)
     </para>

     <para>
      xlc 13 and newer interpret this function in a way incompatible with
      our usage, resulting in an unusable build
      of <productname>PostgreSQL</productname>.  Fix by using custom
      assembly code instead.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [5f3d271d0] 2019-10-12 00:21:47 -0700
Branch: REL_12_STABLE [3fb14cfcb] 2019-10-12 00:21:50 -0700
Branch: REL_11_STABLE [e5b4926ef] 2019-10-12 00:21:50 -0700
Branch: REL_10_STABLE [77cc4a595] 2019-10-12 00:21:50 -0700
Branch: REL9_6_STABLE [c73f4f680] 2019-10-12 00:21:50 -0700
Branch: REL9_5_STABLE [e40eb31c0] 2019-10-12 00:21:51 -0700
Branch: REL9_4_STABLE [b705582b4] 2019-10-12 00:21:51 -0700
-->
     <para>
      On AIX, don't use the compiler option <option>-qsrcmsg</option>
      (Noah Misch)
     </para>

     <para>
      This avoids an internal compiler error with xlc v16.1.0, with little
      consequence other than changing the format of compiler error messages.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [ad7595b89] 2019-10-04 15:34:40 -0400
Branch: REL_12_STABLE [ec38d2311] 2019-10-04 15:39:27 -0400
Branch: REL_11_STABLE [3b9c22700] 2019-10-04 15:39:19 -0400
Branch: REL_10_STABLE [62d2caed6] 2019-10-04 15:39:12 -0400
Branch: REL9_6_STABLE [1e9a0487d] 2019-10-04 15:39:02 -0400
Branch: REL9_5_STABLE [6ca51b155] 2019-10-04 15:38:48 -0400
Branch: REL9_4_STABLE [8f8809091] 2019-10-04 15:38:36 -0400
-->
     <para>
      Fix MSVC build process to cope with spaces in the file path of
      OpenSSL (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [df4fbcd89] 2019-09-20 19:53:33 -0400
Branch: REL_12_STABLE Release: REL_12_0 [2966e30e5] 2019-09-20 19:53:52 -0400
Branch: REL_11_STABLE [24f64fba0] 2019-09-20 19:54:00 -0400
Branch: REL_10_STABLE [769802ef9] 2019-09-20 19:54:07 -0400
Branch: REL9_6_STABLE [0bd64398e] 2019-09-20 19:54:20 -0400
Branch: REL9_5_STABLE [128abdef7] 2019-09-20 19:54:29 -0400
Branch: REL9_4_STABLE [29e47f83c] 2019-09-20 19:54:36 -0400
-->
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2019c for DST law changes in Fiji and Norfolk Island, plus
      historical corrections for Alberta, Austria, Belgium, British
      Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad,
      Kentucky, Michigan, Norfolk Island, South Korea, and Turkey.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-19">
  <title>Release 9.5.19</title>

  <formalpara>
  <title>Release date:</title>
  <para>2019-08-08</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.18.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.19</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [ffa2d37e5] 2019-08-05 07:48:41 -0700
Branch: REL_12_STABLE [9993fa9dd] 2019-08-05 07:48:45 -0700
Branch: REL_11_STABLE [21f94c51f] 2019-08-05 07:48:45 -0700
Branch: REL_10_STABLE [2062007cb] 2019-08-05 07:48:45 -0700
Branch: REL9_6_STABLE [7da46192d] 2019-08-05 07:48:45 -0700
Branch: REL9_5_STABLE [752fa3dbf] 2019-08-05 07:48:45 -0700
Branch: REL9_4_STABLE [86737438b] 2019-08-05 07:48:46 -0700
-->
     <para>
      Require schema qualification to cast to a temporary type when using
      functional cast syntax (Noah Misch)
     </para>

     <para>
      We have long required invocations of temporary functions to
      explicitly specify the temporary schema, that
      is <literal>pg_temp.<replaceable>func_name</replaceable>(<replaceable>args</replaceable>)</literal>.
      Require this as well for casting to temporary types using functional
      notation, for
      example <literal>pg_temp.<replaceable>type_name</replaceable>(<replaceable>arg</replaceable>)</literal>.
      Otherwise it's possible to capture a function call using a temporary
      object, allowing privilege escalation in much the same ways that we
      blocked in CVE-2007-2138.
      (CVE-2019-10208)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_12_BR [f946a4091] 2019-06-24 16:43:21 -0400
Branch: REL_11_STABLE [afaf48afb] 2019-06-24 16:43:05 -0400
Branch: REL_10_STABLE [cb8962ce8] 2019-06-24 16:43:05 -0400
Branch: REL9_6_STABLE [da1041fc3] 2019-06-24 16:43:05 -0400
Branch: REL9_5_STABLE [316f68932] 2019-06-24 16:43:05 -0400
Branch: REL9_4_STABLE [ddfb1b2ee] 2019-06-24 16:43:05 -0400
-->
     <para>
      Fix failure of <command>ALTER TABLE ... ALTER COLUMN TYPE</command>
      when altering multiple columns' types in one command (Tom Lane)
     </para>

     <para>
      This fixes a regression introduced in the most recent minor releases:
      indexes using the altered columns were not processed correctly,
      leading to strange failures during <command>ALTER TABLE</command>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master Release: REL_12_BR [da53be23d] 2019-06-30 23:49:13 +0100
Branch: REL_11_STABLE [05dc5f476] 2019-06-30 23:49:23 +0100
Branch: REL_10_STABLE [a1637caee] 2019-06-30 23:49:25 +0100
Branch: REL9_6_STABLE [793eb94e3] 2019-06-30 23:49:29 +0100
Branch: REL9_5_STABLE [4a36c7715] 2019-06-30 23:49:31 +0100
-->
     <para>
      Avoid using unnecessary sort steps for some queries
      with <literal>GROUPING SETS</literal> (Andrew Gierth, Richard Guo)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3093eb2b8] 2019-07-16 18:17:47 -0400
Branch: REL_12_STABLE [e0d13dc6f] 2019-07-16 18:17:47 -0400
Branch: REL_11_STABLE [46e2a18d0] 2019-07-16 18:17:47 -0400
Branch: REL_10_STABLE [583025c3c] 2019-07-16 18:17:47 -0400
Branch: REL9_6_STABLE [a6e7eb42d] 2019-07-16 18:17:47 -0400
Branch: REL9_5_STABLE [f9208f246] 2019-07-16 18:17:47 -0400
Branch: REL9_4_STABLE [67bd6adcb] 2019-07-16 18:17:47 -0400
-->
     <para>
      Fix mishandling of multi-column foreign keys when rebuilding a
      foreign key constraint (Tom Lane)
     </para>

     <para>
      <command>ALTER TABLE</command> could make an incorrect decision about
      whether revalidation of a foreign key is necessary, if not all
      columns of the key are of the same type.  It seems likely that the
      error would always have been in the conservative direction, that is
      revalidating unnecessarily.
     </para>
    </listitem>

    <listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
Branch: master [e6feef571] 2019-07-18 13:41:10 -0700
Branch: REL_12_STABLE [613eabcd5] 2019-07-18 17:26:47 -0700
Branch: REL_11_STABLE [f5f20deda] 2019-07-18 14:01:17 -0700
Branch: REL_10_STABLE [955089d4d] 2019-07-18 16:49:10 -0700
Branch: REL9_6_STABLE [56afeb765] 2019-07-18 16:53:17 -0700
Branch: REL9_5_STABLE [8af1fccba] 2019-07-18 16:55:59 -0700
Branch: REL9_4_STABLE [2be355498] 2019-07-18 17:01:44 -0700
Branch: master [b538c90b1] 2019-07-18 17:04:50 -0700
Branch: REL_12_STABLE [5245552dd] 2019-07-18 17:26:56 -0700
Branch: REL_11_STABLE [477ebfc96] 2019-07-18 16:45:03 -0700
Branch: REL_10_STABLE [b0a7e0f07] 2019-07-18 16:49:25 -0700
Branch: REL9_6_STABLE [390bf90f7] 2019-07-18 16:53:25 -0700
Branch: REL9_5_STABLE [f1c72294b] 2019-07-18 16:56:18 -0700
Branch: REL9_4_STABLE [812623b69] 2019-07-18 17:01:58 -0700
-->
     <para>
      Prevent incorrect canonicalization of date ranges
      with <literal>infinity</literal> endpoints (Laurenz Albe)
     </para>

     <para>
      It's incorrect to try to convert an open range to a closed one or
      vice versa by incrementing or decrementing the endpoint value, if
      the endpoint is infinite; so leave the range alone in such cases.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b9d2c5c7a] 2019-07-26 11:59:00 -0400
Branch: REL_12_STABLE [01e0538e8] 2019-07-26 11:59:00 -0400
Branch: REL_11_STABLE [ca918f99a] 2019-07-26 11:59:00 -0400
Branch: REL_10_STABLE [fa854112f] 2019-07-26 11:59:00 -0400
Branch: REL9_6_STABLE [30bed9f63] 2019-07-26 11:59:00 -0400
Branch: REL9_5_STABLE [13e493cf6] 2019-07-26 11:59:00 -0400
Branch: REL9_4_STABLE [81b29c871] 2019-07-26 11:59:00 -0400
-->
     <para>
      Fix loss of fractional digits when converting very
      large <type>money</type> values to <type>numeric</type> (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_12_BR [1323bfce5] 2019-06-22 20:31:50 -0400
Branch: REL_11_STABLE [40dde8290] 2019-06-22 20:31:50 -0400
Branch: REL_10_STABLE [05399b148] 2019-06-22 20:31:50 -0400
Branch: REL9_6_STABLE [9895e3a36] 2019-06-22 20:31:50 -0400
Branch: REL9_5_STABLE [36d2c3ad3] 2019-06-22 20:31:50 -0400
Branch: REL9_4_STABLE [2854e2ab6] 2019-06-22 20:31:50 -0400
-->
     <para>
      Fix spinlock assembly code for MIPS CPUs so that it works on
      MIPS r6 (YunQiang Su)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b654714f9] 2019-07-25 12:11:17 -0400
Branch: REL_12_STABLE [c58cf97f2] 2019-07-25 12:11:18 -0400
Branch: REL_11_STABLE [11a0a4db3] 2019-07-25 12:11:19 -0400
Branch: REL_10_STABLE [cb65b454f] 2019-07-25 12:11:21 -0400
Branch: REL9_6_STABLE [ba27151d1] 2019-07-25 12:11:22 -0400
Branch: REL9_5_STABLE [6266654db] 2019-07-25 12:11:23 -0400
Branch: REL9_4_STABLE [8c52b77dd] 2019-07-25 12:11:24 -0400
-->
     <para>
      Make <application>libpq</application> ignore carriage return
      (<literal>\r</literal>) in connection service files
      (Tom Lane, Michael Paquier)
     </para>

     <para>
      In some corner cases, service files containing Windows-style
      newlines could be mis-parsed, resulting in connection failures.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [07b39083c] 2019-07-31 15:42:49 -0400
Branch: REL_12_STABLE [408f75938] 2019-07-31 15:42:50 -0400
Branch: REL_11_STABLE [c64e29705] 2019-07-31 15:42:50 -0400
Branch: REL_10_STABLE [7615afa48] 2019-07-31 15:42:50 -0400
Branch: REL9_6_STABLE [b31a98022] 2019-07-31 15:42:50 -0400
Branch: REL9_5_STABLE [9dd74ba5a] 2019-07-31 15:42:50 -0400
Branch: REL9_4_STABLE [4e10b6f82] 2019-07-31 15:42:50 -0400
-->
     <para>
      Fix <application>pg_dump</application> to ensure that custom operator
      classes are dumped in the right order (Tom Lane)
     </para>

     <para>
      If a user-defined opclass is the subtype opclass of a user-defined
      range type, related objects were dumped in the wrong order,
      producing an unrestorable dump.  (The underlying failure to handle
      opclass dependencies might manifest in other cases too, but this is
      the only known case.)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b2a3d706b] 2019-08-01 09:37:28 +0900
Branch: REL_12_STABLE [20f5cb195] 2019-08-01 09:37:48 +0900
Branch: REL_11_STABLE [a7eb28d0c] 2019-08-01 09:38:02 +0900
Branch: REL_10_STABLE [cb0074417] 2019-08-01 09:38:14 +0900
Branch: REL9_6_STABLE [957b822b5] 2019-08-01 09:38:20 +0900
Branch: REL9_5_STABLE [4536e494f] 2019-08-01 09:38:25 +0900
Branch: REL9_4_STABLE [eea28a3cb] 2019-08-01 09:38:29 +0900
-->
     <para>
      Fix <filename>contrib/passwordcheck</filename> to coexist with other
      users of <varname>check_password_hook</varname> (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f5a4ab23e] 2019-07-25 11:02:43 -0400
Branch: REL_12_STABLE [665329abe] 2019-07-25 11:02:57 -0400
Branch: REL_11_STABLE [5a1c61bdf] 2019-07-25 11:03:08 -0400
Branch: REL_10_STABLE [5c3d47287] 2019-07-25 11:03:13 -0400
Branch: REL9_6_STABLE [0a9ba5baa] 2019-07-25 11:03:21 -0400
Branch: REL9_5_STABLE [b22e24983] 2019-07-25 11:03:30 -0400
Branch: REL9_4_STABLE [0e259d4bc] 2019-07-25 11:03:37 -0400
-->
     <para>
      Fix <filename>contrib/sepgsql</filename> tests to work under recent
      SELinux releases (Mike Palmiotto)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_12_BR [eb9812f27] 2019-05-21 13:11:57 -0400
Branch: REL_11_STABLE [8d21512dc] 2019-07-22 17:14:22 -0400
Branch: REL_10_STABLE [7ac7bf50c] 2019-07-22 17:14:22 -0400
Branch: REL9_6_STABLE [75348a733] 2019-07-22 17:14:22 -0400
Branch: REL9_5_STABLE [69c3d5191] 2019-07-22 17:14:22 -0400
Branch: REL9_4_STABLE [19f9a5aed] 2019-07-22 17:14:22 -0400
-->
     <para>
      Reduce <systemitem>stderr</systemitem> output
      from <application>pg_upgrade</application>'s test script (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [2b1394fc2] 2019-07-02 14:02:33 +0900
Branch: REL_12_STABLE [f2d069ce9] 2019-07-03 08:57:22 +0900
Branch: REL_11_STABLE [721963f24] 2019-07-03 08:57:39 +0900
Branch: REL_10_STABLE [0ce8e49b2] 2019-07-03 08:58:04 +0900
Branch: REL9_6_STABLE [78aaffd28] 2019-07-03 08:58:17 +0900
Branch: REL9_5_STABLE [3337fd192] 2019-07-03 08:58:28 +0900
Branch: REL9_4_STABLE [d49c127d9] 2019-07-03 08:58:34 +0900
-->
     <para>
      Support building Postgres with Microsoft Visual Studio 2019
      (Haribabu Kommi)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [20e99cddd] 2019-07-25 11:38:43 -0400
Branch: REL_12_STABLE [6e5417d77] 2019-07-25 11:39:26 -0400
Branch: REL_11_STABLE [fe9e63284] 2019-07-25 11:39:34 -0400
Branch: REL_10_STABLE [165f4eecf] 2019-07-25 11:39:45 -0400
Branch: REL9_6_STABLE [09fa17160] 2019-07-25 11:40:09 -0400
Branch: REL9_5_STABLE [4f435f78d] 2019-07-25 11:40:23 -0400
Branch: REL9_4_STABLE [53fd0f04b] 2019-07-25 11:40:34 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cb9bb1578] 2019-07-25 14:42:02 -0400
Branch: REL_12_STABLE [b24537046] 2019-07-25 14:42:08 -0400
Branch: REL_11_STABLE [e465d9d40] 2019-07-25 14:42:12 -0400
Branch: REL_10_STABLE [ed304d1e2] 2019-07-25 14:42:16 -0400
Branch: REL9_6_STABLE [3f1c6d048] 2019-07-25 14:42:21 -0400
Branch: REL9_5_STABLE [4583605e6] 2019-07-25 14:42:25 -0400
Branch: REL9_4_STABLE [7ea91ae19] 2019-07-25 14:42:30 -0400
-->
     <para>
      In Visual Studio builds, honor <literal>WindowsSDKVersion</literal>
      environment variable, if that's set (Peifeng Qiu)
     </para>

     <para>
      This fixes build failures in some configurations.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_12_BR [d993e0fb8] 2019-06-26 10:44:46 +0900
Branch: REL_11_STABLE [0e08a3a1f] 2019-06-26 23:04:32 +0900
Branch: REL_10_STABLE [a55980559] 2019-06-26 23:05:06 +0900
Branch: REL9_6_STABLE [532960669] 2019-06-26 23:05:34 +0900
Branch: REL9_5_STABLE [d908a0087] 2019-06-26 23:05:54 +0900
Branch: REL9_4_STABLE [05b2758c3] 2019-06-26 23:06:14 +0900
-->
     <para>
      Support OpenSSL 1.1.0 and newer in Visual Studio builds
      (Juan Jos&eacute; Santamar&iacute;a Flecha, Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master Release: REL_12_BR [0089c3059] 2019-06-25 09:36:21 +1200
Branch: REL_11_STABLE [2839bf353] 2019-06-25 09:40:20 +1200
Branch: REL_10_STABLE [956611e4c] 2019-06-25 09:40:54 +1200
Branch: REL9_6_STABLE [3a3b361cc] 2019-06-25 09:41:15 +1200
Branch: REL9_5_STABLE [9ad5ea82d] 2019-06-25 09:44:10 +1200
-->
     <para>
      Allow <application>make</application> options to be passed down
      to <application>gmake</application> when non-GNU make is invoked at
      the top level (Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3754113f3] 2019-07-26 12:45:32 -0400
Branch: REL_12_STABLE [e31dfe99c] 2019-07-26 12:45:52 -0400
Branch: REL_11_STABLE [4459266bf] 2019-07-26 12:45:57 -0400
Branch: REL_10_STABLE [ae9b91be7] 2019-07-26 12:46:03 -0400
Branch: REL9_6_STABLE [51b47471f] 2019-07-26 12:46:10 -0400
Branch: REL9_5_STABLE [9ef811742] 2019-07-26 12:46:15 -0400
Branch: REL9_4_STABLE [6c4ffab76] 2019-07-26 12:46:20 -0400
-->
     <para>
      Avoid choosing <literal>localtime</literal>
      or <literal>posixrules</literal> as <varname>TimeZone</varname>
      during <application>initdb</application> (Tom Lane)
     </para>

     <para>
      In some cases <application>initdb</application> would choose one of
      these artificial zone names over the <quote>real</quote> zone name.
      Prefer any other match to the C library's timezone behavior over
      these two.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8ab66081c] 2019-07-26 13:07:08 -0400
Branch: REL_12_STABLE [d095b2fe6] 2019-07-26 13:07:08 -0400
Branch: REL_11_STABLE [d304313b0] 2019-07-26 13:07:08 -0400
Branch: REL_10_STABLE [55862b2e9] 2019-07-26 13:07:08 -0400
Branch: REL9_6_STABLE [f6c7c64e9] 2019-07-26 13:07:08 -0400
Branch: REL9_5_STABLE [f227aecb9] 2019-07-26 13:07:08 -0400
Branch: REL9_4_STABLE [e49132e63] 2019-07-26 13:07:08 -0400
-->
     <para>
      Adjust <structname>pg_timezone_names</structname> view to show
      the <literal>Factory</literal> time zone if and only if it has a
      short abbreviation (Tom Lane)
     </para>

     <para>
      Historically, IANA set up this artificial zone with
      an <quote>abbreviation</quote> like <literal>Local time zone must be
      set--see zic manual page</literal>.  Modern versions of the tzdb
      database show <literal>-00</literal> instead, but some platforms
      alter the data to show one or another of the historical phrases.
      Show this zone only if it uses the modern abbreviation.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f285322f9] 2019-07-17 18:26:23 -0400
Branch: REL_12_STABLE [59cea8f36] 2019-07-17 18:26:23 -0400
Branch: REL_11_STABLE [1d1ff50d2] 2019-07-17 18:26:23 -0400
Branch: REL_10_STABLE [ccc323b57] 2019-07-17 18:26:24 -0400
Branch: REL9_6_STABLE [22e73dea3] 2019-07-17 18:26:24 -0400
Branch: REL9_5_STABLE [417845646] 2019-07-17 18:26:24 -0400
Branch: REL9_4_STABLE [6db29a8fc] 2019-07-17 18:26:24 -0400
Branch: master [421466863] 2019-07-19 14:48:57 -0400
Branch: REL_12_STABLE [533522846] 2019-07-19 14:49:05 -0400
Branch: REL_11_STABLE [ee9417a04] 2019-07-19 14:49:10 -0400
Branch: REL_10_STABLE [8a4fa297a] 2019-07-19 14:49:15 -0400
Branch: REL9_6_STABLE [e480d8350] 2019-07-19 14:49:21 -0400
Branch: REL9_5_STABLE [caa22d72a] 2019-07-19 14:49:26 -0400
Branch: REL9_4_STABLE [847561c1d] 2019-07-19 14:49:31 -0400
-->
     <para>
      Sync our copy of the timezone library with IANA tzcode release 2019b
      (Tom Lane)
     </para>

     <para>
      This adds support for <application>zic</application>'s new <option>-b
      slim</option> option to reduce the size of the installed zone files.
      We are not currently using that, but may enable it in future.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [93907478e] 2019-07-17 19:15:21 -0400
Branch: REL_12_STABLE [d4f283162] 2019-07-17 19:15:35 -0400
Branch: REL_11_STABLE [bcafb675a] 2019-07-17 19:15:42 -0400
Branch: REL_10_STABLE [53256e892] 2019-07-17 19:15:48 -0400
Branch: REL9_6_STABLE [e3441b2a2] 2019-07-17 19:15:55 -0400
Branch: REL9_5_STABLE [a0c905f23] 2019-07-17 19:16:01 -0400
Branch: REL9_4_STABLE [8474656d9] 2019-07-17 19:16:13 -0400
-->
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2019b for DST law changes in Brazil, plus
      historical corrections for Hong Kong, Italy, and Palestine.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-18">
  <title>Release 9.5.18</title>

  <formalpara>
  <title>Release date:</title>
  <para>2019-06-20</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.17.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.18</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e76de8861] 2019-06-12 12:29:39 -0400
Branch: REL_11_STABLE [0b6edb9fb] 2019-06-12 12:29:41 -0400
Branch: REL_10_STABLE [2981e5a61] 2019-06-12 12:29:42 -0400
Branch: REL9_6_STABLE [77d45b790] 2019-06-12 12:29:43 -0400
Branch: REL9_5_STABLE [f7e99de95] 2019-06-12 12:29:45 -0400
Branch: REL9_4_STABLE [9695ecf36] 2019-06-12 12:29:25 -0400
-->
     <para>
      Fix failure of <command>ALTER TABLE ... ALTER COLUMN TYPE</command>
      when the table has a partial exclusion constraint (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [ceac4505d] 2019-06-12 11:30:11 +0900
Branch: REL_11_STABLE [fa5f3a4bc] 2019-06-12 11:30:41 +0900
Branch: REL_10_STABLE [56a932533] 2019-06-12 11:31:00 +0900
Branch: REL9_6_STABLE [ff1a25601] 2019-06-12 11:31:14 +0900
Branch: REL9_5_STABLE [13f4b462d] 2019-06-12 11:31:20 +0900
-->
     <para>
      Fix failure of <command>COMMENT</command> command for comments on
      domain constraints (Daniel Gustafsson, Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3d99a8139] 2019-06-12 19:43:08 -0400
Branch: REL_11_STABLE [f95d8f810] 2019-06-12 19:43:09 -0400
Branch: REL_10_STABLE [30d3df0a7] 2019-06-12 19:43:10 -0400
Branch: REL9_6_STABLE [ad3e61b28] 2019-06-12 19:42:39 -0400
Branch: REL9_5_STABLE [bf612fd3a] 2019-06-12 19:42:39 -0400
Branch: REL9_4_STABLE [8ace51a6b] 2019-06-12 19:42:39 -0400
-->
     <para>
      Fix incorrect printing of queries with duplicate join names
      (Philip Dub&eacute;)
     </para>

     <para>
      This oversight caused a dump/restore failure for views containing
      such queries.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8a29ed053] 2019-05-12 18:53:38 -0400
Branch: REL_11_STABLE [72ce7acaf] 2019-05-12 18:53:40 -0400
Branch: REL_10_STABLE [940f64792] 2019-05-12 18:53:41 -0400
Branch: REL9_6_STABLE [2a3dbc151] 2019-05-12 18:53:42 -0400
Branch: REL9_5_STABLE [d6de52636] 2019-05-12 18:53:43 -0400
Branch: REL9_4_STABLE [b1ca28e57] 2019-05-12 18:53:45 -0400
-->
     <para>
      Fix misoptimization of <literal>{1,1}</literal> quantifiers in
      regular expressions (Tom Lane)
     </para>

     <para>
      Such quantifiers were treated as no-ops and optimized away;
      but the documentation specifies that they impose greediness, or
      non-greediness in the case of the non-greedy
      variant <literal>{1,1}?</literal>, on the subexpression they're
      attached to, and this did not happen.  The misbehavior occurred
      only if the subexpression contained capturing parentheses or a
      back-reference.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [85ccb6899] 2019-05-11 21:27:29 -0400
Branch: REL_11_STABLE [eb97242c2] 2019-05-11 21:27:13 -0400
Branch: REL_10_STABLE [c3d113136] 2019-05-11 21:27:13 -0400
Branch: REL9_6_STABLE [27d3394b0] 2019-05-11 21:27:13 -0400
Branch: REL9_5_STABLE [899f943ca] 2019-05-11 21:27:13 -0400
-->
     <para>
      Avoid possible failures while initializing a new
      process's <structname>pg_stat_activity</structname> data (Tom Lane)
     </para>

     <para>
      Certain operations that could fail, such as converting strings
      extracted from an SSL certificate into the database encoding, were
      being performed inside a critical section.  Failure there would
      result in database-wide lockup due to violating the access protocol
      for shared <structname>pg_stat_activity</structname> data.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [610747d86] 2019-05-10 14:56:41 -0400
Branch: REL_11_STABLE [803f90ab7] 2019-05-10 14:56:41 -0400
Branch: REL_10_STABLE [3dcf45af5] 2019-05-10 14:56:41 -0400
Branch: REL9_6_STABLE [a73c8caea] 2019-05-10 14:56:41 -0400
Branch: REL9_5_STABLE [91a05390c] 2019-05-10 14:56:41 -0400
Branch: REL9_4_STABLE [b1cde67a4] 2019-05-10 14:56:41 -0400
-->
     <para>
      Fix race condition in check to see whether a pre-existing shared
      memory segment is still in use by a conflicting postmaster (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [fff2a7d7b] 2019-06-10 23:34:50 -0700
Branch: REL_11_STABLE [c01556017] 2019-06-10 23:35:38 -0700
Branch: REL_10_STABLE [52ad5fc0a] 2019-06-10 23:36:48 -0700
Branch: REL9_6_STABLE [b8607e15e] 2019-06-10 23:36:55 -0700
Branch: REL9_5_STABLE [483b2d7ae] 2019-06-10 23:36:59 -0700
Branch: REL9_4_STABLE [69f32206d] 2019-06-10 23:37:02 -0700
-->
     <para>
      Avoid attempting to do database accesses for parameter checking in
      processes that are not connected to a specific database (Vignesh C,
      Andres Freund)
     </para>

     <para>
      This error could result in failures like <quote>cannot read pg_class
      without having selected a database</quote>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ddf927fb1] 2019-05-13 10:53:19 -0400
Branch: REL_11_STABLE [6b0e9411f] 2019-05-13 10:53:19 -0400
Branch: REL_10_STABLE [e3bf3c0f8] 2019-05-13 10:53:19 -0400
Branch: REL9_6_STABLE [8eaba0b93] 2019-05-13 10:53:19 -0400
Branch: REL9_5_STABLE [0ec3d2ab2] 2019-05-13 10:53:19 -0400
-->
     <para>
      Avoid possible hang in <application>libpq</application> if using SSL
      and OpenSSL's pending-data buffer contains an exact multiple of 256
      bytes (David Binderman)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [23bd3cec6] 2018-09-13 12:36:21 -0400
Branch: REL_11_STABLE [995b4fe0b] 2019-06-14 11:25:13 -0400
Branch: REL_10_STABLE [8de574aa8] 2019-06-14 11:25:13 -0400
Branch: REL9_6_STABLE [75b0f21e1] 2019-06-14 11:25:13 -0400
Branch: REL9_5_STABLE [77dc741a1] 2019-06-14 11:25:13 -0400
Branch: REL9_4_STABLE [37011bcb3] 2019-06-14 11:25:13 -0400
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [e3846a00c] 2019-06-15 18:15:23 +0100
Branch: REL_11_STABLE [7f28fc8e9] 2019-06-15 18:16:43 +0100
Branch: REL_10_STABLE [2913a892e] 2019-06-15 18:18:03 +0100
Branch: REL9_6_STABLE [5f5b6667e] 2019-06-15 18:19:30 +0100
Branch: REL9_5_STABLE [6335f8a99] 2019-06-15 18:21:41 +0100
Branch: REL9_4_STABLE [6c66865f3] 2019-06-15 18:23:16 +0100
-->
     <para>
      Improve <application>initdb</application>'s handling of multiple
      equivalent names for the system time zone (Tom Lane, Andrew Gierth)
     </para>

     <para>
      Make <application>initdb</application> examine
      the <filename>/etc/localtime</filename> symbolic link, if that
      exists, to break ties between equivalent names for the system time
      zone.  This makes <application>initdb</application> more likely to
      select the time zone name that the user would expect when multiple
      identical time zones exist.  It will not change the behavior
      if <filename>/etc/localtime</filename> is not a symlink to a zone
      data file, nor if the time zone is determined from
      the <envar>TZ</envar> environment variable.
     </para>

     <para>
      Separately, prefer <literal>UTC</literal> over other spellings of
      that time zone, when neither <envar>TZ</envar>
      nor <filename>/etc/localtime</filename> provide a hint.  This fixes
      an annoyance introduced by <application>tzdata</application> 2019a's
      change to make the <literal>UCT</literal> and <literal>UTC</literal>
      zone names equivalent: <application>initdb</application> was then
      preferring <literal>UCT</literal>, which almost nobody wants.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [e51bad8fb] 2019-05-11 13:00:54 +0900
Branch: REL_11_STABLE [e16ab408f] 2019-05-11 13:01:07 +0900
Branch: REL_10_STABLE [c6354e943] 2019-05-11 13:01:12 +0900
Branch: REL9_6_STABLE [0c132d458] 2019-05-11 13:01:19 +0900
Branch: REL9_5_STABLE [e17fba8d8] 2019-05-11 13:01:24 +0900
Branch: REL9_4_STABLE [82ed20e15] 2019-05-11 13:01:29 +0900
-->
     <para>
      Fix misleading error reports
      from <application>reindexdb</application> (Julien Rouhaud)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [3ae3c18b3] 2019-05-09 10:29:10 +0900
Branch: REL_11_STABLE [25f12acd5] 2019-05-09 10:29:29 +0900
Branch: REL_10_STABLE [db8802a99] 2019-05-09 10:29:40 +0900
Branch: REL9_6_STABLE [a9a886c6f] 2019-05-09 10:29:52 +0900
Branch: REL9_5_STABLE [a475b1e77] 2019-05-09 10:30:08 +0900
-->
     <para>
      Ensure that <application>vacuumdb</application> returns correct
      status if an error occurs while using parallel jobs
      (Julien Rouhaud)
     </para>
    </listitem>

    <listitem>
<!--
Author: Etsuro Fujita <efujita@postgresql.org>
Branch: master [8b6da83d1] 2019-06-13 17:59:09 +0900
Branch: REL_11_STABLE [214460182] 2019-06-13 17:59:11 +0900
Branch: REL_10_STABLE [0f2b23426] 2019-06-13 17:59:12 +0900
Branch: REL9_6_STABLE [1ade21e7f] 2019-06-13 17:59:13 +0900
Branch: REL9_5_STABLE [eddb79705] 2019-06-13 17:59:15 +0900
Branch: REL9_4_STABLE [1a3d9f62c] 2019-06-13 17:59:17 +0900
-->
     <para>
      In <filename>contrib/postgres_fdw</filename>, account for possible
      data modifications by local <literal>BEFORE ROW UPDATE</literal>
      triggers (Shohei Mochizuki)
     </para>

     <para>
      If a trigger modified a column that was otherwise not changed by the
      <command>UPDATE</command>, the new value was not transmitted to the
      remote server.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [d02768ddd] 2019-05-12 10:33:05 -0700
Branch: REL_11_STABLE [4ec14e5aa] 2019-05-12 10:33:08 -0700
Branch: REL_10_STABLE [409f5303c] 2019-05-12 10:33:08 -0700
Branch: REL9_6_STABLE [ff7555c4f] 2019-05-12 10:33:36 -0700
Branch: REL9_5_STABLE [9dc65bcf9] 2019-05-12 10:34:22 -0700
Branch: REL9_4_STABLE [08e3fd96f] 2019-05-12 10:34:26 -0700
-->
     <para>
      On Windows, avoid failure when the database encoding is set to
      SQL_ASCII and we attempt to log a non-ASCII string (Noah Misch)
     </para>

     <para>
      The code had been assuming that such strings must be in UTF-8, and
      would throw an error if they didn't appear to be validly encoded.
      Now, just transmit the untranslated bytes to the log.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3f61b3205] 2019-05-31 12:34:54 -0400
Branch: REL_11_STABLE [312017fcc] 2019-05-31 12:34:54 -0400
Branch: REL_10_STABLE [683c17b30] 2019-05-31 12:34:54 -0400
Branch: REL9_6_STABLE [c332c94ad] 2019-05-31 12:34:55 -0400
Branch: REL9_5_STABLE [da53e4f93] 2019-05-31 12:34:55 -0400
Branch: REL9_4_STABLE [db5d99916] 2019-05-31 12:34:55 -0400
-->
     <para>
      Make <application>PL/pgSQL</application>'s header files C++-safe
      (George Tarasov)
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-17">
  <title>Release 9.5.17</title>

  <formalpara>
  <title>Release date:</title>
  <para>2019-05-09</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.16.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.17</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Prevent row-level security policies from being bypassed via
      selectivity estimators (Dean Rasheed)
     </para>

     <para>
      Some of the planner's selectivity estimators apply user-defined
      operators to values found in <structname>pg_statistic</structname>
      (e.g., most-common values).  A leaky operator therefore can disclose
      some of the entries in a data column, even if the calling user lacks
      permission to read that column.  In CVE-2017-7484 we added
      restrictions to forestall that, but we failed to consider the
      effects of row-level security.  A user who has SQL permission to
      read a column, but who is forbidden to see certain rows due to RLS
      policy, might still learn something about those rows' contents via a
      leaky operator.  This patch further tightens the rules, allowing
      leaky operators to be applied to statistics data only when there is
      no relevant RLS policy.  (CVE-2019-10130)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix behavior for an <command>UPDATE</command>
      or <command>DELETE</command> on an inheritance tree or partitioned
      table in which every table can be excluded (Amit Langote, Tom Lane)
     </para>

     <para>
      In such cases, the query did not report the correct set of output
      columns when a <literal>RETURNING</literal> clause was present, and
      if there were any statement-level triggers that should be fired, it
      didn't fire them.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix handling of explicit <literal>DEFAULT</literal> items in
      an <command>INSERT ... VALUES</command> command with
      multiple <literal>VALUES</literal> rows, if the target relation is
      an updatable view (Amit Langote, Dean Rasheed)
     </para>

     <para>
      When the updatable view has no default for the column but its
      underlying table has one, a single-row <command>INSERT
      ... VALUES</command> will use the underlying table's default.
      In the multi-row case, however, NULL was always used.  Correct it to
      act like the single-row case.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>CREATE VIEW</command> to allow zero-column views
      (Ashutosh Sharma)
     </para>

     <para>
      We should allow this for consistency with allowing zero-column
      tables.  Since a table can be converted to a view, zero-column views
      could be created even with the restriction in place, leading to
      dump/reload failures.
     </para>
    </listitem>

    <listitem>
     <para>
      Add missing support for <command>CREATE TABLE IF NOT EXISTS ... AS
      EXECUTE ...</command> (Andreas Karlsson)
     </para>

     <para>
      The combination of <literal>IF NOT EXISTS</literal>
      and <literal>EXECUTE</literal> should work, but the grammar omitted
      it.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that sub-<command>SELECT</command>s appearing in
      row-level-security policy expressions are executed with the correct
      user's permissions (Dean Rasheed)
     </para>

     <para>
      Previously, if the table having the RLS policy was accessed via a
      view, such checks might be executed as the user calling the view,
      not as the view owner as they should be.
     </para>
    </listitem>

    <listitem>
     <para>
      Accept XML documents as valid values of type <type>xml</type>
      when <varname>xmloption</varname> is set
      to <literal>content</literal>, as required by SQL:2006 and later
      (Chapman Flack)
     </para>

     <para>
      Previously <productname>PostgreSQL</productname> followed the
      SQL:2003 definition, which doesn't allow this.  But that creates a
      serious problem for dump/restore: there is no setting
      of <varname>xmloption</varname> that will accept all valid XML data.
      Hence, switch to the 2006 definition.
     </para>

     <para>
      <application>pg_dump</application> is also modified to emit
      <literal>SET xmloption = content</literal> while restoring data,
      ensuring that dump/restore works even if the prevailing
      setting is <literal>document</literal>.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve server's startup-time checks for whether a pre-existing
      shared memory segment is still in use (Noah Misch)
     </para>

     <para>
      The postmaster is now more likely to detect that there are still
      active processes from a previous postmaster incarnation, even if
      the <filename>postmaster.pid</filename> file has been removed.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incompatibility of GIN-index WAL records (Alexander Korotkov)
     </para>

     <para>
      A fix applied in February's minor releases was not sufficiently
      careful about backwards compatibility, leading to problems if a
      standby server of that vintage reads GIN page-deletion WAL records
      generated by a primary server of a previous minor release.
     </para>
    </listitem>

    <listitem>
     <para>
      Tolerate <literal>EINVAL</literal> and <literal>ENOSYS</literal>
      error results, where appropriate, for <function>fsync</function>
      and <function>sync_file_range</function> calls
      (Thomas Munro, James Sewell)
     </para>

     <para>
      The previous change to panic on file synchronization failures turns
      out to have been excessively paranoid for certain cases where a
      failure is predictable and essentially means <quote>operation not
      supported</quote>.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <quote>failed to build any <replaceable>N</replaceable>-way
      joins</quote> planner failures with lateral references leading out
      of <literal>FULL</literal> outer joins (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Check the appropriate user's permissions when enforcing rules about
      letting a leaky operator see <structname>pg_statistic</structname>
      data (Dean Rasheed)
     </para>

     <para>
      When an underlying table is being accessed via a view, consider the
      privileges of the view owner while deciding whether leaky operators
      may be applied to the table's statistics data, rather than the
      privileges of the user making the query.  This makes the planner's
      rules about what data is visible match up with the executor's,
      avoiding unnecessarily-poor plans.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid O(N^2) performance issue when rolling back a transaction that
      created many tables (Tomas Vondra)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix race conditions in management of dynamic shared memory
      (Thomas Munro)
     </para>
     <para>
      These could lead to <quote>dsa_area could not attach to
      segment</quote> or <quote>cannot unpin a segment that is not
      pinned</quote> errors.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix race condition in which a hot-standby postmaster could fail to
      shut down after receiving a smart-shutdown request (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible crash
      when <function>pg_identify_object_as_address()</function> is given
      invalid input (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
     <para>
      Tighten validation of encoded SCRAM-SHA-256 and MD5 passwords
      (Jonathan Katz)
     </para>

     <para>
      A password string that had the right initial characters could be
      mistaken for one that is correctly hashed into SCRAM-SHA-256 or MD5
      format.  The password would be accepted but would be unusable later.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix handling of <varname>lc_time</varname> settings that imply an
      encoding different from the database's encoding (Juan Jos&eacute;
      Santamar&iacute;a Flecha, Tom Lane)
     </para>

     <para>
      Localized month or day names that include non-ASCII characters
      previously caused unexpected errors or wrong output in such locales.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect <varname>operator_precedence_warning</varname> checks
      involving unary minus operators (Rikard Falkeborn)
     </para>
    </listitem>

    <listitem>
     <para>
      Disallow <literal>NaN</literal> as a value for floating-point server
      parameters (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Rearrange <command>REINDEX</command> processing to avoid assertion
      failures when reindexing individual indexes
      of <structname>pg_class</structname> (Andres Freund, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix planner assertion failure for parameterized dummy paths (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Insert correct test function in the result
      of <function>SnapBuildInitialSnapshot()</function> (Antonin Houska)
     </para>

     <para>
      No core code cares about this, but some extensions do.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix intermittent <quote>could not reattach to shared memory</quote>
      session startup failures on Windows (Noah Misch)
     </para>

     <para>
      A previously unrecognized source of these failures is creation of
      thread stacks for a process's default thread pool.  Arrange for such
      stacks to be allocated in a different memory region.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix error detection in directory scanning on Windows (Konstantin
      Knizhnik)
     </para>

     <para>
      Errors, such as lack of permissions to read the directory, were not
      detected or reported correctly; instead the code silently acted as
      though the directory were empty.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix grammar problems in <application>ecpg</application> (Tom Lane)
     </para>

     <para>
      A missing semicolon led to mistranslation
      of <literal>SET <replaceable>variable</replaceable> =
      DEFAULT</literal> (but
      not <literal>SET <replaceable>variable</replaceable> TO
      DEFAULT</literal>) in <application>ecpg</application> programs,
      producing syntactically invalid output that the server would reject.
      Additionally, in a <command>DROP TYPE</command> or <command>DROP
      DOMAIN</command> command that listed multiple type names, only the
      first type name was actually processed.
     </para>
    </listitem>

    <listitem>
     <para>
      Sync <application>ecpg</application>'s syntax for <command>CREATE
      TABLE AS</command> with the server's (Daisuke Higuchi)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible buffer overruns in <application>ecpg</application>'s
      processing of include filenames (Liu Huailing, Fei Wu)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid crash in <filename>contrib/vacuumlo</filename> if
      an <function>lo_unlink()</function> call failed (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Sync our copy of the timezone library with IANA tzcode release 2019a
      (Tom Lane)
     </para>

     <para>
      This corrects a small bug in <application>zic</application> that
      caused it to output an incorrect year-2440 transition in
      the <literal>Africa/Casablanca</literal> zone, and adds support
      for <application>zic</application>'s new <option>-r</option> option.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2019a for DST law changes in Palestine and Metlakatla,
      plus historical corrections for Israel.
     </para>

     <para>
      <literal>Etc/UCT</literal> is now a backward-compatibility link
      to <literal>Etc/UTC</literal>, instead of being a separate zone that
      generates the abbreviation <literal>UCT</literal>, which nowadays is
      typically a typo.  <productname>PostgreSQL</productname> will still
      accept <literal>UCT</literal> as an input zone abbreviation, but it
      won't output it.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-16">
  <title>Release 9.5.16</title>

  <formalpara>
  <title>Release date:</title>
  <para>2019-02-14</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.15.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.16</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [9ccdd7f66] 2018-11-19 17:41:26 +1300
Branch: REL_11_STABLE [6534d544c] 2018-11-19 13:37:59 +1300
Branch: REL_10_STABLE [afbe03f65] 2018-11-19 13:40:57 +1300
Branch: REL9_6_STABLE [b9cce9ddf] 2018-11-19 13:54:00 +1300
Branch: REL9_5_STABLE [312435232] 2018-11-19 14:13:22 +1300
Branch: REL9_4_STABLE [f1ff5f51d] 2018-11-19 14:26:28 +1300
-->
     <para>
      By default, panic instead of retrying
      after <function>fsync()</function> failure, to avoid possible data
      corruption (Craig Ringer, Thomas Munro)
     </para>

     <para>
      Some popular operating systems discard kernel data buffers when
      unable to write them out, reporting this
      as <function>fsync()</function> failure.  If we reissue
      the <function>fsync()</function> request it will succeed, but in
      fact the data has been lost, so continuing risks database
      corruption.  By raising a panic condition instead, we can replay
      from WAL, which may contain the only remaining copy of the data in
      such a situation.  While this is surely ugly and inefficient, there
      are few alternatives, and fortunately the case happens very rarely.
     </para>

     <para>
      A new server parameter <xref linkend="guc-data-sync-retry">
      has been added to control this; if you are certain that your
      kernel does not discard dirty data buffers in such scenarios,
      you can set <varname>data_sync_retry</varname>
      to <literal>on</literal> to restore the old behavior.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [527b5ed1a] 2019-02-04 19:18:49 -0500
Branch: REL_11_STABLE [0d13dd371] 2019-02-04 19:18:50 -0500
Branch: REL_10_STABLE [2b2427115] 2019-02-04 19:18:50 -0500
Branch: REL9_6_STABLE [60b1d6c2a] 2019-02-04 19:18:50 -0500
Branch: REL9_5_STABLE [ed64db588] 2019-02-04 19:18:50 -0500
Branch: REL9_4_STABLE [bb428cb11] 2019-02-04 19:18:50 -0500
-->
     <para>
      Include each major release branch's release notes in the
      documentation for only that branch, rather than that branch and all
      later ones (Tom Lane)
     </para>

     <para>
      The duplication induced by the previous policy was getting out of
      hand.  Our plan is to provide a full archive of release notes on
      the project's web site, but not duplicate it within each release.
     </para>
    </listitem>

    <listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [0b8bdb3c3] 2019-02-02 15:47:00 +0530
Branch: REL_11_STABLE [904413637] 2019-02-02 08:38:26 +0530
Branch: REL_10_STABLE [1ca33fc7b] 2019-02-02 08:46:32 +0530
Branch: REL9_6_STABLE [073afae81] 2019-02-02 08:54:33 +0530
Branch: REL9_5_STABLE [6a2c9c633] 2019-02-02 09:16:35 +0530
Branch: REL9_4_STABLE [fba0a8292] 2019-02-02 15:43:58 +0530
-->
     <para>
      Avoid possible deadlock when acquiring multiple buffer locks
      (Nishant Fnu)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [c6ade7a8c] 2018-12-13 06:55:34 +0300
Branch: REL_11_STABLE [225b5c9c4] 2018-12-13 06:15:23 +0300
Branch: REL_10_STABLE [865870374] 2018-12-13 06:22:41 +0300
Branch: REL9_6_STABLE [80d4d8d71] 2018-12-13 06:18:13 +0300
Branch: REL9_5_STABLE [f6c44e1b5] 2018-12-13 06:31:16 +0300
Branch: REL9_4_STABLE [19cf52e6c] 2018-12-13 06:36:54 +0300
Branch: REL9_4_STABLE [bf0e5a73b] 2018-12-13 22:32:05 +0300
-->
     <para>
      Avoid deadlock between hot-standby queries and replay of GIN index
      page deletion (Alexander Korotkov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [dfa774ff9] 2019-01-30 08:49:54 +0100
Branch: REL_11_STABLE [cf25498f7] 2019-01-30 10:06:23 +0100
Branch: REL_10_STABLE [2bac1d8c9] 2019-01-30 10:58:28 +0100
Branch: REL9_6_STABLE [650296f8f] 2019-01-30 11:02:47 +0100
Branch: REL9_5_STABLE [edd8278c5] 2019-01-30 11:16:27 +0100
Branch: REL9_4_STABLE [452253eae] 2019-01-30 11:17:05 +0100
-->
     <para>
      Fix possible crashes in logical replication when index expressions
      or predicates are in use (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [f69c959df] 2018-11-28 01:43:08 +0100
Branch: REL_11_STABLE [f8397c955] 2018-11-28 01:43:53 +0100
Branch: REL_10_STABLE [4e7395d83] 2018-11-28 01:44:11 +0100
Branch: REL9_6_STABLE [b86d148ae] 2018-11-28 01:44:31 +0100
Branch: REL9_5_STABLE [77d2815e4] 2018-11-28 01:44:43 +0100
Branch: REL9_4_STABLE [c1a5caea8] 2018-11-28 01:53:29 +0100
-->
     <para>
      Avoid useless and expensive logical decoding of TOAST data during a
      table rewrite (Tomas Vondra)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [4c703369a] 2018-11-29 09:12:19 +0900
Branch: REL_11_STABLE [bad41764a] 2018-11-29 09:12:40 +0900
Branch: REL_10_STABLE [04e381a19] 2018-11-29 09:12:45 +0900
Branch: REL9_6_STABLE [8340eba6d] 2018-11-29 09:12:53 +0900
Branch: REL9_5_STABLE [b9bdbf8c1] 2018-11-29 09:12:57 +0900
Branch: REL9_4_STABLE [b81d08d60] 2018-11-29 09:13:04 +0900
-->
     <para>
      Fix logic for stopping a subset of WAL senders when synchronous
      replication is enabled (Paul Guo, Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [eb8c9f0bc] 2019-02-01 10:35:16 +0900
Branch: REL_11_STABLE [47412e075] 2019-02-01 10:35:40 +0900
Branch: REL_10_STABLE [478e0069f] 2019-02-01 10:35:46 +0900
Branch: REL9_6_STABLE [014763e97] 2019-02-01 10:35:52 +0900
Branch: REL9_5_STABLE [90f1ba7ec] 2019-02-01 10:35:58 +0900
Branch: REL9_4_STABLE [05d24cf7c] 2019-02-01 10:36:02 +0900
-->
     <para>
      Avoid possibly writing an incorrect replica identity field in a
      tuple deletion WAL record (Stas Kelvich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b981df4cc] 2018-12-24 20:24:16 +0900
Branch: REL_11_STABLE [a016f59d5] 2018-12-24 20:25:49 +0900
Branch: REL_10_STABLE [085757577] 2018-12-24 20:25:57 +0900
Branch: REL9_6_STABLE [937870124] 2018-12-24 20:26:11 +0900
Branch: REL9_5_STABLE [37126251a] 2018-12-24 20:26:20 +0900
-->
     <para>
      Make the archiver prioritize WAL history files over WAL data files
      while choosing which file to archive next (David Steele)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0f7ec8d9c] 2018-12-12 13:49:41 -0500
Branch: REL_11_STABLE [302d4eee9] 2018-12-12 13:49:41 -0500
Branch: REL_10_STABLE [f9f63ed1f] 2018-12-12 13:49:41 -0500
Branch: REL9_6_STABLE [10bad8c0f] 2018-12-12 13:49:42 -0500
Branch: REL9_5_STABLE [6548d62a9] 2018-12-12 13:49:42 -0500
-->
     <para>
      Fix possible crash in <command>UPDATE</command> with a
      multiple <literal>SET</literal> clause using a
      sub-<literal>SELECT</literal> as source (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0edef16d7] 2019-02-08 13:30:42 -0500
Branch: REL_11_STABLE [8e2956734] 2019-02-08 13:30:57 -0500
Branch: REL_10_STABLE [0d7d71b64] 2019-02-08 13:31:04 -0500
Branch: REL9_6_STABLE [ef922faea] 2019-02-08 13:31:09 -0500
Branch: REL9_5_STABLE [7821a4d60] 2019-02-08 13:31:15 -0500
Branch: REL9_4_STABLE [37f3a7751] 2019-02-08 13:31:23 -0500
-->
     <para>
      Avoid crash if <application>libxml2</application> returns a null
      error message (Sergio Conde G&oacute;mez)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [d16d45387] 2019-01-17 06:46:10 +0000
Branch: REL_11_STABLE [e74d8c508] 2019-01-17 06:24:53 +0000
Branch: REL_10_STABLE [409230a72] 2019-01-17 06:25:55 +0000
Branch: REL9_6_STABLE [624046abe] 2019-01-17 06:26:15 +0000
Branch: REL9_5_STABLE [91448e7dc] 2019-01-17 06:29:43 +0000
Branch: REL9_4_STABLE [174fab993] 2019-01-17 06:35:31 +0000
-->
     <para>
      Fix spurious grouping-related parser errors caused by inconsistent
      handling of collation assignment (Andrew Gierth)
     </para>

     <para>
      In some cases, expressions that should be considered to match
      were not seen as matching, if they included operations on collatable
      data types.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [68a13f28b] 2019-01-02 16:34:04 -0500
Branch: REL_11_STABLE [099063340] 2019-01-02 16:33:48 -0500
Branch: REL_10_STABLE [64edc788b] 2019-01-02 16:33:48 -0500
Branch: REL9_6_STABLE [c27c3993e] 2019-01-02 16:33:48 -0500
Branch: REL9_5_STABLE [f8b9b8097] 2019-01-02 16:33:48 -0500
Branch: REL9_4_STABLE [d6b37cdb6] 2019-01-02 16:33:48 -0500
-->
     <para>
      Check whether the comparison function
      underlying <function>LEAST()</function>
      or <function>GREATEST()</function> is leakproof, rather than just
      assuming it is (Tom Lane)
     </para>

     <para>
      Actual information leaks from btree comparison functions are
      typically hard to provoke, but in principle they could happen.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [34ea1ab7f] 2019-02-07 13:11:12 -0500
Branch: REL_11_STABLE [9d6d2b213] 2019-02-07 13:11:13 -0500
Branch: REL_10_STABLE [e3101a031] 2019-02-07 13:11:14 -0500
Branch: REL9_6_STABLE [d468da0d6] 2019-02-07 13:11:16 -0500
Branch: REL9_5_STABLE [1eeee6909] 2019-02-07 13:11:17 -0500
Branch: REL9_4_STABLE [876fd37fc] 2019-02-07 13:10:46 -0500
-->
     <para>
      Fix incorrect planning of queries in which a lateral reference must
      be evaluated at a foreign table scan (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d364e8815] 2018-12-18 11:19:38 -0500
Branch: REL_11_STABLE [ad425aaf0] 2018-12-18 11:19:38 -0500
Branch: REL_10_STABLE [d16567093] 2018-12-18 11:19:39 -0500
Branch: REL9_6_STABLE [7c2bc40b8] 2018-12-18 11:19:39 -0500
Branch: REL9_5_STABLE [72a626e68] 2018-12-18 11:19:39 -0500
Branch: REL9_4_STABLE [ef673a32d] 2018-12-18 11:19:39 -0500
-->
     <para>
      Fix corner-case underestimation of the cost of a merge join (Tom Lane)
     </para>

     <para>
      The planner could prefer a merge join when the outer key range is
      much smaller than the inner key range, even if there are so many
      duplicate keys on the inner side that this is a poor choice.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e3f005d97] 2018-11-12 11:19:04 -0500
Branch: REL_11_STABLE [15b9d47c8] 2018-11-12 11:19:04 -0500
Branch: REL_10_STABLE [c6b3835c7] 2018-11-12 11:19:04 -0500
Branch: REL9_6_STABLE [fe66fc6f9] 2018-11-12 11:19:04 -0500
Branch: REL9_5_STABLE [92dbbe90c] 2018-11-12 11:19:04 -0500
Branch: REL9_4_STABLE [2abc87953] 2018-11-12 11:19:04 -0500
-->
     <para>
      Avoid O(N^2) planning time growth when a query contains many
      thousand indexable clauses (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7170268ef] 2019-01-03 17:00:08 -0500
Branch: REL_11_STABLE [fc8adddd9] 2019-01-03 17:00:08 -0500
Branch: REL_10_STABLE [708931c2d] 2019-01-03 17:00:08 -0500
Branch: REL9_6_STABLE [60de80cd2] 2019-01-03 17:00:08 -0500
Branch: REL9_5_STABLE [d2557c42a] 2019-01-03 17:00:08 -0500
Branch: REL9_4_STABLE [3010de813] 2019-01-03 17:00:08 -0500
-->
     <para>
      Improve <command>ANALYZE</command>'s handling of
      concurrently-updated rows (Jeff Janes, Tom Lane)
     </para>

     <para>
      Previously, rows deleted by an in-progress transaction were omitted
      from <command>ANALYZE</command>'s sample, but this has been found to
      lead to more inconsistency than including them would do.  In effect,
      the sample now corresponds to an MVCC snapshot as
      of <command>ANALYZE</command>'s start time.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [1e504f01d] 2018-12-27 10:16:19 +0900
Branch: REL_11_STABLE [b30b9dce1] 2018-12-27 10:17:09 +0900
Branch: REL_10_STABLE [d4486700b] 2018-12-27 10:17:13 +0900
Branch: REL9_6_STABLE [285abc8df] 2018-12-27 10:17:21 +0900
Branch: REL9_5_STABLE [0a323ae67] 2018-12-27 10:17:26 +0900
Branch: REL9_4_STABLE [1d7007671] 2018-12-27 10:17:42 +0900
-->
     <para>
      Make <command>TRUNCATE</command> ignore inheritance child tables
      that are temporary tables of other sessions (Amit Langote, Michael
      Paquier)
     </para>

     <para>
      This brings <command>TRUNCATE</command> into line with the behavior
      of other commands.  Previously, such cases usually ended in failure.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5deadfef2] 2018-12-07 12:11:59 -0500
Branch: REL_11_STABLE [aedd3d4db] 2018-12-07 12:12:00 -0500
Branch: REL_10_STABLE [54f24ab76] 2018-12-07 12:12:00 -0500
Branch: REL9_6_STABLE [078303f79] 2018-12-07 12:12:00 -0500
Branch: REL9_5_STABLE [4d5cfb911] 2018-12-07 12:12:00 -0500
-->
     <para>
      Fix <command>TRUNCATE</command> to update the statistics counters
      for the right table (Tom Lane)
     </para>

     <para>
      If the truncated table had a TOAST table, that table's counters were
      reset instead.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ebfe20dc7] 2019-01-25 21:14:49 -0500
Branch: REL_11_STABLE [c0aed6959] 2019-01-25 21:14:31 -0500
Branch: REL_10_STABLE [e8ec19cd1] 2019-01-25 21:14:31 -0500
Branch: REL9_6_STABLE [0d5b27351] 2019-01-25 21:14:31 -0500
Branch: REL9_5_STABLE [741ee4890] 2019-01-25 21:14:31 -0500
Branch: REL9_4_STABLE [549d2a238] 2019-01-25 21:14:31 -0500
-->
     <para>
      Allow <command>UNLISTEN</command> in hot-standby mode
      (Shay Rojansky)
     </para>

     <para>
      This is necessarily a no-op, because <command>LISTEN</command>
      isn't allowed in hot-standby mode; but allowing the dummy operation
      simplifies session-state-reset logic in clients.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fa2952d8e] 2018-11-09 20:42:14 -0500
Branch: REL_11_STABLE [1b55acb2c] 2018-11-09 20:42:03 -0500
Branch: REL_10_STABLE [2d83863ea] 2018-11-09 20:42:03 -0500
Branch: REL9_6_STABLE [d431dff1a] 2018-11-09 20:42:03 -0500
Branch: REL9_5_STABLE [47088c599] 2018-11-09 20:42:03 -0500
Branch: REL9_4_STABLE [277602dfe] 2018-11-09 20:42:03 -0500
-->
     <para>
      Fix missing role dependencies in some schema and data type
      permissions lists (Tom Lane)
     </para>

     <para>
      In some cases it was possible to drop a role to which permissions
      had been granted.  This caused no immediate problem, but a
      subsequent dump/reload or upgrade would fail, with symptoms
      involving attempts to grant privileges to all-numeric role names.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b13fd344c] 2018-12-17 10:34:44 +0900
Branch: REL_11_STABLE [25b8094d3] 2018-12-17 10:36:03 +0900
Branch: REL_10_STABLE [da13d90a5] 2018-12-17 10:36:21 +0900
Branch: REL9_6_STABLE [d79cd555d] 2018-12-17 10:36:29 +0900
Branch: REL9_5_STABLE [5812be7b6] 2018-12-17 10:36:34 +0900
Branch: REL9_4_STABLE [d5d86e2cd] 2018-12-17 10:37:24 +0900
Branch: master [67915fb8e] 2018-12-17 12:43:00 +0900
Branch: REL_11_STABLE [e83e0988d] 2018-12-17 12:43:39 +0900
Branch: REL_10_STABLE [91fc2a088] 2018-12-17 12:43:48 +0900
Branch: REL9_6_STABLE [419bd6371] 2018-12-17 12:43:57 +0900
Branch: REL9_5_STABLE [c7567e09d] 2018-12-17 12:44:02 +0900
Branch: REL9_4_STABLE [696c68c2b] 2018-12-17 12:44:09 +0900
-->
     <para>
      Ensure relation caches are updated properly after renaming
      constraints (Amit Langote)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: REL_10_STABLE [a6ca47cd2] 2018-12-27 16:00:39 -0300
Branch: REL9_6_STABLE [7fc2363a6] 2018-12-27 16:00:39 -0300
Branch: REL9_5_STABLE [a85045ccc] 2018-12-27 16:00:39 -0300
Branch: REL9_4_STABLE [5199abaca] 2018-12-27 16:01:36 -0300
Branch: REL_10_STABLE [3c4ca2109] 2018-12-27 16:17:40 -0300
Branch: REL9_6_STABLE [aa2e84d2c] 2018-12-27 16:17:40 -0300
Branch: REL9_5_STABLE [b7258a30a] 2018-12-27 16:17:40 -0300
Branch: REL9_4_STABLE [2602838fa] 2018-12-27 16:17:40 -0300
-->
     <para>
      Make autovacuum more aggressive about removing leftover temporary
      tables, and also remove leftover temporary tables
      during <command>DISCARD TEMP</command> (&Aacute;lvaro Herrera)
     </para>

     <para>
      This helps ensure that remnants from a crashed session are cleaned
      up more promptly.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [52ac6cd2d] 2018-12-13 06:55:34 +0300
Branch: REL_11_STABLE [dd951dc34] 2018-12-13 06:39:53 +0300
Branch: REL_10_STABLE [a0696d295] 2018-12-13 06:41:04 +0300
Branch: REL9_6_STABLE [cd24b4eae] 2018-12-13 06:47:38 +0300
Branch: REL9_5_STABLE [ad6ebcfcb] 2018-12-13 06:52:33 +0300
Branch: REL9_4_STABLE [1cf175c74] 2018-12-13 06:52:26 +0300
-->
     <para>
      Prevent empty GIN index pages from being reclaimed too quickly,
      causing failures of concurrent searches
      (Andrey Borodin, Alexander Korotkov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cbdb8b4c0] 2018-11-23 20:57:11 -0500
Branch: master [452b637d4] 2018-11-23 23:49:25 -0500
Branch: REL_11_STABLE [e473e1f2b] 2018-11-24 12:45:49 -0500
Branch: REL_10_STABLE [c382a2b66] 2018-11-24 12:45:49 -0500
Branch: REL9_6_STABLE [93eec1238] 2018-11-24 12:45:50 -0500
Branch: REL9_5_STABLE [1e78603a5] 2018-11-24 12:45:50 -0500
Branch: REL9_4_STABLE [d5231253e] 2018-11-24 12:45:50 -0500
Branch: REL_11_STABLE [3645d3193] 2018-11-24 13:53:12 -0500
Branch: REL_10_STABLE [745871483] 2018-11-24 13:53:12 -0500
Branch: REL9_6_STABLE [1f99d0867] 2018-11-24 13:53:12 -0500
Branch: REL9_5_STABLE [298510cae] 2018-11-24 13:53:12 -0500
Branch: REL9_4_STABLE [bf9fb00dd] 2018-11-24 13:53:12 -0500
-->
     <para>
      Fix edge-case failures in float-to-integer coercions (Andrew
      Gierth, Tom Lane)
     </para>

     <para>
      Values very slightly above the maximum valid integer value might not
      be rejected, and then would overflow, producing the minimum valid
      integer instead.  Also, values that should round to the minimum or
      maximum integer value might be incorrectly rejected.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3d360e20c] 2018-11-08 17:33:43 -0500
Branch: REL_11_STABLE [7b08b4a8a] 2018-11-08 17:33:44 -0500
Branch: REL_10_STABLE [c09daa910] 2018-11-08 17:33:46 -0500
Branch: REL9_6_STABLE [041ad9a66] 2018-11-08 17:33:26 -0500
Branch: REL9_5_STABLE [88275ac19] 2018-11-08 17:33:26 -0500
Branch: REL9_4_STABLE [2407d4807] 2018-11-08 17:33:26 -0500
-->
     <para>
      Disallow setting <varname>client_min_messages</varname> higher
      than <literal>ERROR</literal> (Jonah Harris, Tom Lane)
     </para>

     <para>
      Previously, it was possible to set this variable
      to <literal>FATAL</literal> or <literal>PANIC</literal>, which had
      the effect of suppressing transmission of ordinary error messages to
      the client.  However, that's contrary to guarantees that are given
      in the <productname>PostgreSQL</productname> wire protocol
      specification, and it caused some clients to become very confused.
      In released branches, fix this by silently treating such settings as
      meaning <literal>ERROR</literal> instead.  Version 12 and later will
      reject those alternatives altogether.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8eb4a9312] 2019-01-21 12:07:02 -0500
Branch: master [ee27584c4] 2019-01-21 16:17:10 -0500
Branch: REL_11_STABLE [f305e8457] 2019-01-21 23:18:58 -0500
Branch: REL_10_STABLE [6106f9dd7] 2019-01-21 23:18:58 -0500
Branch: REL9_6_STABLE [eb3e90cad] 2019-01-21 23:18:58 -0500
Branch: REL9_5_STABLE [844d91fd6] 2019-01-21 23:18:58 -0500
Branch: REL9_4_STABLE [c9ff6cbfc] 2019-01-21 23:18:58 -0500
Branch: master [2cf91ccb7] 2019-01-23 22:46:45 -0500
Branch: REL_11_STABLE [b620cf2d4] 2019-01-23 22:46:57 -0500
Branch: REL_10_STABLE [dd815a94c] 2019-01-23 22:47:03 -0500
Branch: REL9_6_STABLE [1d334ab6e] 2019-01-23 22:47:13 -0500
Branch: REL9_5_STABLE [7ac0e71aa] 2019-01-23 22:47:18 -0500
Branch: REL9_4_STABLE [773f59440] 2019-01-23 22:47:23 -0500
-->
     <para>
      Fix <application>ecpglib</application> to
      use <function>uselocale()</function>
      or <function>_configthreadlocale()</function> in preference
      to <function>setlocale()</function> (Michael Meskes, Tom Lane)
     </para>

     <para>
      Since <function>setlocale()</function> is not thread-local, and
      might not even be thread-safe, the previous coding caused problems
      in multi-threaded <application>ecpg</application> applications.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ecfd55795] 2018-11-13 15:46:08 -0500
Branch: REL_11_STABLE [68393f3fd] 2018-11-13 15:46:08 -0500
Branch: REL_10_STABLE [32060f678] 2018-11-13 15:46:08 -0500
Branch: REL9_6_STABLE [e1f259012] 2018-11-13 15:46:08 -0500
Branch: REL9_5_STABLE [be38945c6] 2018-11-13 15:46:08 -0500
Branch: REL9_4_STABLE [9e5e3861c] 2018-11-13 15:46:08 -0500
Branch: master [06c723447] 2018-11-14 11:27:47 -0500
Branch: REL_11_STABLE [4618fdd67] 2018-11-14 11:27:30 -0500
Branch: REL_10_STABLE [2e8ed4659] 2018-11-14 11:27:30 -0500
Branch: REL9_6_STABLE [f9e25ba14] 2018-11-14 11:27:31 -0500
Branch: REL9_5_STABLE [68f30638a] 2018-11-14 11:27:31 -0500
Branch: REL9_4_STABLE [41609776f] 2018-11-14 11:27:31 -0500
-->
     <para>
      Fix incorrect results for numeric data passed through
      an <application>ecpg</application> <acronym>SQLDA</acronym>
      (SQL Descriptor Area) (Daisuke Higuchi)
     </para>

     <para>
      Values with leading zeroes were not copied correctly.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6d3ede5f1] 2019-01-26 14:15:42 -0500
Branch: REL_11_STABLE [2c50c9f23] 2019-01-26 14:15:42 -0500
Branch: REL_10_STABLE [8e97a97b3] 2019-01-26 14:15:42 -0500
Branch: REL9_6_STABLE [ae4c7d5ab] 2019-01-26 14:15:42 -0500
Branch: REL9_5_STABLE [cda1e27fb] 2019-01-26 14:15:42 -0500
-->
     <para>
      Fix <application>psql</application>'s <command>\g</command>
      <replaceable>target</replaceable> meta-command to work
      with <command>COPY TO STDOUT</command>
      (Daniel V&eacute;rit&eacute;)
     </para>

     <para>
      Previously, the <replaceable>target</replaceable> option was
      ignored, so that the copy data always went to the current query
      output target.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [70d7e507e] 2018-11-26 17:32:51 -0500
Branch: REL_11_STABLE [b352cf7a8] 2018-11-26 17:32:51 -0500
Branch: REL_10_STABLE [815409093] 2018-11-26 17:32:51 -0500
Branch: REL9_6_STABLE [ac305ff8c] 2018-11-26 17:32:51 -0500
Branch: REL9_5_STABLE [18a0a8548] 2018-11-26 17:32:51 -0500
Branch: REL9_4_STABLE [74bfb5388] 2018-11-26 17:32:51 -0500
-->
     <para>
      Make <application>psql</application>'s LaTeX output formats render
      special characters properly (Tom Lane)
     </para>

     <para>
      Backslash and some other ASCII punctuation characters were not
      rendered correctly, leading to document syntax errors or wrong
      characters in the output.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6e4d45b5f] 2019-02-04 17:20:02 -0500
Branch: REL_11_STABLE [b8de846a5] 2019-02-04 17:20:02 -0500
Branch: REL_10_STABLE [dc42602f1] 2019-02-04 17:20:02 -0500
Branch: REL9_6_STABLE [16e0464a1] 2019-02-04 17:20:02 -0500
Branch: REL9_5_STABLE [9368ba174] 2019-02-04 17:20:02 -0500
Branch: REL9_4_STABLE [2f93b74bf] 2019-02-04 17:20:02 -0500
-->
     <para>
      Fix <application>pg_dump</application>'s handling of materialized
      views with indirect dependencies on primary keys (Tom Lane)
     </para>

     <para>
      This led to mis-labeling of such views' dump archive entries,
      causing harmless warnings about <quote>archive items not in correct
      section order</quote>; less harmlessly, selective-restore options
      depending on those labels, such as <option>--section</option>, might
      misbehave.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4dbe19690] 2019-02-09 19:45:38 -0500
Branch: REL_11_STABLE [ef9bf3593] 2019-02-09 19:45:38 -0500
Branch: REL_10_STABLE [73668c590] 2019-02-09 19:45:38 -0500
Branch: REL9_6_STABLE [2b6009e2a] 2019-02-09 19:45:38 -0500
Branch: REL9_5_STABLE [2c8332177] 2019-02-09 19:45:38 -0500
Branch: REL9_4_STABLE [ed46d0d32] 2019-02-09 19:45:38 -0500
-->
     <para>
      Avoid null-pointer-dereference crash on some platforms
      when <application>pg_dump</application>
      or <application>pg_restore</application> tries to report an error
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [d5890f49d] 2018-11-24 09:59:49 +0000
Branch: REL_11_STABLE [02e669c0f] 2018-11-24 21:17:08 +0000
Branch: REL_10_STABLE [bcbb68278] 2018-11-24 21:17:09 +0000
Branch: REL9_6_STABLE [239abfff1] 2018-11-24 21:17:09 +0000
Branch: REL9_5_STABLE [8087788f6] 2018-11-24 21:17:09 +0000
Branch: REL9_4_STABLE [e5a6ae97e] 2018-11-24 21:17:09 +0000
-->
     <para>
      Fix <filename>contrib/hstore</filename> to calculate correct hash
      values for empty <type>hstore</type> values that were created in
      version 8.4 or before (Andrew Gierth)
     </para>

     <para>
      The previous coding did not give the same result as for an
      empty <type>hstore</type> value created by a newer version, thus
      potentially causing wrong results in hash joins or hash
      aggregation.  It is advisable to reindex any hash indexes
      built on <type>hstore</type> columns, if the table might contain
      data that was originally stored as far back as 8.4 and was never
      dumped/reloaded since then.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [757c5182f] 2018-11-24 08:48:36 +0000
Branch: REL_11_STABLE [2e497ed23] 2018-11-24 08:39:29 +0000
Branch: REL_10_STABLE [e193fb991] 2018-11-24 08:39:42 +0000
Branch: REL9_6_STABLE [5f11a500f] 2018-11-24 08:39:55 +0000
Branch: REL9_5_STABLE [f0bfc7a2b] 2018-11-24 08:39:58 +0000
Branch: REL9_4_STABLE [2f30b311d] 2018-11-24 08:40:02 +0000
-->
     <para>
      Avoid crashes and excessive runtime with large inputs
      to <filename>contrib/intarray</filename>'s <literal>gist__int_ops</literal>
      index support (Andrew Gierth)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [100535bba] 2018-11-19 14:24:51 -0500
Branch: REL9_4_STABLE [7c86b9431] 2018-11-19 14:24:52 -0500
-->
     <para>
      Adjust <application>configure</application>'s selection of
      threading-related compiler flags and libraries to match what
      later <productname>PostgreSQL</productname> releases do (Tom Lane)
     </para>

     <para>
      The coding previously used in the 9.4 and 9.5 branches fails
      outright on some newer platforms, so sync it with what 9.6 and later
      have been doing.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [ac3a9afdb] 2019-02-03 17:48:09 +0900
Branch: REL_11_STABLE [946430da6] 2019-02-03 17:48:35 +0900
Branch: REL_10_STABLE [da14c9b19] 2019-02-03 17:48:46 +0900
Branch: REL9_6_STABLE [5e63df827] 2019-02-03 17:48:53 +0900
Branch: REL9_5_STABLE [12ff406f3] 2019-02-03 17:48:59 +0900
Branch: REL9_4_STABLE [42b204db2] 2019-02-03 17:49:04 +0900
-->
     <para>
      Support new Makefile
      variables <literal>PG_CFLAGS</literal>, <literal>PG_CXXFLAGS</literal>,
      and <literal>PG_LDFLAGS</literal> in <application>pgxs</application>
      builds (Christoph Berg)
     </para>

     <para>
      This simplifies customization of extension build processes.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [f83419b73] 2019-02-05 19:27:47 -0500
Branch: REL_11_STABLE [77173d0cc] 2019-02-05 19:33:42 -0500
Branch: REL_10_STABLE [1a6244216] 2019-02-05 19:34:00 -0500
Branch: REL9_6_STABLE [42345284c] 2019-02-05 19:34:17 -0500
Branch: REL9_5_STABLE [59927f99a] 2019-02-05 19:35:07 -0500
Branch: REL9_4_STABLE [2689e8e33] 2019-02-05 19:35:18 -0500
Branch: master [592123efb] 2019-02-06 07:36:02 -0500
Branch: REL_11_STABLE [11f11e1e0] 2019-02-06 07:49:07 -0500
Branch: REL_10_STABLE [1f28906bf] 2019-02-06 07:49:27 -0500
Branch: REL9_6_STABLE [324c92646] 2019-02-06 07:53:19 -0500
Branch: REL9_5_STABLE [8d2741452] 2019-02-06 07:55:10 -0500
Branch: REL9_4_STABLE [13e95662c] 2019-02-06 07:55:22 -0500
Branch: REL9_6_STABLE [772d4b769] 2019-02-05 18:31:10 -0500
Branch: REL9_5_STABLE [a25b04933] 2019-02-05 18:34:47 -0500
Branch: REL9_4_STABLE [7a3763318] 2019-02-05 18:34:58 -0500
Branch: master [f884a9681] 2019-02-05 09:59:46 -0500
Branch: REL_11_STABLE [4e7a51302] 2019-02-05 10:04:38 -0500
Branch: REL_10_STABLE [1fbb9bda0] 2019-02-05 10:04:58 -0500
Branch: REL9_6_STABLE [be037c11b] 2019-02-05 10:05:17 -0500
Branch: REL9_5_STABLE [a82ca6ffb] 2019-02-05 10:05:57 -0500
Branch: REL9_4_STABLE [51884fa16] 2019-02-05 10:06:12 -0500
-->
     <para>
      Fix Perl-coded build scripts to not
      assume <quote><literal>.</literal></quote> is in the search path,
      since recent Perl versions don't include that (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [69bcd718d] 2019-01-18 15:06:26 -0500
Branch: REL_11_STABLE [e4ffa0dcb] 2019-01-18 15:06:26 -0500
Branch: REL_10_STABLE [139e42742] 2019-01-18 15:06:26 -0500
Branch: REL9_6_STABLE [167ba6b15] 2019-01-18 15:06:26 -0500
Branch: REL9_5_STABLE [dc2dee438] 2019-01-18 15:06:26 -0500
Branch: REL9_4_STABLE [b161ffe31] 2019-01-18 15:06:26 -0500
-->
     <para>
      Fix server command-line option parsing problems on OpenBSD (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d63dc0aa0] 2019-02-05 10:58:53 -0500
Branch: REL_11_STABLE [46b454096] 2019-02-05 10:59:06 -0500
Branch: REL_10_STABLE [09c5f045c] 2019-02-05 10:59:15 -0500
Branch: REL9_6_STABLE [f6db9f8ab] 2019-02-05 10:59:23 -0500
Branch: REL9_5_STABLE [4232a650b] 2019-02-05 10:59:31 -0500
Branch: REL9_4_STABLE [a683df403] 2019-02-05 10:59:38 -0500
-->
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2018i for DST law changes in Kazakhstan, Metlakatla, and Sao
      Tome and Principe.  Kazakhstan's Qyzylorda zone is split in two,
      creating a new zone Asia/Qostanay, as some areas did not change UTC
      offset.  Historical corrections for Hong Kong and numerous Pacific
      islands.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-15">
  <title>Release 9.5.15</title>

  <formalpara>
  <title>Release date:</title>
  <para>2018-11-08</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.14.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.15</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Fix corner-case failures
      in <function>has_<replaceable>foo</replaceable>_privilege()</function>
      family of functions (Tom Lane)
     </para>

     <para>
      Return NULL rather than throwing an error when an invalid object OID
      is provided.  Some of these functions got that right already, but not
      all.  <function>has_column_privilege()</function> was additionally
      capable of crashing on some platforms.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid O(N^2) slowdown in regular expression match/split functions on
      long strings (Andrew Gierth)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix parsing of standard multi-character operators that are immediately
      followed by a comment or <literal>+</literal> or <literal>-</literal>
      (Andrew Gierth)
     </para>

     <para>
      This oversight could lead to parse errors, or to incorrect assignment
      of precedence.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid O(N^3) slowdown in lexer for long strings
      of <literal>+</literal> or <literal>-</literal> characters
      (Andrew Gierth)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix mis-execution of SubPlans when the outer query is being scanned
      backwards (Andrew Gierth)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix failure of <command>UPDATE/DELETE ... WHERE CURRENT OF ...</command>
      after rewinding the referenced cursor (Tom Lane)
     </para>

     <para>
      A cursor that scans multiple relations (particularly an inheritance
      tree) could produce wrong behavior if rewound to an earlier relation.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>EvalPlanQual</function> to handle conditionally-executed
      InitPlans properly (Andrew Gierth, Tom Lane)
     </para>

     <para>
      This resulted in hard-to-reproduce crashes or wrong answers in
      concurrent updates, if they contained code such as an uncorrelated
      sub-<literal>SELECT</literal> inside a <literal>CASE</literal>
      construct.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix character-class checks to not fail on Windows for Unicode
      characters above U+FFFF (Tom Lane, Kenji Uno)
     </para>

     <para>
      This bug affected full-text-search operations, as well
      as <filename>contrib/ltree</filename>
      and <filename>contrib/pg_trgm</filename>.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that sequences owned by a foreign table are processed
      by <literal>ALTER OWNER</literal> on the table (Peter Eisentraut)
     </para>

     <para>
      The ownership change should propagate to such sequences as well, but
      this was missed for foreign tables.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that the server will process
      already-received <literal>NOTIFY</literal>
      and <literal>SIGTERM</literal> interrupts before waiting for client
      input (Jeff Janes, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix over-allocation of space for <function>array_out()</function>'s
      result string (Keiichi Hirobe)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix memory leak in repeated SP-GiST index scans (Tom Lane)
     </para>

     <para>
      This is only known to amount to anything significant in cases where
      an exclusion constraint using SP-GiST receives many new index entries
      in a single command.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that <function>ApplyLogicalMappingFile()</function> closes the
      mapping file when done with it (Tomas Vondra)
     </para>

     <para>
      Previously, the file descriptor was leaked, eventually resulting in
      failures during logical decoding.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix logical decoding to handle cases where a mapped catalog table is
      repeatedly rewritten, e.g., by <literal>VACUUM FULL</literal>
      (Andres Freund)
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent starting the server with <varname>wal_level</varname> set
      to too low a value to support an existing replication slot (Andres
      Freund)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid crash if a utility command causes infinite recursion (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      When initializing a hot standby, cope with duplicate XIDs caused by
      two-phase transactions on the master
      (Michael Paquier, Konstantin Knizhnik)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix event triggers to handle nested <command>ALTER TABLE</command>
      commands (Michael Paquier, &Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
     <para>
      Propagate parent process's transaction and statement start timestamps
      to parallel workers (Konstantin Knizhnik)
     </para>

     <para>
      This prevents misbehavior of functions such
      as <function>transaction_timestamp()</function> when executed in a
      worker.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix WAL file recycling logic to work correctly on standby servers
      (Michael Paquier)
     </para>

     <para>
      Depending on the setting of <varname>archive_mode</varname>, a standby
      might fail to remove some WAL files that could be removed.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix handling of commit-timestamp tracking during recovery
      (Masahiko Sawada, Michael Paquier)
     </para>

     <para>
      If commit timestamp tracking has been turned on or off, recovery might
      fail due to trying to fetch the commit timestamp for a transaction
      that did not record it.
     </para>
    </listitem>

    <listitem>
     <para>
      Randomize the <function>random()</function> seed in bootstrap and
      standalone backends, and in <application>initdb</application>
      (Noah Misch)
     </para>

     <para>
      The main practical effect of this change is that it avoids a scenario
      where <application>initdb</application> might mistakenly conclude that
      POSIX shared memory is not available, due to name collisions caused by
      always using the same random seed.
     </para>
    </listitem>

    <listitem>
     <para>
      Allow DSM allocation to be interrupted (Chris Travers)
     </para>
    </listitem>

    <listitem>
     <para>
      Properly handle turning <varname>full_page_writes</varname> on
      dynamically (Kyotaro Horiguchi)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid possible buffer overrun when replaying GIN page recompression
      from WAL (Alexander Korotkov, Sivasubramanian Ramasubramanian)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix missed fsync of a replication slot's directory (Konstantin
      Knizhnik, Michael Paquier)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix unexpected timeouts when
      using <varname>wal_sender_timeout</varname> on a slow server
      (Noah Misch)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that hot standby processes use the correct WAL consistency
      point (Alexander Kukushkin, Michael Paquier)
     </para>

     <para>
      This prevents possible misbehavior just after a standby server has
      reached a consistent database state during WAL replay.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure background workers are stopped properly when the postmaster
      receives a fast-shutdown request before completing database startup
      (Alexander Kukushkin)
     </para>
    </listitem>

    <listitem>
     <para>
      Don't run atexit callbacks when servicing <literal>SIGQUIT</literal>
      (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
     <para>
      Don't record foreign-server user mappings as members of extensions
      (Tom Lane)
     </para>

     <para>
      If <command>CREATE USER MAPPING</command> is executed in an extension
      script, an extension dependency was created for the user mapping,
      which is unexpected.  Roles can't be extension members, so user
      mappings shouldn't be either.
     </para>
    </listitem>

    <listitem>
     <para>
      Make syslogger more robust against failures in opening CSV log files
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>psql</application>, as well as documentation
      examples, to call <function>PQconsumeInput()</function> before
      each <function>PQnotifies()</function> call (Tom Lane)
     </para>

     <para>
      This fixes cases in which <application>psql</application> would not
      report receipt of a <literal>NOTIFY</literal> message until after the
      next command.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible inconsistency in <application>pg_dump</application>'s
      sorting of dissimilar object names (Jacob Champion)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that <application>pg_restore</application> will schema-qualify
      the table name when
      emitting <literal>DISABLE</literal>/<literal>ENABLE TRIGGER</literal>
      commands (Tom Lane)
     </para>

     <para>
      This avoids failures due to the new policy of running restores with
      restrictive search path.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_upgrade</application> to handle event triggers in
      extensions correctly (Haribabu Kommi)
     </para>

     <para>
      <application>pg_upgrade</application> failed to preserve an event
      trigger's extension-membership status.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_upgrade</application>'s cluster state check to
      work correctly on a standby server (Bruce Momjian)
     </para>
    </listitem>

    <listitem>
     <para>
      Enforce type <type>cube</type>'s dimension limit in
      all <filename>contrib/cube</filename> functions (Andrey Borodin)
     </para>

     <para>
      Previously, some cube-related functions could construct values that
      would be rejected by <function>cube_in()</function>, leading to
      dump/reload failures.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <filename>contrib/unaccent</filename>'s
      <function>unaccent()</function> function to use
      the <literal>unaccent</literal> text search dictionary that is in the
      same schema as the function (Tom Lane)
     </para>

     <para>
      Previously it tried to look up the dictionary using the search path,
      which could fail if the search path has a restrictive value.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix build problems on macOS 10.14 (Mojave) (Tom Lane)
     </para>

     <para>
      Adjust <application>configure</application> to add
      an <option>-isysroot</option> switch to <varname>CPPFLAGS</varname>;
      without this, PL/Perl and PL/Tcl fail to configure or build on macOS
      10.14.  The specific sysroot used can be overridden at configure time
      or build time by setting the <varname>PG_SYSROOT</varname> variable in
      the arguments of <application>configure</application>
      or <application>make</application>.
     </para>

     <para>
      It is now recommended that Perl-related extensions
      write <literal>$(perl_includespec)</literal> rather
      than <literal>-I$(perl_archlibexp)/CORE</literal> in their compiler
      flags.  The latter continues to work on most platforms, but not recent
      macOS.
     </para>

     <para>
      Also, it should no longer be necessary to
      specify <option>--with-tclconfig</option> manually to get PL/Tcl to
      build on recent macOS releases.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix MSVC build and regression-test scripts to work on recent Perl
      versions (Andrew Dunstan)
     </para>

     <para>
      Perl no longer includes the current directory in its search path
      by default; work around that.
     </para>
    </listitem>

    <listitem>
     <para>
      On Windows, allow the regression tests to be run by an Administrator
      account (Andrew Dunstan)
     </para>

     <para>
      To do this safely, <application>pg_regress</application> now gives up
      any such privileges at startup.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: REL9_5_STABLE [f6c268c48] 2018-09-11 16:09:46 -0400
Branch: REL9_4_STABLE [19acfd652] 2018-09-11 16:03:42 -0400
Branch: REL9_3_STABLE [48c978f3e] 2018-09-11 16:05:20 -0400
Branch: REL9_4_STABLE [9ca32a6eb] 2018-09-11 15:44:42 -0400
Branch: REL9_3_STABLE [048257832] 2018-09-11 15:46:35 -0400
Branch: REL9_4_STABLE [86e247583] 2018-09-12 12:24:11 -0400
Branch: REL9_3_STABLE [520711d6e] 2018-09-12 12:25:57 -0400
-->
     <para>
      Support building on Windows with Visual Studio 2015 or Visual Studio 2017
      (Michael Paquier, Haribabu Kommi)
     </para>
    </listitem>

    <listitem>
     <para>
      Allow btree comparison functions to return <literal>INT_MIN</literal>
      (Tom Lane)
     </para>

     <para>
      Up to now, we've forbidden datatype-specific comparison functions from
      returning <literal>INT_MIN</literal>, which allows callers to invert
      the sort order just by negating the comparison result.  However, this
      was never safe for comparison functions that directly return the
      result of <function>memcmp()</function>, <function>strcmp()</function>,
      etc, as POSIX doesn't place any such restriction on those functions.
      At least some recent versions of <function>memcmp()</function> can
      return <literal>INT_MIN</literal>, causing incorrect sort ordering.
      Hence, we've removed this restriction.  Callers must now use
      the <literal>INVERT_COMPARE_RESULT()</literal> macro if they wish to
      invert the sort order.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix recursion hazard in shared-invalidation message processing
      (Tom Lane)
     </para>

     <para>
      This error could, for example, result in failure to access a system
      catalog or index that had just been processed by <command>VACUUM
      FULL</command>.
     </para>

     <para>
      This change adds a new result code
      for <function>LockAcquire</function>, which might possibly affect
      external callers of that function, though only very unusual usage
      patterns would have an issue with it.  The API
      of <function>LockAcquireExtended</function> is also changed.
     </para>
    </listitem>

    <listitem>
     <para>
      Save and restore SPI's global variables
      during <function>SPI_connect()</function>
      and <function>SPI_finish()</function> (Chapman Flack, Tom Lane)
     </para>

     <para>
      This prevents possible interference when one SPI-using function calls
      another.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [1245561df] 2018-10-12 14:49:33 -0400
Branch: REL9_4_STABLE [ec185747a] 2018-10-12 14:49:33 -0400
Branch: REL9_3_STABLE [01187f32c] 2018-10-12 14:49:33 -0400
-->
     <para>
      Provide <literal>ALLOCSET_DEFAULT_SIZES</literal> and sibling macros
      in back branches (Tom Lane)
     </para>

     <para>
      These macros have existed since 9.6, but there were requests to add
      them to older branches to allow extensions to rely on them without
      branch-specific coding.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid using potentially-under-aligned page buffers (Tom Lane)
     </para>

     <para>
      Invent new union types <type>PGAlignedBlock</type>
      and <type>PGAlignedXLogBlock</type>, and use these in place of plain
      char arrays, ensuring that the compiler can't place the buffer at a
      misaligned start address.  This fixes potential core dumps on
      alignment-picky platforms, and may improve performance even on
      platforms that allow misalignment.
     </para>
    </listitem>

    <listitem>
     <para>
      Make <filename>src/port/snprintf.c</filename> follow the C99
      standard's definition of <function>snprintf()</function>'s result
      value (Tom Lane)
     </para>

     <para>
      On platforms where this code is used (mostly Windows), its pre-C99
      behavior could lead to failure to detect buffer overrun, if the
      calling code assumed C99 semantics.
     </para>
    </listitem>

    <listitem>
     <para>
      When building on i386 with the <application>clang</application>
      compiler, require <option>-msse2</option> to be used (Andres Freund)
     </para>

     <para>
      This avoids problems with missed floating point overflow checks.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>configure</application>'s detection of the result
      type of <function>strerror_r()</function> (Tom Lane)
     </para>

     <para>
      The previous coding got the wrong answer when building
      with <application>icc</application> on Linux (and perhaps in other
      cases), leading to <application>libpq</application> not returning
      useful error messages for system-reported errors.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2018g for DST law changes in Chile, Fiji, Morocco, and Russia
      (Volgograd), plus historical corrections for China, Hawaii, Japan,
      Macau, and North Korea.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-14">
  <title>Release 9.5.14</title>

  <formalpara>
  <title>Release date:</title>
  <para>2018-08-09</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.13.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.14</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.13,
    see <xref linkend="release-9-5-13">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Fix failure to reset <application>libpq</application>'s state fully
      between connection attempts (Tom Lane)
     </para>

     <para>
      An unprivileged user of <filename>dblink</filename>
      or <filename>postgres_fdw</filename> could bypass the checks intended
      to prevent use of server-side credentials, such as
      a <filename>~/.pgpass</filename> file owned by the operating-system
      user running the server.  Servers allowing peer authentication on
      local connections are particularly vulnerable.  Other attacks such
      as SQL injection into a <filename>postgres_fdw</filename> session
      are also possible.
      Attacking <filename>postgres_fdw</filename> in this way requires the
      ability to create a foreign server object with selected connection
      parameters, but any user with access to <filename>dblink</filename>
      could exploit the problem.
      In general, an attacker with the ability to select the connection
      parameters for a <application>libpq</application>-using application
      could cause mischief, though other plausible attack scenarios are
      harder to think of.
      Our thanks to Andrew Krasichkov for reporting this issue.
      (CVE-2018-10915)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <literal>INSERT ... ON CONFLICT UPDATE</literal> through a view
      that isn't just <literal>SELECT * FROM ...</literal>
      (Dean Rasheed, Amit Langote)
     </para>

     <para>
      Erroneous expansion of an updatable view could lead to crashes
      or <quote>attribute ... has the wrong type</quote> errors, if the
      view's <literal>SELECT</literal> list doesn't match one-to-one with
      the underlying table's columns.
      Furthermore, this bug could be leveraged to allow updates of columns
      that an attacking user lacks <literal>UPDATE</literal> privilege for,
      if that user has <literal>INSERT</literal> and <literal>UPDATE</literal>
      privileges for some other column(s) of the table.
      Any user could also use it for disclosure of server memory.
      (CVE-2018-10925)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that updates to the <structfield>relfrozenxid</structfield>
      and <structfield>relminmxid</structfield> values
      for <quote>nailed</quote> system catalogs are processed in a timely
      fashion (Andres Freund)
     </para>

     <para>
      Overoptimistic caching rules could prevent these updates from being
      seen by other sessions, leading to spurious errors and/or data
      corruption.  The problem was significantly worse for shared catalogs,
      such as <structname>pg_authid</structname>, because the stale cache
      data could persist into new sessions as well as existing ones.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix case where a freshly-promoted standby crashes before having
      completed its first post-recovery checkpoint (Michael Paquier, Kyotaro
      Horiguchi, Pavan Deolasee, &Aacute;lvaro Herrera)
     </para>

     <para>
      This led to a situation where the server did not think it had reached
      a consistent database state during subsequent WAL replay, preventing
      restart.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid emitting a bogus WAL record when recycling an all-zero btree
      page (Amit Kapila)
     </para>

     <para>
      This mistake has been seen to cause assertion failures, and
      potentially it could result in unnecessary query cancellations on hot
      standby servers.
     </para>
    </listitem>

    <listitem>
     <para>
      During WAL replay, guard against corrupted record lengths exceeding
      1GB (Michael Paquier)
     </para>

     <para>
      Treat such a case as corrupt data.  Previously, the code would try to
      allocate space and get a hard error, making recovery impossible.
     </para>
    </listitem>

    <listitem>
     <para>
      When ending recovery, delay writing the timeline history file as long
      as possible (Heikki Linnakangas)
     </para>

     <para>
      This avoids some situations where a failure during recovery cleanup
      (such as a problem with a two-phase state file) led to inconsistent
      timeline state on-disk.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve performance of WAL replay for transactions that drop many
      relations (Fujii Masao)
     </para>

     <para>
      This change reduces the number of times that shared buffers are
      scanned, so that it is of most benefit when that setting is large.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve performance of lock releasing in standby server WAL replay
      (Thomas Munro)
     </para>
    </listitem>

    <listitem>
     <para>
      Make logical WAL senders report streaming state correctly (Simon
      Riggs, Sawada Masahiko)
     </para>

     <para>
      The code previously mis-detected whether or not it had caught up with
      the upstream server.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix bugs in snapshot handling during logical decoding, allowing wrong
      decoding results in rare cases (Arseny Sher, &Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure a table's cached index list is correctly rebuilt after an index
      creation fails partway through (Peter Geoghegan)
     </para>

     <para>
      Previously, the failed index's OID could remain in the list, causing
      problems later in the same session.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix mishandling of empty uncompressed posting list pages in GIN
      indexes (Sivasubramanian Ramasubramanian, Alexander Korotkov)
     </para>

     <para>
      This could result in an assertion failure after pg_upgrade of a
      pre-9.4 GIN index (9.4 and later will not create such pages).
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that <command>VACUUM</command> will respond to signals
      within btree page deletion loops (Andres Freund)
     </para>

     <para>
      Corrupted btree indexes could result in an infinite loop here, and
      that previously wasn't interruptible without forcing a crash.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix misoptimization of equivalence classes involving composite-type
      columns (Tom Lane)
     </para>

     <para>
      This resulted in failure to recognize that an index on a composite
      column could provide the sort order needed for a mergejoin on that
      column.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix SQL-standard <literal>FETCH FIRST</literal> syntax to allow
      parameters (<literal>$<replaceable>n</replaceable></literal>), as the
      standard expects (Andrew Gierth)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix failure to schema-qualify some object names
      in <function>getObjectDescription</function> output
      (Kyotaro Horiguchi, Tom Lane)
     </para>

     <para>
      Names of collations, conversions, and text search objects
      were not schema-qualified when they should be.
     </para>
    </listitem>

    <listitem>
     <para>
      Widen <command>COPY FROM</command>'s current-line-number counter
      from 32 to 64 bits (David Rowley)
     </para>

     <para>
      This avoids two problems with input exceeding 4G lines: <literal>COPY
      FROM WITH HEADER</literal> would drop a line every 4G lines, not only
      the first line, and error reports could show a wrong line number.
     </para>
    </listitem>

    <listitem>
     <para>
      Add a string freeing function
      to <application>ecpg</application>'s <filename>pgtypes</filename>
      library, so that cross-module memory management problems can be
      avoided on Windows (Takayuki Tsunakawa)
     </para>

     <para>
      On Windows, crashes can ensue if the <function>free</function> call
      for a given chunk of memory is not made from the same DLL
      that <function>malloc</function>'ed the memory.
      The <filename>pgtypes</filename> library sometimes returns strings
      that it expects the caller to free, making it impossible to follow
      this rule.  Add a <function>PGTYPESchar_free()</function> function
      that just wraps <function>free</function>, allowing applications
      to follow this rule.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>ecpg</application>'s support for <type>long
      long</type> variables on Windows, as well as other platforms that
      declare <function>strtoll</function>/<function>strtoull</function>
      nonstandardly or not at all (Dang Minh Huong, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix misidentification of SQL statement type in PL/pgSQL, when a rule
      change causes a change in the semantics of a statement intra-session
      (Tom Lane)
     </para>

     <para>
      This error led to assertion failures, or in rare cases, failure to
      enforce the <literal>INTO STRICT</literal> option as expected.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix password prompting in client programs so that echo is properly
      disabled on Windows when <literal>stdin</literal> is not the
      terminal (Matthew Stickney)
     </para>
    </listitem>

    <listitem>
     <para>
      Further fix mis-quoting of values for list-valued GUC variables in
      dumps (Tom Lane)
     </para>

     <para>
      The previous fix for quoting of <varname>search_path</varname> and
      other list-valued variables in <application>pg_dump</application>
      output turned out to misbehave for empty-string list elements, and it
      risked truncation of long file paths.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</application>'s failure to
      dump <literal>REPLICA IDENTITY</literal> properties for constraint
      indexes (Tom Lane)
     </para>

     <para>
      Manually created unique indexes were properly marked, but not those
      created by declaring <literal>UNIQUE</literal> or <literal>PRIMARY
      KEY</literal> constraints.
     </para>
    </listitem>

    <listitem>
     <para>
      Make <application>pg_upgrade</application> check that the old server
      was shut down cleanly (Bruce Momjian)
     </para>

     <para>
      The previous check could be fooled by an immediate-mode shutdown.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <filename>contrib/hstore_plperl</filename> to look through Perl
      scalar references, and to not crash if it doesn't find a hash
      reference where it expects one (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix crash in <filename>contrib/ltree</filename>'s
      <function>lca()</function> function when the input array is empty
      (Pierre Ducroquet)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix various error-handling code paths in which an incorrect error code
      might be reported (Michael Paquier, Tom Lane, Magnus Hagander)
     </para>
    </listitem>

    <listitem>
     <para>
      Rearrange makefiles to ensure that programs link to freshly-built
      libraries (such as <filename>libpq.so</filename>) rather than ones
      that might exist in the system library directories (Tom Lane)
     </para>

     <para>
      This avoids problems when building on platforms that supply old copies
      of <productname>PostgreSQL</productname> libraries.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2018e for DST law changes in North Korea, plus historical
      corrections for Czechoslovakia.
     </para>

     <para>
      This update includes a redefinition of <quote>daylight savings</quote>
      in Ireland, as well as for some past years in Namibia and
      Czechoslovakia.  In those jurisdictions, legally standard time is
      observed in summer, and daylight savings time in winter, so that the
      daylight savings offset is one hour behind standard time not one hour
      ahead.  This does not affect either the actual UTC offset or the
      timezone abbreviations in use; the only known effect is that
      the <structfield>is_dst</structfield> column in
      the <structname>pg_timezone_names</structname> view will now be true
      in winter and false in summer in these cases.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-13">
  <title>Release 9.5.13</title>

  <formalpara>
  <title>Release date:</title>
  <para>2018-05-10</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.12.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.13</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if the function marking mistakes mentioned in the first
    changelog entry below affect you, you will want to take steps to
    correct your database catalogs.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.12,
    see <xref linkend="release-9-5-12">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Fix incorrect volatility markings on a few built-in functions
      (Thomas Munro, Tom Lane)
     </para>

     <para>
      The functions
      <function>query_to_xml</function>,
      <function>cursor_to_xml</function>,
      <function>cursor_to_xmlschema</function>,
      <function>query_to_xmlschema</function>, and
      <function>query_to_xml_and_xmlschema</function>
      should be marked volatile because they execute user-supplied queries
      that might contain volatile operations.  They were not, leading to a
      risk of incorrect query optimization.  This has been repaired for new
      installations by correcting the initial catalog data, but existing
      installations will continue to contain the incorrect markings.
      Practical use of these functions seems to pose little hazard, but in
      case of trouble, it can be fixed by manually updating these
      functions' <structname>pg_proc</structname> entries, for example
      <literal>ALTER FUNCTION pg_catalog.query_to_xml(text, boolean,
      boolean, text) VOLATILE</literal>.  (Note that that will need to be
      done in each database of the installation.)  Another option is
      to <application>pg_upgrade</application> the database to a version
      containing the corrected initial data.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid re-using TOAST value OIDs that match dead-but-not-yet-vacuumed
      TOAST entries (Pavan Deolasee)
     </para>

     <para>
      Once the OID counter has wrapped around, it's possible to assign a
      TOAST value whose OID matches a previously deleted entry in the same
      TOAST table.  If that entry were not yet vacuumed away, this resulted
      in <quote>unexpected chunk number 0 (expected 1) for toast
      value <replaceable>nnnnn</replaceable></quote> errors, which would
      persist until the dead entry was removed
      by <command>VACUUM</command>.  Fix by not selecting such OIDs when
      creating a new TOAST entry.
     </para>
    </listitem>

    <listitem>
     <para>
      Change <command>ANALYZE</command>'s algorithm for updating
      <structname>pg_class</structname>.<structfield>reltuples</structfield>
      (David Gould)
     </para>

     <para>
      Previously, pages not actually scanned by <command>ANALYZE</command>
      were assumed to retain their old tuple density.  In a large table
      where <command>ANALYZE</command> samples only a small fraction of the
      pages, this meant that the overall tuple density estimate could not
      change very much, so that <structfield>reltuples</structfield> would
      change nearly proportionally to changes in the table's physical size
      (<structfield>relpages</structfield>) regardless of what was actually
      happening in the table.  This has been observed to result
      in <structfield>reltuples</structfield> becoming so much larger than
      reality as to effectively shut off autovacuuming.  To fix, assume
      that <command>ANALYZE</command>'s sample is a statistically unbiased
      sample of the table (as it should be), and just extrapolate the
      density observed within those pages to the whole table.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid deadlocks in concurrent <command>CREATE INDEX
      CONCURRENTLY</command> commands that are run
      under <literal>SERIALIZABLE</literal> or <literal>REPEATABLE
      READ</literal> transaction isolation (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible slow execution of <command>REFRESH MATERIALIZED VIEW
      CONCURRENTLY</command> (Thomas Munro)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <literal>UPDATE/DELETE ... WHERE CURRENT OF</literal> to not fail
      when the referenced cursor uses an index-only-scan plan (Yugo Nagata,
      Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect planning of join clauses pushed into parameterized
      paths (Andrew Gierth, Tom Lane)
     </para>

     <para>
      This error could result in misclassifying a condition as
      a <quote>join filter</quote> for an outer join when it should be a
      plain <quote>filter</quote> condition, leading to incorrect join
      output.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possibly incorrect generation of an index-only-scan plan when the
      same table column appears in multiple index columns, and only some of
      those index columns use operator classes that can return the column
      value (Kyotaro Horiguchi)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix misoptimization of <literal>CHECK</literal> constraints having
      provably-NULL subclauses of
      top-level <literal>AND</literal>/<literal>OR</literal> conditions
      (Tom Lane, Dean Rasheed)
     </para>

     <para>
      This could, for example, allow constraint exclusion to exclude a
      child table that should not be excluded from a query.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix executor crash due to double free in some <literal>GROUPING
      SET</literal> usages (Peter Geoghegan)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid crash if a table rewrite event trigger is added concurrently
      with a command that could call such a trigger (&Aacute;lvaro Herrera,
      Andrew Gierth, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid failure if a query-cancel or session-termination interrupt
      occurs while committing a prepared transaction (Stas Kelvich)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix query-lifespan memory leakage in repeatedly executed hash joins
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix overly strict sanity check
      in <function>heap_prepare_freeze_tuple</function>
      (&Aacute;lvaro Herrera)
     </para>

     <para>
      This could result in incorrect <quote>cannot freeze committed
      xmax</quote> failures in databases that have
      been <application>pg_upgrade</application>'d from 9.2 or earlier.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent dangling-pointer dereference when a C-coded before-update row
      trigger returns the <quote>old</quote> tuple (Rushabh Lathia)
     </para>
    </listitem>

    <listitem>
     <para>
      Reduce locking during autovacuum worker scheduling (Jeff Janes)
     </para>

     <para>
      The previous behavior caused drastic loss of potential worker
      concurrency in databases with many tables.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure client hostname is copied while copying
      <structname>pg_stat_activity</structname> data to local memory
      (Edmund Horner)
     </para>

     <para>
      Previously the supposedly-local snapshot contained a pointer into
      shared memory, allowing the client hostname column to change
      unexpectedly if any existing session disconnected.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect processing of multiple compound affixes
      in <literal>ispell</literal> dictionaries (Arthur Zakirov)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix collation-aware searches (that is, indexscans using inequality
      operators) in SP-GiST indexes on text columns (Tom Lane)
     </para>

     <para>
      Such searches would return the wrong set of rows in most non-C
      locales.
     </para>
    </listitem>

    <listitem>
     <para>
      Count the number of index tuples correctly during initial build of an
      SP-GiST index (Tomas Vondra)
     </para>

     <para>
      Previously, the tuple count was reported to be the same as that of
      the underlying table, which is wrong if the index is partial.
     </para>
    </listitem>

    <listitem>
     <para>
      Count the number of index tuples correctly during vacuuming of a
      GiST index (Andrey Borodin)
     </para>

     <para>
      Previously it reported the estimated number of heap tuples,
      which might be inaccurate, and is certainly wrong if the
      index is partial.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix a corner case where a streaming standby gets stuck at a WAL
      continuation record (Kyotaro Horiguchi)
     </para>
    </listitem>

    <listitem>
     <para>
      In logical decoding, avoid possible double processing of WAL data
      when a walsender restarts (Craig Ringer)
     </para>
    </listitem>

    <listitem>
     <para>
      Allow <function>scalarltsel</function>
      and <function>scalargtsel</function> to be used on non-core datatypes
      (Tomas Vondra)
     </para>
    </listitem>

    <listitem>
     <para>
      Reduce <application>libpq</application>'s memory consumption when a
      server error is reported after a large amount of query output has
      been collected (Tom Lane)
     </para>

     <para>
      Discard the previous output before, not after, processing the error
      message.  On some platforms, notably Linux, this can make a
      difference in the application's subsequent memory footprint.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix double-free crashes in <application>ecpg</application>
      (Patrick Krecker, Jeevan Ladhe)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>ecpg</application> to handle <type>long long
      int</type> variables correctly in MSVC builds (Michael Meskes,
      Andrew Gierth)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix mis-quoting of values for list-valued GUC variables in dumps
      (Michael Paquier, Tom Lane)
     </para>

     <para>
      The <varname>local_preload_libraries</varname>,
      <varname>session_preload_libraries</varname>,
      <varname>shared_preload_libraries</varname>,
      and <varname>temp_tablespaces</varname> variables were not correctly
      quoted in <application>pg_dump</application> output.  This would
      cause problems if settings for these variables appeared in
      <command>CREATE FUNCTION ... SET</command> or <command>ALTER
      DATABASE/ROLE ... SET</command> clauses.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_recvlogical</application> to not fail against
      pre-v10 <productname>PostgreSQL</productname> servers
      (Michael Paquier)
     </para>

     <para>
      A previous fix caused <application>pg_recvlogical</application> to
      issue a command regardless of server version, but it should only be
      issued to v10 and later servers.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that <application>pg_rewind</application> deletes files on the
      target server if they are deleted from the source server during the
      run (Takayuki Tsunakawa)
     </para>

     <para>
      Failure to do this could result in data inconsistency on the target,
      particularly if the file in question is a WAL segment.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_rewind</application> to handle tables in
      non-default tablespaces correctly (Takayuki Tsunakawa)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix overflow handling in <application>PL/pgSQL</application>
      integer <command>FOR</command> loops (Tom Lane)
     </para>

     <para>
      The previous coding failed to detect overflow of the loop variable
      on some non-gcc compilers, leading to an infinite loop.
     </para>
    </listitem>

    <listitem>
     <para>
      Adjust <application>PL/Python</application> regression tests to pass
      under Python 3.7 (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
     <para>
      Support testing <application>PL/Python</application> and related
      modules when building with Python 3 and MSVC (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [3c0e07a46] 2018-05-01 12:02:41 -0400
-->
     <para>
      Support building with Microsoft Visual Studio 2015 (Michael Paquier)
     </para>

     <para>
      Various fixes needed for VS2015 compatibility were previously
      back-patched into the 9.5 branch, but this one was missed.
     </para>
    </listitem>

    <listitem>
     <para>
      Rename internal <function>b64_encode</function>
      and <function>b64_decode</function> functions to avoid conflict with
      Solaris 11.4 built-in functions (Rainer Orth)
     </para>
    </listitem>

    <listitem>
     <para>
      Sync our copy of the timezone library with IANA tzcode release 2018e
      (Tom Lane)
     </para>

     <para>
      This fixes the <application>zic</application> timezone data compiler
      to cope with negative daylight-savings offsets.  While
      the <productname>PostgreSQL</productname> project will not
      immediately ship such timezone data, <application>zic</application>
      might be used with timezone data obtained directly from IANA, so it
      seems prudent to update <application>zic</application> now.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2018d for DST law changes in Palestine and Antarctica (Casey
      Station), plus historical corrections for Portugal and its colonies,
      as well as Enderbury, Jamaica, Turks &amp; Caicos Islands, and
      Uruguay.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-12">
  <title>Release 9.5.12</title>

  <formalpara>
  <title>Release date:</title>
  <para>2018-03-01</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.11.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.12</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you run an installation in which not all users are mutually
    trusting, or if you maintain an application or extension that is
    intended for use in arbitrary situations, it is strongly recommended
    that you read the documentation changes described in the first changelog
    entry below, and take suitable steps to ensure that your installation or
    code is secure.
   </para>

   <para>
    Also, the changes described in the second changelog entry below may
    cause functions used in index expressions or materialized views to fail
    during auto-analyze, or when reloading from a dump.  After upgrading,
    monitor the server logs for such problems, and fix affected functions.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.10,
    see <xref linkend="release-9-5-10">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Document how to configure installations and applications to guard
      against search-path-dependent trojan-horse attacks from other users
      (Noah Misch)
     </para>

     <para>
      Using a <varname>search_path</varname> setting that includes any
      schemas writable by a hostile user enables that user to capture
      control of queries and then run arbitrary SQL code with the
      permissions of the attacked user.  While it is possible to write
      queries that are proof against such hijacking, it is notationally
      tedious, and it's very easy to overlook holes.  Therefore, we now
      recommend configurations in which no untrusted schemas appear in
      one's search path.  Relevant documentation appears in
      <xref linkend="ddl-schemas-patterns"> (for database administrators and users),
      <xref linkend="libpq-connect"> (for application authors),
      <xref linkend="extend-extensions-security">  (for extension authors), and
      <xref linkend="sql-createfunction"> (for authors
      of <literal>SECURITY DEFINER</literal> functions).
      (CVE-2018-1058)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid use of insecure <varname>search_path</varname> settings
      in <application>pg_dump</application> and other client programs
      (Noah Misch, Tom Lane)
     </para>

     <para>
      <application>pg_dump</application>,
      <application>pg_upgrade</application>,
      <application>vacuumdb</application> and
      other <productname>PostgreSQL</productname>-provided applications were
      themselves vulnerable to the type of hijacking described in the previous
      changelog entry; since these applications are commonly run by
      superusers, they present particularly attractive targets.  To make them
      secure whether or not the installation as a whole has been secured,
      modify them to include only the <structname>pg_catalog</structname>
      schema in their <varname>search_path</varname> settings.
      Autovacuum worker processes now do the same, as well.
     </para>

     <para>
      In cases where user-provided functions are indirectly executed by
      these programs &mdash; for example, user-provided functions in index
      expressions &mdash; the tighter <varname>search_path</varname> may
      result in errors, which will need to be corrected by adjusting those
      user-provided functions to not assume anything about what search path
      they are invoked under.  That has always been good practice, but now
      it will be necessary for correct behavior.
      (CVE-2018-1058)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix misbehavior of concurrent-update rechecks with CTE references
      appearing in subplans (Tom Lane)
     </para>

     <para>
      If a CTE (<literal>WITH</literal> clause reference) is used in an
      InitPlan or SubPlan, and the query requires a recheck due to trying
      to update or lock a concurrently-updated row, incorrect results could
      be obtained.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix planner failures with overlapping mergejoin clauses in an outer
      join (Tom Lane)
     </para>

     <para>
      These mistakes led to <quote>left and right pathkeys do not match in
      mergejoin</quote> or <quote>outer pathkeys do not match
      mergeclauses</quote> planner errors in corner cases.
     </para>
    </listitem>

    <listitem>
     <para>
      Repair <application>pg_upgrade</application>'s failure to
      preserve <structfield>relfrozenxid</structfield> for materialized
      views (Tom Lane, Andres Freund)
     </para>

     <para>
      This oversight could lead to data corruption in materialized views
      after an upgrade, manifesting as <quote>could not access status of
      transaction</quote> or <quote>found xmin from before
      relfrozenxid</quote> errors.  The problem would be more likely to
      occur in seldom-refreshed materialized views, or ones that were
      maintained only with <command>REFRESH MATERIALIZED VIEW
      CONCURRENTLY</command>.
     </para>

     <para>
      If such corruption is observed, it can be repaired by refreshing the
      materialized view (without <literal>CONCURRENTLY</literal>).
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect reporting of PL/Python function names in
      error <literal>CONTEXT</literal> stacks (Tom Lane)
     </para>

     <para>
      An error occurring within a nested PL/Python function call (that is,
      one reached via a SPI query from another PL/Python function) would
      result in a stack trace showing the inner function's name twice,
      rather than the expected results.  Also, an error in a nested
      PL/Python <literal>DO</literal> block could result in a null pointer
      dereference crash on some platforms.
     </para>
    </listitem>

    <listitem>
     <para>
      Allow <filename>contrib/auto_explain</filename>'s
      <varname>log_min_duration</varname> setting to range up
      to <literal>INT_MAX</literal>, or about 24 days instead of 35 minutes
      (Tom Lane)
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-11">
  <title>Release 9.5.11</title>

  <formalpara>
  <title>Release date:</title>
  <para>2018-02-08</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.10.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.11</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.10,
    see <xref linkend="release-9-5-10">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Ensure that all temporary files made
      by <application>pg_upgrade</application> are non-world-readable
      (Tom Lane, Noah Misch)
     </para>

     <para>
      <application>pg_upgrade</application> normally restricts its
      temporary files to be readable and writable only by the calling user.
      But the temporary file containing <literal>pg_dumpall -g</literal>
      output would be group- or world-readable, or even writable, if the
      user's <literal>umask</literal> setting allows.  In typical usage on
      multi-user machines, the <literal>umask</literal> and/or the working
      directory's permissions would be tight enough to prevent problems;
      but there may be people using <application>pg_upgrade</application>
      in scenarios where this oversight would permit disclosure of database
      passwords to unfriendly eyes.
      (CVE-2018-1053)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix vacuuming of tuples that were updated while key-share locked
      (Andres Freund, &Aacute;lvaro Herrera)
     </para>

     <para>
      In some cases <command>VACUUM</command> would fail to remove such
      tuples even though they are now dead, leading to assorted data
      corruption scenarios.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix inadequate buffer locking in some LSN fetches (Jacob Champion,
      Asim Praveen, Ashwin Agrawal)
     </para>

     <para>
      These errors could result in misbehavior under concurrent load.
      The potential consequences have not been characterized fully.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect query results from cases involving flattening of
      subqueries whose outputs are used in <literal>GROUPING SETS</literal>
      (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid unnecessary failure in a query on an inheritance tree that
      occurs concurrently with some child table being removed from the tree
      by <command>ALTER TABLE NO INHERIT</command> (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix spurious deadlock failures when multiple sessions are
      running <command>CREATE INDEX CONCURRENTLY</command> (Jeff Janes)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix failures when an inheritance tree contains foreign child tables
      (Etsuro Fujita)
     </para>

     <para>
      A mix of regular and foreign tables in an inheritance tree resulted in
      creation of incorrect plans for <command>UPDATE</command>
      and <command>DELETE</command> queries.  This led to visible failures in
      some cases, notably when there are row-level triggers on a foreign
      child table.
     </para>
    </listitem>

    <listitem>
     <para>
      Repair failure with correlated sub-<literal>SELECT</literal>
      inside <literal>VALUES</literal> inside a <literal>LATERAL</literal>
      subquery (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <quote>could not devise a query plan for the given query</quote>
      planner failure for some cases involving nested <literal>UNION
      ALL</literal> inside a lateral subquery (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix logical decoding to correctly clean up disk files for crashed
      transactions (Atsushi Torikoshi)
     </para>

     <para>
      Logical decoding may spill WAL records to disk for transactions
      generating many WAL records.  Normally these files are cleaned up
      after the transaction's commit or abort record arrives; but if
      no such record is ever seen, the removal code misbehaved.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix walsender timeout failure and failure to respond to interrupts
      when processing a large transaction (Petr Jelinek)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>has_sequence_privilege()</function> to
      support <literal>WITH GRANT OPTION</literal> tests,
      as other privilege-testing functions do (Joe Conway)
     </para>
    </listitem>

    <listitem>
     <para>
      In databases using UTF8 encoding, ignore any XML declaration that
      asserts a different encoding (Pavel Stehule, Noah Misch)
     </para>

     <para>
      We always store XML strings in the database encoding, so allowing
      libxml to act on a declaration of another encoding gave wrong results.
      In encodings other than UTF8, we don't promise to support non-ASCII
      XML data anyway, so retain the previous behavior for bug compatibility.
      This change affects only <function>xpath()</function> and related
      functions; other XML code paths already acted this way.
     </para>
    </listitem>

    <listitem>
     <para>
      Provide for forward compatibility with future minor protocol versions
      (Robert Haas, Badrul Chowdhury)
     </para>

     <para>
      Up to now, <productname>PostgreSQL</productname> servers simply
      rejected requests to use protocol versions newer than 3.0, so that
      there was no functional difference between the major and minor parts
      of the protocol version number.  Allow clients to request versions 3.x
      without failing, sending back a message showing that the server only
      understands 3.0.  This makes no difference at the moment, but
      back-patching this change should allow speedier introduction of future
      minor protocol upgrades.
     </para>
    </listitem>

    <listitem>
     <para>
      Cope with failure to start a parallel worker process
      (Amit Kapila, Robert Haas)
     </para>

     <para>
      Parallel query previously tended to hang indefinitely if a worker
      could not be started, as the result of <literal>fork()</literal>
      failure or other low-probability problems.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid unsafe alignment assumptions when working
      with <type>__int128</type> (Tom Lane)
     </para>

     <para>
      Typically, compilers assume that <type>__int128</type> variables are
      aligned on 16-byte boundaries, but our memory allocation
      infrastructure isn't prepared to guarantee that, and increasing the
      setting of MAXALIGN seems infeasible for multiple reasons.  Adjust the
      code to allow use of <type>__int128</type> only when we can tell the
      compiler to assume lesser alignment.  The only known symptom of this
      problem so far is crashes in some parallel aggregation queries.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent stack-overflow crashes when planning extremely deeply
      nested set operations
      (<literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal>)
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix null-pointer crashes for some types of LDAP URLs appearing
      in <filename>pg_hba.conf</filename> (Thomas Munro)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix sample <function>INSTR()</function> functions in the PL/pgSQL
      documentation (Yugo Nagata, Tom Lane)
     </para>

     <para>
      These functions are stated to
      be <trademark class="registered">Oracle</trademark> compatible, but
      they weren't exactly.  In particular, there was a discrepancy in the
      interpretation of a negative third parameter: Oracle thinks that a
      negative value indicates the last place where the target substring can
      begin, whereas our functions took it as the last place where the
      target can end.  Also, Oracle throws an error for a zero or negative
      fourth parameter, whereas our functions returned zero.
     </para>

     <para>
      The sample code has been adjusted to match Oracle's behavior more
      precisely.  Users who have copied this code into their applications
      may wish to update their copies.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</application> to make ACL (permissions),
      comment, and security label entries reliably identifiable in archive
      output formats (Tom Lane)
     </para>

     <para>
      The <quote>tag</quote> portion of an ACL archive entry was usually
      just the name of the associated object.  Make it start with the object
      type instead, bringing ACLs into line with the convention already used
      for comment and security label archive entries.  Also, fix the
      comment and security label entries for the whole database, if present,
      to make their tags start with <literal>DATABASE</literal> so that they
      also follow this convention.  This prevents false matches in code that
      tries to identify large-object-related entries by seeing if the tag
      starts with <literal>LARGE OBJECT</literal>.  That could have resulted
      in misclassifying entries as data rather than schema, with undesirable
      results in a schema-only or data-only dump.
     </para>

     <para>
      Note that this change has user-visible results in the output
      of <command>pg_restore --list</command>.
     </para>
    </listitem>

    <listitem>
     <para>
      Rename <application>pg_rewind</application>'s
      <function>copy_file_range</function> function to avoid conflict
      with new Linux system call of that name (Andres Freund)
     </para>

     <para>
      This change prevents build failures with newer glibc versions.
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>ecpg</application>, detect indicator arrays that do
      not have the correct length and report an error (David Rader)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid triggering a libc assertion
      in <filename>contrib/hstore</filename>, due to use
      of <function>memcpy()</function> with equal source and destination
      pointers (Tomas Vondra)
     </para>
    </listitem>

    <listitem>
     <para>
      Provide modern examples of how to auto-start Postgres on macOS
      (Tom Lane)
     </para>

     <para>
      The scripts in <filename>contrib/start-scripts/osx</filename> use
      infrastructure that's been deprecated for over a decade, and which no
      longer works at all in macOS releases of the last couple of years.
      Add a new subdirectory <filename>contrib/start-scripts/macos</filename>
      containing scripts that use the newer <application>launchd</application>
      infrastructure.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect selection of configuration-specific libraries for
      OpenSSL on Windows (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
     <para>
      Support linking to MinGW-built versions of libperl (Noah Misch)
     </para>

     <para>
      This allows building PL/Perl with some common Perl distributions for
      Windows.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix MSVC build to test whether 32-bit libperl
      needs <literal>-D_USE_32BIT_TIME_T</literal> (Noah Misch)
     </para>

     <para>
      Available Perl distributions are inconsistent about what they expect,
      and lack any reliable means of reporting it, so resort to a build-time
      test on what the library being used actually does.
     </para>
    </listitem>

    <listitem>
     <para>
      On Windows, install the crash dump handler earlier in postmaster
      startup (Takayuki Tsunakawa)
     </para>

     <para>
      This may allow collection of a core dump for some early-startup
      failures that did not produce a dump before.
     </para>
    </listitem>

    <listitem>
     <para>
      On Windows, avoid encoding-conversion-related crashes when emitting
      messages very early in postmaster startup (Takayuki Tsunakawa)
     </para>
    </listitem>

    <listitem>
     <para>
      Use our existing Motorola 68K spinlock code on OpenBSD as
      well as NetBSD (David Carlier)
     </para>
    </listitem>

    <listitem>
     <para>
      Add support for spinlocks on Motorola 88K (David Carlier)
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2018c for DST law changes in Brazil, Sao Tome and Principe,
      plus historical corrections for Bolivia, Japan, and South Sudan.
      The <literal>US/Pacific-New</literal> zone has been removed (it was
      only an alias for <literal>America/Los_Angeles</literal> anyway).
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-10">
  <title>Release 9.5.10</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-11-09</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.9.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.10</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you use BRIN indexes, see the fourth changelog entry below.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.8,
    see <xref linkend="release-9-5-8">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Ensure that <literal>INSERT ... ON CONFLICT DO UPDATE</literal> checks
      table permissions and RLS policies in all cases (Dean Rasheed)
     </para>

     <para>
      The update path of <literal>INSERT ... ON CONFLICT DO UPDATE</literal>
      requires <literal>SELECT</literal> permission on the columns of the
      arbiter index, but it failed to check for that in the case of an
      arbiter specified by constraint name.
      In addition, for a table with row level security enabled, it failed to
      check updated rows against the table's <literal>SELECT</literal>
      policies (regardless of how the arbiter index was specified).
      (CVE-2017-15099)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix crash due to rowtype mismatch
      in <function>json{b}_populate_recordset()</function>
      (Michael Paquier, Tom Lane)
     </para>

     <para>
      These functions used the result rowtype specified in the <literal>FROM
      ... AS</literal> clause without checking that it matched the actual
      rowtype of the supplied tuple value.  If it didn't, that would usually
      result in a crash, though disclosure of server memory contents seems
      possible as well.
      (CVE-2017-15098)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix sample server-start scripts to become <literal>$PGUSER</literal>
      before opening <literal>$PGLOG</literal> (Noah Misch)
     </para>

     <para>
      Previously, the postmaster log file was opened while still running as
      root.  The database owner could therefore mount an attack against
      another system user by making <literal>$PGLOG</literal> be a symbolic
      link to some other file, which would then become corrupted by appending
      log messages.
     </para>

     <para>
      By default, these scripts are not installed anywhere.  Users who have
      made use of them will need to manually recopy them, or apply the same
      changes to their modified versions.  If the
      existing <literal>$PGLOG</literal> file is root-owned, it will need to
      be removed or renamed out of the way before restarting the server with
      the corrected script.
      (CVE-2017-12172)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix BRIN index summarization to handle concurrent table extension
      correctly (&Aacute;lvaro Herrera)
     </para>

     <para>
      Previously, a race condition allowed some table rows to be omitted from
      the index.  It may be necessary to reindex existing BRIN indexes to
      recover from past occurrences of this problem.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible failures during concurrent updates of a BRIN index
      (Tom Lane)
     </para>

     <para>
      These race conditions could result in errors like <quote>invalid index
      offnum</quote> or <quote>inconsistent range map</quote>.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix crash when logical decoding is invoked from a SPI-using function,
      in particular any function written in a PL language
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>json_build_array()</function>,
      <function>json_build_object()</function>, and their <type>jsonb</type>
      equivalents to handle explicit <literal>VARIADIC</literal> arguments
      correctly (Michael Paquier)
     </para>
    </listitem>

    <listitem>
     <para>
      Properly reject attempts to convert infinite float values to
      type <type>numeric</type> (Tom Lane, KaiGai Kohei)
     </para>

     <para>
      Previously the behavior was platform-dependent.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix corner-case crashes when columns have been added to the end of a
      view (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Record proper dependencies when a view or rule
      contains <structname>FieldSelect</structname>
      or <structname>FieldStore</structname> expression nodes (Tom Lane)
     </para>

     <para>
      Lack of these dependencies could allow a column or data
      type <command>DROP</command> to go through when it ought to fail,
      thereby causing later uses of the view or rule to get errors.
      This patch does not do anything to protect existing views/rules,
      only ones created in the future.
     </para>
    </listitem>

    <listitem>
     <para>
      Correctly detect hashability of range data types (Tom Lane)
     </para>

     <para>
      The planner mistakenly assumed that any range type could be hashed
      for use in hash joins or hash aggregation, but actually it must check
      whether the range's subtype has hash support.  This does not affect any
      of the built-in range types, since they're all hashable anyway.
     </para>
    </listitem>

    <listitem>
     <para>
      Correctly ignore <structname>RelabelType</structname> expression nodes
      when determining relation distinctness (David Rowley)
     </para>

     <para>
      This allows the intended optimization to occur when a subquery has
      a result column of type <type>varchar</type>.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix low-probability loss of <command>NOTIFY</command> messages due to
      XID wraparound (Marko Tiikkaja, Tom Lane)
     </para>

     <para>
      If a session executed no queries, but merely listened for
      notifications, for more than 2 billion transactions, it started to miss
      some notifications from concurrently-committing transactions.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid <systemitem>SIGBUS</systemitem> crash on Linux when a DSM memory
      request exceeds the space available in <systemitem>tmpfs</systemitem>
      (Thomas Munro)
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent low-probability crash in processing of nested trigger firings
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Allow <command>COPY</command>'s <literal>FREEZE</literal> option to
      work when the transaction isolation level is <literal>REPEATABLE
      READ</literal> or higher (Noah Misch)
     </para>

     <para>
      This case was unintentionally broken by a previous bug fix.
     </para>
    </listitem>

    <listitem>
     <para>
      Correctly restore the umask setting when file creation fails
      in <command>COPY</command> or <function>lo_export()</function>
      (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
     <para>
      Give a better error message for duplicate column names
      in <command>ANALYZE</command> (Nathan Bossart)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix mis-parsing of the last line in a
      non-newline-terminated <filename>pg_hba.conf</filename> file
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_basebackup</application>'s matching of tablespace
      paths to canonicalize both paths before comparing (Michael Paquier)
     </para>

     <para>
      This is particularly helpful on Windows.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>libpq</application> to not require user's home
      directory to exist (Tom Lane)
     </para>

     <para>
      In v10, failure to find the home directory while trying to
      read <filename>~/.pgpass</filename> was treated as a hard error,
      but it should just cause that file to not be found.  Both v10 and
      previous release branches made the same mistake when
      reading <filename>~/.pg_service.conf</filename>, though this was less
      obvious since that file is not sought unless a service name is
      specified.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>libpq</application> to guard against integer
      overflow in the row count of a <structname>PGresult</structname>
      (Michael Paquier)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>ecpg</application>'s handling of out-of-scope cursor
      declarations with pointer or array variables (Michael Meskes)
     </para>
    </listitem>

    <listitem>
     <para>
      In ecpglib, correctly handle backslashes in string literals depending
      on whether <varname>standard_conforming_strings</varname> is set
      (Tsunakawa Takayuki)
     </para>
    </listitem>

    <listitem>
     <para>
      Make ecpglib's Informix-compatibility mode ignore fractional digits in
      integer input strings, as expected (Gao Zengqi, Michael Meskes)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix missing temp-install prerequisites
      for <literal>check</literal>-like Make targets (Noah Misch)
     </para>

     <para>
      Some non-default test procedures that are meant to work
      like <literal>make check</literal> failed to ensure that the temporary
      installation was up to date.
     </para>
    </listitem>

    <listitem>
     <para>
      Sync our copy of the timezone library with IANA release tzcode2017c
      (Tom Lane)
     </para>

     <para>
      This fixes various issues; the only one likely to be user-visible
      is that the default DST rules for a POSIX-style zone name, if
      no <filename>posixrules</filename> file exists in the timezone data
      directory, now match current US law rather than what it was a dozen
      years ago.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</application>
      release 2017c for DST law changes in Fiji, Namibia, Northern Cyprus,
      Sudan, Tonga, and Turks &amp; Caicos Islands, plus historical
      corrections for Alaska, Apia, Burma, Calcutta, Detroit, Ireland,
      Namibia, and Pago Pago.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-9">
  <title>Release 9.5.9</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-08-31</para>
  </formalpara>

  <para>
   This release contains a small number of fixes from 9.5.8.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.9</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.8,
    see <xref linkend="release-9-5-8">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Show foreign tables
      in <structname>information_schema</>.<structname>table_privileges</>
      view (Peter Eisentraut)
     </para>

     <para>
      All other relevant <structname>information_schema</> views include
      foreign tables, but this one ignored them.
     </para>

     <para>
      Since this view definition is installed by <application>initdb</>,
      merely upgrading will not fix the problem.  If you need to fix this
      in an existing installation, you can, as a superuser, do this
      in <application>psql</>:
<programlisting>
SET search_path TO information_schema;
CREATE OR REPLACE VIEW table_privileges AS
    SELECT CAST(u_grantor.rolname AS sql_identifier) AS grantor,
           CAST(grantee.rolname AS sql_identifier) AS grantee,
           CAST(current_database() AS sql_identifier) AS table_catalog,
           CAST(nc.nspname AS sql_identifier) AS table_schema,
           CAST(c.relname AS sql_identifier) AS table_name,
           CAST(c.prtype AS character_data) AS privilege_type,
           CAST(
             CASE WHEN
                  -- object owner always has grant options
                  pg_has_role(grantee.oid, c.relowner, 'USAGE')
                  OR c.grantable
                  THEN 'YES' ELSE 'NO' END AS yes_or_no) AS is_grantable,
           CAST(CASE WHEN c.prtype = 'SELECT' THEN 'YES' ELSE 'NO' END AS yes_or_no) AS with_hierarchy

    FROM (
            SELECT oid, relname, relnamespace, relkind, relowner, (aclexplode(coalesce(relacl, acldefault('r', relowner)))).* FROM pg_class
         ) AS c (oid, relname, relnamespace, relkind, relowner, grantor, grantee, prtype, grantable),
         pg_namespace nc,
         pg_authid u_grantor,
         (
           SELECT oid, rolname FROM pg_authid
           UNION ALL
           SELECT 0::oid, 'PUBLIC'
         ) AS grantee (oid, rolname)

    WHERE c.relnamespace = nc.oid
          AND c.relkind IN ('r', 'v', 'f')
          AND c.grantee = grantee.oid
          AND c.grantor = u_grantor.oid
          AND c.prtype IN ('INSERT', 'SELECT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER')
          AND (pg_has_role(u_grantor.oid, 'USAGE')
               OR pg_has_role(grantee.oid, 'USAGE')
               OR grantee.rolname = 'PUBLIC');
</programlisting>
      This must be repeated in each database to be fixed,
      including <literal>template0</>.
     </para>
    </listitem>

    <listitem>
     <para>
      Clean up handling of a fatal exit (e.g., due to receipt
      of <systemitem>SIGTERM</>) that occurs while trying to execute
      a <command>ROLLBACK</> of a failed transaction (Tom Lane)
     </para>

     <para>
      This situation could result in an assertion failure.  In production
      builds, the exit would still occur, but it would log an unexpected
      message about <quote>cannot drop active portal</>.
     </para>
    </listitem>

    <listitem>
     <para>
      Remove assertion that could trigger during a fatal exit (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Correctly identify columns that are of a range type or domain type over
      a composite type or domain type being searched for (Tom Lane)
     </para>

     <para>
      Certain <command>ALTER</> commands that change the definition of a
      composite type or domain type are supposed to fail if there are any
      stored values of that type in the database, because they lack the
      infrastructure needed to update or check such values.  Previously,
      these checks could miss relevant values that are wrapped inside range
      types or sub-domains, possibly allowing the database to become
      inconsistent.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix crash in <application>pg_restore</> when using parallel mode and
      using a list file to select a subset of items to restore
      (Fabr&iacute;zio de Royes Mello)
     </para>
    </listitem>

    <listitem>
     <para>
      Change <application>ecpg</>'s parser to allow <literal>RETURNING</>
      clauses without attached C variables (Michael Meskes)
     </para>

     <para>
      This allows <application>ecpg</> programs to contain SQL constructs
      that use <literal>RETURNING</> internally (for example, inside a CTE)
      rather than using it to define values to be returned to the client.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve selection of compiler flags for PL/Perl on Windows (Tom Lane)
     </para>

     <para>
      This fix avoids possible crashes of PL/Perl due to inconsistent
      assumptions about the width of <type>time_t</> values.
      A side-effect that may be visible to extension developers is
      that <literal>_USE_32BIT_TIME_T</> is no longer defined globally
      in <productname>PostgreSQL</> Windows builds.  This is not expected
      to cause problems, because type <type>time_t</> is not used
      in any <productname>PostgreSQL</> API definitions.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <literal>make check</> to behave correctly when invoked via a
      non-GNU make program (Thomas Munro)
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-8">
  <title>Release 9.5.8</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-08-10</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.7.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.8</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you use foreign data servers that make use of user
    passwords for authentication, see the first changelog entry below.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.7,
    see <xref linkend="release-9-5-7">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Further restrict visibility
      of <structname>pg_user_mappings</>.<structfield>umoptions</>, to
      protect passwords stored as user mapping options
      (Noah Misch)
     </para>

     <para>
      The fix for CVE-2017-7486 was incorrect: it allowed a user
      to see the options in her own user mapping, even if she did not
      have <literal>USAGE</> permission on the associated foreign server.
      Such options might include a password that had been provided by the
      server owner rather than the user herself.
      Since <structname>information_schema.user_mapping_options</> does not
      show the options in such cases, <structname>pg_user_mappings</>
      should not either.
      (CVE-2017-7547)
     </para>

     <para>
      By itself, this patch will only fix the behavior in newly initdb'd
      databases.  If you wish to apply this change in an existing database,
      you will need to do the following:
     </para>

     <procedure>
      <step>
       <para>
        Restart the postmaster after adding <literal>allow_system_table_mods
        = true</> to <filename>postgresql.conf</>.  (In versions
        supporting <command>ALTER SYSTEM</>, you can use that to make the
        configuration change, but you'll still need a restart.)
       </para>
      </step>

      <step>
       <para>
        In <emphasis>each</> database of the cluster,
        run the following commands as superuser:
<programlisting>
SET search_path = pg_catalog;
CREATE OR REPLACE VIEW pg_user_mappings AS
    SELECT
        U.oid       AS umid,
        S.oid       AS srvid,
        S.srvname   AS srvname,
        U.umuser    AS umuser,
        CASE WHEN U.umuser = 0 THEN
            'public'
        ELSE
            A.rolname
        END AS usename,
        CASE WHEN (U.umuser &lt;&gt; 0 AND A.rolname = current_user
                     AND (pg_has_role(S.srvowner, 'USAGE')
                          OR has_server_privilege(S.oid, 'USAGE')))
                    OR (U.umuser = 0 AND pg_has_role(S.srvowner, 'USAGE'))
                    OR (SELECT rolsuper FROM pg_authid WHERE rolname = current_user)
                    THEN U.umoptions
                 ELSE NULL END AS umoptions
    FROM pg_user_mapping U
         LEFT JOIN pg_authid A ON (A.oid = U.umuser) JOIN
        pg_foreign_server S ON (U.umserver = S.oid);
</programlisting>
       </para>
      </step>

      <step>
       <para>
        Do not forget to include the <literal>template0</>
        and <literal>template1</> databases, or the vulnerability will still
        exist in databases you create later.  To fix <literal>template0</>,
        you'll need to temporarily make it accept connections.
        In <productname>PostgreSQL</> 9.5 and later, you can use
<programlisting>
ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
</programlisting>
        and then after fixing <literal>template0</>, undo that with
<programlisting>
ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
</programlisting>
        In prior versions, instead use
<programlisting>
UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
</programlisting>
       </para>
      </step>

      <step>
       <para>
        Finally, remove the <literal>allow_system_table_mods</> configuration
        setting, and again restart the postmaster.
       </para>
      </step>
     </procedure>
    </listitem>

    <listitem>
     <para>
      Disallow empty passwords in all password-based authentication methods
      (Heikki Linnakangas)
     </para>

     <para>
      <application>libpq</> ignores empty password specifications, and does
      not transmit them to the server.  So, if a user's password has been
      set to the empty string, it's impossible to log in with that password
      via <application>psql</> or other <application>libpq</>-based
      clients.  An administrator might therefore believe that setting the
      password to empty is equivalent to disabling password login.
      However, with a modified or non-<application>libpq</>-based client,
      logging in could be possible, depending on which authentication
      method is configured.  In particular the most common
      method, <literal>md5</>, accepted empty passwords.
      Change the server to reject empty passwords in all cases.
      (CVE-2017-7546)
     </para>
    </listitem>

    <listitem>
     <para>
      Make <function>lo_put()</> check for <literal>UPDATE</> privilege on
      the target large object (Tom Lane, Michael Paquier)
     </para>

     <para>
      <function>lo_put()</> should surely require the same permissions
      as <function>lowrite()</>, but the check was missing, allowing any
      user to change the data in a large object.
      (CVE-2017-7548)
     </para>
    </listitem>

    <listitem>
     <para>
      Correct the documentation about the process for upgrading standby
      servers with <application>pg_upgrade</> (Bruce Momjian)
     </para>

     <para>
      The previous documentation instructed users to start/stop the primary
      server after running <application>pg_upgrade</> but before syncing
      the standby servers.  This sequence is unsafe.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix concurrent locking of tuple update chains (&Aacute;lvaro Herrera)
     </para>

     <para>
      If several sessions concurrently lock a tuple update chain with
      nonconflicting lock modes using an old snapshot, and they all
      succeed, it was possible for some of them to nonetheless fail (and
      conclude there is no live tuple version) due to a race condition.
      This had consequences such as foreign-key checks failing to see a
      tuple that definitely exists but is being updated concurrently.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix potential data corruption when freezing a tuple whose XMAX is a
      multixact with exactly one still-interesting member (Teodor Sigaev)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid integer overflow and ensuing crash when sorting more than one
      billion tuples in-memory (Sergey Koposov)
     </para>
    </listitem>

    <listitem>
     <para>
      On Windows, retry process creation if we fail to reserve the address
      range for our shared memory in the new process (Tom Lane, Amit
      Kapila)
     </para>

     <para>
      This is expected to fix infrequent child-process-launch failures that
      are probably due to interference from antivirus products.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix low-probability corruption of shared predicate-lock hash table
      in Windows builds (Thomas Munro, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid logging clean closure of an SSL connection as though
      it were a connection reset (Michael Paquier)
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent sending SSL session tickets to clients (Tom Lane)
     </para>

     <para>
      This fix prevents reconnection failures with ticket-aware client-side
      SSL code.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix code for setting <xref linkend="guc-tcp-keepalives-idle"> on
      Solaris (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix statistics collector to honor inquiry messages issued just after
      a postmaster shutdown and immediate restart (Tom Lane)
     </para>

     <para>
      Statistics inquiries issued within half a second of the previous
      postmaster shutdown were effectively ignored.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that the statistics collector's receive buffer size is at
      least 100KB (Tom Lane)
     </para>

     <para>
      This reduces the risk of dropped statistics data on older platforms
      whose default receive buffer size is less than that.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible creation of an invalid WAL segment when a standby is
      promoted just after it processes an <literal>XLOG_SWITCH</> WAL
      record (Andres Freund)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>walsender</> to exit promptly when client requests
      shutdown (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in
      walsender processes (Petr Jelinek, Andres Freund)
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent walsender-triggered panics during shutdown checkpoints
      (Andres Freund, Michael Paquier)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix unnecessarily slow restarts of <application>walreceiver</>
      processes due to race condition in postmaster (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix leakage of small subtransactions spilled to disk during logical
      decoding (Andres Freund)
     </para>

     <para>
      This resulted in temporary files consuming excessive disk space.
     </para>
    </listitem>

    <listitem>
     <para>
      Reduce the work needed to build snapshots during creation of
      logical-decoding slots (Andres Freund, Petr Jelinek)
     </para>

     <para>
      The previous algorithm was infeasibly expensive on a server with a
      lot of open transactions.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix race condition that could indefinitely delay creation of
      logical-decoding slots (Andres Freund, Petr Jelinek)
     </para>
    </listitem>

    <listitem>
     <para>
      Reduce overhead in processing syscache invalidation events (Tom Lane)
     </para>

     <para>
      This is particularly helpful for logical decoding, which triggers
      frequent cache invalidation.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix cases where an <command>INSERT</> or <command>UPDATE</> assigns
      to more than one element of a column that is of domain-over-array
      type (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Allow window functions to be used in sub-<literal>SELECT</>s that
      are within the arguments of an aggregate function (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Move autogenerated array types out of the way during
      <command>ALTER ... RENAME</> (Vik Fearing)
     </para>

     <para>
      Previously, we would rename a conflicting autogenerated array type
      out of the way during <command>CREATE</>; this fix extends that
      behavior to renaming operations.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix dangling pointer in <command>ALTER TABLE</> when there is a
      comment on a constraint belonging to the table (David Rowley)
     </para>

     <para>
      Re-applying the comment to the reconstructed constraint could fail
      with a weird error message, or even crash.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that <command>ALTER USER ... SET</> accepts all the syntax
      variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
     <para>
      Properly update dependency info when changing a datatype I/O
      function's argument or return type from <type>opaque</> to the
      correct type (Heikki Linnakangas)
     </para>

     <para>
      <command>CREATE TYPE</> updates I/O functions declared in this
      long-obsolete style, but it forgot to record a dependency on the
      type, allowing a subsequent <command>DROP TYPE</> to leave broken
      function definitions behind.
     </para>
    </listitem>

    <listitem>
     <para>
      Reduce memory usage when <command>ANALYZE</> processes
      a <type>tsvector</> column (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix unnecessary precision loss and sloppy rounding when multiplying
      or dividing <type>money</> values by integers or floats (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Tighten checks for whitespace in functions that parse identifiers,
      such as <function>regprocedurein()</> (Tom Lane)
     </para>

     <para>
      Depending on the prevailing locale, these functions could
      misinterpret fragments of multibyte characters as whitespace.
     </para>
    </listitem>

    <listitem>
     <para>
      Use relevant <literal>#define</> symbols from Perl while
      compiling <application>PL/Perl</> (Ashutosh Sharma, Tom Lane)
     </para>

     <para>
      This avoids portability problems, typically manifesting as
      a <quote>handshake</> mismatch during library load, when working with
      recent Perl versions.
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>libpq</>, reset GSS/SASL and SSPI authentication
      state properly after a failed connection attempt (Michael Paquier)
     </para>

     <para>
      Failure to do this meant that when falling back from SSL to non-SSL
      connections, a GSS/SASL failure in the SSL attempt would always cause
      the non-SSL attempt to fail.  SSPI did not fail, but it leaked memory.
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>psql</>, fix failure when <command>COPY FROM STDIN</>
      is ended with a keyboard EOF signal and then another <command>COPY
      FROM STDIN</> is attempted (Thomas Munro)
     </para>

     <para>
      This misbehavior was observed on BSD-derived platforms (including
      macOS), but not on most others.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</> and <application>pg_restore</> to
      emit <command>REFRESH MATERIALIZED VIEW</> commands last (Tom Lane)
     </para>

     <para>
      This prevents errors during dump/restore when a materialized view
      refers to tables owned by a different user.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve <application>pg_dump</>/<application>pg_restore</>'s
      reporting of error conditions originating in <application>zlib</>
      (Vladimir Kunschikov, &Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</> with the <option>--clean</> option to
      drop event triggers as expected (Tom Lane)
     </para>

     <para>
      It also now correctly assigns ownership of event triggers; before,
      they were restored as being owned by the superuser running the
      restore script.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</> to not emit invalid SQL for an empty
      operator class (Daniel Gustafsson)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</> output to stdout on Windows (Kuntal Ghosh)
     </para>

     <para>
      A compressed plain-text dump written to stdout would contain corrupt
      data due to failure to put the file descriptor into binary mode.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>pg_get_ruledef()</> to print correct output for
      the <literal>ON SELECT</> rule of a view whose columns have been
      renamed (Tom Lane)
     </para>

     <para>
      In some corner cases, <application>pg_dump</> relies
      on <function>pg_get_ruledef()</> to dump views, so that this error
      could result in dump/reload failures.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix dumping of outer joins with empty constraints, such as the result
      of a <literal>NATURAL LEFT JOIN</> with no common columns (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix dumping of function expressions in the <literal>FROM</> clause in
      cases where the expression does not deparse into something that looks
      like a function call (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_basebackup</> output to stdout on Windows
      (Haribabu Kommi)
     </para>

     <para>
      A backup written to stdout would contain corrupt data due to failure
      to put the file descriptor into binary mode.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_rewind</> to correctly handle files exceeding 2GB
      (Kuntal Ghosh, Michael Paquier)
     </para>

     <para>
      Ordinarily such files won't appear in <productname>PostgreSQL</> data
      directories, but they could be present in some cases.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_upgrade</> to ensure that the ending WAL record
      does not have <xref linkend="guc-wal-level"> = <literal>minimum</>
      (Bruce Momjian)
     </para>

     <para>
      This condition could prevent upgraded standby servers from
      reconnecting.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_xlogdump</>'s computation of WAL record length
      (Andres Freund)
     </para>
    </listitem>

    <listitem>
     <para>
      In <filename>postgres_fdw</>, re-establish connections to remote
      servers after <command>ALTER SERVER</> or <command>ALTER USER
      MAPPING</> commands (Kyotaro Horiguchi)
     </para>

     <para>
      This ensures that option changes affecting connection parameters will
      be applied promptly.
     </para>
    </listitem>

    <listitem>
     <para>
      In <filename>postgres_fdw</>, allow cancellation of remote
      transaction control commands (Robert Haas, Rafia Sabih)
     </para>

     <para>
      This change allows us to quickly escape a wait for an unresponsive
      remote server in many more cases than previously.
     </para>
    </listitem>

    <listitem>
     <para>
      Increase <literal>MAX_SYSCACHE_CALLBACKS</> to provide more room for
      extensions (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Always use <option>-fPIC</>, not <option>-fpic</>, when building
      shared libraries with gcc (Tom Lane)
     </para>

     <para>
      This supports larger extension libraries on platforms where it makes
      a difference.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [af1f18259] 2017-08-02 15:07:20 -0400
Branch: REL9_4_STABLE [8892170e7] 2017-08-02 15:07:20 -0400
Branch: REL9_3_STABLE [3d9ae20e7] 2017-08-02 15:07:20 -0400
Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400
-->
     <para>
      Fix unescaped-braces issue in our build scripts for Microsoft MSVC,
      to avoid a warning or error from recent Perl versions (Andrew
      Dunstan)
     </para>
    </listitem>

    <listitem>
     <para>
      In MSVC builds, handle the case where the <application>openssl</>
      library is not within a <filename>VC</> subdirectory (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
     <para>
      In MSVC builds, add proper include path for <application>libxml2</>
      header files (Andrew Dunstan)
     </para>

     <para>
      This fixes a former need to move things around in standard Windows
      installations of <application>libxml2</>.
     </para>
    </listitem>

    <listitem>
     <para>
      In MSVC builds, recognize a Tcl library that is
      named <filename>tcl86.lib</> (Noah Misch)
     </para>
    </listitem>

    <listitem>
     <para>
      In MSVC builds, honor <literal>PROVE_FLAGS</> settings
      on <filename>vcregress.pl</>'s command line (Andrew Dunstan)
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-7">
  <title>Release 9.5.7</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-05-11</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.6.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.7</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you use foreign data servers that make use of user
    passwords for authentication, see the first changelog entry below.
   </para>

   <para>
    Also, if you are using third-party replication tools that depend
    on <quote>logical decoding</>, see the fourth changelog entry below.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.6,
    see <xref linkend="release-9-5-6">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Restrict visibility
      of <structname>pg_user_mappings</>.<structfield>umoptions</>, to
      protect passwords stored as user mapping options
      (Michael Paquier, Feike Steenbergen)
     </para>

     <para>
      The previous coding allowed the owner of a foreign server object,
      or anyone he has granted server <literal>USAGE</> permission to,
      to see the options for all user mappings associated with that server.
      This might well include passwords for other users.
      Adjust the view definition to match the behavior of
      <structname>information_schema.user_mapping_options</>, namely that
      these options are visible to the user being mapped, or if the mapping
      is for <literal>PUBLIC</literal> and the current user is the server
      owner, or if the current user is a superuser.
      (CVE-2017-7486)
     </para>

     <para>
      By itself, this patch will only fix the behavior in newly initdb'd
      databases.  If you wish to apply this change in an existing database,
      follow the corrected procedure shown in the changelog entry for
      CVE-2017-7547, in <xref linkend="release-9-5-8">.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent exposure of statistical information via leaky operators
      (Peter Eisentraut)
     </para>

     <para>
      Some selectivity estimation functions in the planner will apply
      user-defined operators to values obtained
      from <structname>pg_statistic</>, such as most common values and
      histogram entries.  This occurs before table permissions are checked,
      so a nefarious user could exploit the behavior to obtain these values
      for table columns he does not have permission to read.  To fix,
      fall back to a default estimate if the operator's implementation
      function is not certified leak-proof and the calling user does not have
      permission to read the table column whose statistics are needed.
      At least one of these criteria is satisfied in most cases in practice.
      (CVE-2017-7484)
     </para>
    </listitem>

    <listitem>
     <para>
      Restore <application>libpq</>'s recognition of
      the <envar>PGREQUIRESSL</> environment variable (Daniel Gustafsson)
     </para>

     <para>
      Processing of this environment variable was unintentionally dropped
      in <productname>PostgreSQL</> 9.3, but its documentation remained.
      This creates a security hazard, since users might be relying on the
      environment variable to force SSL-encrypted connections, but that
      would no longer be guaranteed.  Restore handling of the variable,
      but give it lower priority than <envar>PGSSLMODE</>, to avoid
      breaking configurations that work correctly with post-9.3 code.
      (CVE-2017-7485)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possibly-invalid initial snapshot during logical decoding
      (Petr Jelinek, Andres Freund)
     </para>

     <para>
      The initial snapshot created for a logical decoding replication slot
      was potentially incorrect.  This could cause third-party tools that
      use logical decoding to copy incomplete/inconsistent initial data.
      This was more likely to happen if the source server was busy at the
      time of slot creation, or if another logical slot already existed.
     </para>

     <para>
      If you are using a replication tool that depends on logical decoding,
      and it should have copied a nonempty data set at the start of
      replication, it is advisable to recreate the replica after
      installing this update, or to verify its contents against the source
      server.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible corruption of <quote>init forks</> of unlogged indexes
      (Robert Haas, Michael Paquier)
     </para>

     <para>
      This could result in an unlogged index being set to an invalid state
      after a crash and restart.  Such a problem would persist until the
      index was dropped and rebuilt.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect reconstruction of <structname>pg_subtrans</> entries
      when a standby server replays a prepared but uncommitted two-phase
      transaction (Tom Lane)
     </para>

     <para>
      In most cases this turned out to have no visible ill effects, but in
      corner cases it could result in circular references
      in <structname>pg_subtrans</>, potentially causing infinite loops
      in queries that examine rows modified by the two-phase transaction.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid possible crash in <application>walsender</> due to failure
      to initialize a string buffer (Stas Kelvich, Fujii Masao)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible crash when rescanning a nearest-neighbor index-only scan
      on a GiST index (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix postmaster's handling of <function>fork()</> failure for a
      background worker process (Tom Lane)
     </para>

     <para>
      Previously, the postmaster updated portions of its state as though
      the process had been launched successfully, resulting in subsequent
      confusion.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100
-->
     <para>
      Fix crash or wrong answers when a <literal>GROUPING SETS</> column's
      data type is hashable but not sortable (Pavan Deolasee)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid applying <quote>physical targetlist</> optimization to custom
      scans (Dmitry Ivanov, Tom Lane)
     </para>

     <para>
      This optimization supposed that retrieving all columns of a tuple
      is inexpensive, which is true for ordinary Postgres tuples; but it
      might not be the case for a custom scan provider.
     </para>
    </listitem>

    <listitem>
     <para>
      Use the correct sub-expression when applying a <literal>FOR ALL</>
      row-level-security policy (Stephen Frost)
     </para>

     <para>
      In some cases the <literal>WITH CHECK</> restriction would be applied
      when the <literal>USING</> restriction is more appropriate.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure parsing of queries in extension scripts sees the results of
      immediately-preceding DDL (Julien Rouhaud, Tom Lane)
     </para>

     <para>
      Due to lack of a cache flush step between commands in an extension
      script file, non-utility queries might not see the effects of an
      immediately preceding catalog change, such as <command>ALTER TABLE
      ... RENAME</>.
     </para>
    </listitem>

    <listitem>
     <para>
      Skip tablespace privilege checks when <command>ALTER TABLE ... ALTER
      COLUMN TYPE</> rebuilds an existing index (Noah Misch)
     </para>

     <para>
      The command failed if the calling user did not currently have
      <literal>CREATE</> privilege for the tablespace containing the index.
      That behavior seems unhelpful, so skip the check, allowing the
      index to be rebuilt where it is.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</> to not recurse
      to child tables when the constraint is marked <literal>NO INHERIT</>
      (Amit Langote)
     </para>

     <para>
      This fix prevents unwanted <quote>constraint does not exist</> failures
      when no matching constraint is present in the child tables.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid dangling pointer in <command>COPY ... TO</> when row-level
      security is active for the source table (Tom Lane)
     </para>

     <para>
      Usually this had no ill effects, but sometimes it would cause
      unexpected errors or crashes.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid accessing an already-closed relcache entry in <command>CLUSTER</>
      and <command>VACUUM FULL</> (Tom Lane)
     </para>

     <para>
      With some bad luck, this could lead to indexes on the target
      relation getting rebuilt with the wrong persistence setting.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>VACUUM</> to account properly for pages that could not
      be scanned due to conflicting page pins (Andrew Gierth)
     </para>

     <para>
      This tended to lead to underestimation of the number of tuples in
      the table.  In the worst case of a small heavily-contended
      table, <command>VACUUM</> could incorrectly report that the table
      contained no tuples, leading to very bad planning choices.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that bulk-tuple-transfer loops within a hash join are
      interruptible by query cancel requests (Tom Lane, Thomas Munro)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix integer-overflow problems in <type>interval</> comparison (Kyotaro
      Horiguchi, Tom Lane)
     </para>

     <para>
      The comparison operators for type <type>interval</> could yield wrong
      answers for intervals larger than about 296000 years.  Indexes on
      columns containing such large values should be reindexed, since they
      may be corrupt.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>cursor_to_xml()</> to produce valid output
      with <replaceable>tableforest</> = false
      (Thomas Munro, Peter Eisentraut)
     </para>

     <para>
      Previously it failed to produce a wrapping <literal>&lt;table&gt;</>
      element.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix roundoff problems in <function>float8_timestamptz()</>
      and <function>make_interval()</> (Tom Lane)
     </para>

     <para>
      These functions truncated, rather than rounded, when converting a
      floating-point value to integer microseconds; that could cause
      unexpectedly off-by-one results.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>pg_get_object_address()</> to handle members of operator
      families correctly (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
     <para>
      Improve performance of <structname>pg_timezone_names</> view
      (Tom Lane, David Rowley)
     </para>
    </listitem>

    <listitem>
     <para>
      Reduce memory management overhead for contexts containing many large
      blocks (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix sloppy handling of corner-case errors from <function>lseek()</>
      and <function>close()</> (Tom Lane)
     </para>

     <para>
      Neither of these system calls are likely to fail in typical situations,
      but if they did, <filename>fd.c</> could get quite confused.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect check for whether postmaster is running as a Windows
      service (Michael Paquier)
     </para>

     <para>
      This could result in attempting to write to the event log when that
      isn't accessible, so that no logging happens at all.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>ecpg</> to support <command>COMMIT PREPARED</>
      and <command>ROLLBACK PREPARED</> (Masahiko Sawada)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix a double-free error when processing dollar-quoted string literals
      in <application>ecpg</> (Michael Meskes)
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>pg_dump</>, fix incorrect schema and owner marking for
      comments and security labels of some types of database objects
      (Giuseppe Broccolo, Tom Lane)
     </para>

     <para>
      In simple cases this caused no ill effects; but for example, a
      schema-selective restore might omit comments it should include, because
      they were not marked as belonging to the schema of their associated
      object.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid emitting an invalid list file in <literal>pg_restore -l</>
      when SQL object names contain newlines (Tom Lane)
     </para>

     <para>
      Replace newlines by spaces, which is sufficient to make the output
      valid for <literal>pg_restore -L</>'s purposes.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_upgrade</> to transfer comments and security labels
      attached to <quote>large objects</> (blobs) (Stephen Frost)
     </para>

     <para>
      Previously, blobs were correctly transferred to the new database, but
      any comments or security labels attached to them were lost.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve error handling
      in <filename>contrib/adminpack</>'s <function>pg_file_write()</>
      function (Noah Misch)
     </para>

     <para>
      Notably, it failed to detect errors reported
      by <function>fclose()</>.
     </para>
    </listitem>

    <listitem>
     <para>
      In <filename>contrib/dblink</>, avoid leaking the previous unnamed
      connection when establishing a new unnamed connection (Joe Conway)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <filename>contrib/pg_trgm</>'s extraction of trigrams from regular
      expressions (Tom Lane)
     </para>

     <para>
      In some cases it would produce a broken data structure that could never
      match anything, leading to GIN or GiST indexscans that use a trigram
      index not finding any matches to the regular expression.
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: REL9_5_STABLE [cdf5a004b] 2017-05-06 22:21:38 -0400
Branch: REL9_4_STABLE [f14bf0a8f] 2017-05-06 22:19:56 -0400
Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400
-->
     <para>
      In <filename>contrib/postgres_fdw</>,
      transmit query cancellation requests to the remote server
      (Michael Paquier, Etsuro Fujita)
     </para>

     <para>
      Previously, a local query cancellation request did not cause an
      already-sent remote query to terminate early.  This is a back-patch
      of work originally done for 9.6.
     </para>
    </listitem>

    <listitem>
     <para>
      Support Tcl 8.6 in MSVC builds (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
     <para>
      Sync our copy of the timezone library with IANA release tzcode2017b
      (Tom Lane)
     </para>

     <para>
      This fixes a bug affecting some DST transitions in January 2038.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</> release 2017b
      for DST law changes in Chile, Haiti, and Mongolia, plus historical
      corrections for Ecuador, Kazakhstan, Liberia, and Spain.
      Switch to numeric abbreviations for numerous time zones in South
      America, the Pacific and Indian oceans, and some Asian and Middle
      Eastern countries.
     </para>

     <para>
      The IANA time zone database previously provided textual abbreviations
      for all time zones, sometimes making up abbreviations that have little
      or no currency among the local population.  They are in process of
      reversing that policy in favor of using numeric UTC offsets in zones
      where there is no evidence of real-world use of an English
      abbreviation.  At least for the time being, <productname>PostgreSQL</>
      will continue to accept such removed abbreviations for timestamp input.
      But they will not be shown in the <structname>pg_timezone_names</>
      view nor used for output.
     </para>
    </listitem>

    <listitem>
     <para>
      Use correct daylight-savings rules for POSIX-style time zone names
      in MSVC builds (David Rowley)
     </para>

     <para>
      The Microsoft MSVC build scripts neglected to install
      the <filename>posixrules</> file in the timezone directory tree.
      This resulted in the timezone code falling back to its built-in
      rule about what DST behavior to assume for a POSIX-style time zone
      name.  For historical reasons that still corresponds to the DST rules
      the USA was using before 2007 (i.e., change on first Sunday in April
      and last Sunday in October).  With this fix, a POSIX-style zone name
      will use the current and historical DST transition dates of
      the <literal>US/Eastern</> zone.  If you don't want that, remove
      the <filename>posixrules</> file, or replace it with a copy of some
      other zone file (see <xref linkend="datatype-timezones">).  Note that
      due to caching, you may need to restart the server to get such changes
      to take effect.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-6">
  <title>Release 9.5.6</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-02-09</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.5.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.6</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if your installation has been affected by the bug described in
    the first changelog entry below, then after updating you may need
    to take action to repair corrupted indexes.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.5,
    see <xref linkend="release-9-5-5">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Fix a race condition that could cause indexes built
      with <command>CREATE INDEX CONCURRENTLY</> to be corrupt
      (Pavan Deolasee, Tom Lane)
     </para>

     <para>
      If <command>CREATE INDEX CONCURRENTLY</> was used to build an index
      that depends on a column not previously indexed, then rows
      updated by transactions that ran concurrently with
      the <command>CREATE INDEX</> command could have received incorrect
      index entries.  If you suspect this may have happened, the most
      reliable solution is to rebuild affected indexes after installing
      this update.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that the special snapshot used for catalog scans is not
      invalidated by premature data pruning (Tom Lane)
     </para>

     <para>
      Backends failed to account for this snapshot when advertising their
      oldest xmin, potentially allowing concurrent vacuuming operations to
      remove data that was still needed.  This led to transient failures
      along the lines of <quote>cache lookup failed for relation 1255</>.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect WAL logging for BRIN indexes (Kuntal Ghosh)
     </para>

     <para>
      The WAL record emitted for a BRIN <quote>revmap</> page when moving an
      index tuple to a different page was incorrect.  Replay would make the
      related portion of the index useless, forcing it to be recomputed.
     </para>
    </listitem>

    <listitem>
     <para>
      Unconditionally WAL-log creation of the <quote>init fork</> for an
      unlogged table (Michael Paquier)
     </para>

     <para>
      Previously, this was skipped when <xref linkend="guc-wal-level">
      = <literal>minimal</>, but actually it's necessary even in that case
      to ensure that the unlogged table is properly reset to empty after a
      crash.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: REL9_5_STABLE [c0db1ec26] 2016-11-17 13:31:30 -0300
Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300
-->
     <para>
      Reduce interlocking on standby servers during the replay of btree
      index vacuuming operations (Simon Riggs)
     </para>

     <para>
      This change avoids substantial replication delays that sometimes
      occurred while replaying such operations.
     </para>
    </listitem>

    <listitem>
     <para>
      If the stats collector dies during hot standby, restart it (Takayuki
      Tsunakawa)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that hot standby feedback works correctly when it's enabled at
      standby server start (Ants Aasma, Craig Ringer)
     </para>
    </listitem>

    <listitem>
     <para>
      Check for interrupts while hot standby is waiting for a conflicting
      query (Simon Riggs)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid constantly respawning the autovacuum launcher in a corner case
      (Amit Khandekar)
     </para>

     <para>
      This fix avoids problems when autovacuum is nominally off and there
      are some tables that require freezing, but all such tables are
      already being processed by autovacuum workers.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix check for when an extension member object can be dropped (Tom Lane)
     </para>

     <para>
      Extension upgrade scripts should be able to drop member objects,
      but this was disallowed for serial-column sequences, and possibly
      other cases.
     </para>
    </listitem>

    <listitem>
     <para>
      Make sure <command>ALTER TABLE</> preserves index tablespace
      assignments when rebuilding indexes (Tom Lane, Michael Paquier)
     </para>

     <para>
      Previously, non-default settings
      of <xref linkend="guc-default-tablespace"> could result in broken
      indexes.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect updating of trigger function properties when changing a
      foreign-key constraint's deferrability properties with <command>ALTER
      TABLE ... ALTER CONSTRAINT</> (Tom Lane)
     </para>

     <para>
      This led to odd failures during subsequent exercise of the foreign
      key, as the triggers were fired at the wrong times.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent dropping a foreign-key constraint if there are pending
      trigger events for the referenced relation (Tom Lane)
     </para>

     <para>
      This avoids <quote>could not find trigger <replaceable>NNN</></quote>
      or <quote>relation <replaceable>NNN</> has no triggers</quote> errors.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>ALTER TABLE ... SET DATA TYPE ... USING</> when child
      table has different column ordering than the parent
      (&Aacute;lvaro Herrera)
     </para>

     <para>
      Failure to adjust the column numbering in the <literal>USING</>
      expression led to errors,
      typically <quote>attribute <replaceable>N</> has wrong type</quote>.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix processing of OID column when a table with OIDs is associated to
      a parent with OIDs via <command>ALTER TABLE ... INHERIT</> (Amit
      Langote)
     </para>

     <para>
      The OID column should be treated the same as regular user columns in
      this case, but it wasn't, leading to odd behavior in later
      inheritance changes.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>CREATE OR REPLACE VIEW</> to update the view query
      before attempting to apply the new view options (Dean Rasheed)
     </para>

     <para>
      Previously the command would fail if the new options were
      inconsistent with the old view definition.
     </para>
    </listitem>

    <listitem>
     <para>
      Report correct object identity during <command>ALTER TEXT SEARCH
      CONFIGURATION</> (Artur Zakirov)
     </para>

     <para>
      The wrong catalog OID was reported to extensions such as logical
      decoding.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix commit timestamp mechanism to not fail when queried about
      the special XIDs <literal>FrozenTransactionId</>
      and <literal>BootstrapTransactionId</> (Craig Ringer)
     </para>
    </listitem>

    <listitem>
<!--
Author: Kevin Grittner <kgrittn@postgresql.org>
Branch: REL9_5_STABLE [bed2a0b06] 2016-12-13 19:14:42 -0600
Branch: REL9_4_STABLE [4b9d466c1] 2016-12-13 19:05:12 -0600
Branch: REL9_3_STABLE [5d80171ad] 2016-12-13 19:05:35 -0600
Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600
-->
     <para>
      Check for serializability conflicts before reporting
      constraint-violation failures (Thomas Munro)
     </para>

     <para>
      When using serializable transaction isolation, it is desirable
      that any error due to concurrent transactions should manifest
      as a serialization failure, thereby cueing the application that
      a retry might succeed.  Unfortunately, this does not reliably
      happen for duplicate-key failures caused by concurrent insertions.
      This change ensures that such an error will be reported as a
      serialization error if the application explicitly checked for
      the presence of a conflicting key (and did not find it) earlier
      in the transaction.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect use of view reloptions as regular table reloptions (Tom
      Lane)
     </para>

     <para>
      The symptom was spurious <quote>ON CONFLICT is not supported on table
      ... used as a catalog table</> errors when the target
      of <command>INSERT ... ON CONFLICT</> is a view with cascade option.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect <quote>target lists can have at most <replaceable>N</>
      entries</quote> complaint when using <literal>ON CONFLICT</> with
      wide tables (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent multicolumn expansion of <replaceable>foo</><literal>.*</> in
      an <command>UPDATE</> source expression (Tom Lane)
     </para>

     <para>
      This led to <quote>UPDATE target count mismatch --- internal
      error</>.  Now the syntax is understood as a whole-row variable,
      as it would be in other contexts.
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that column typmods are determined accurately for
      multi-row <literal>VALUES</> constructs (Tom Lane)
     </para>

     <para>
      This fixes problems occurring when the first value in a column has a
      determinable typmod (e.g., length for a <type>varchar</> value) but
      later values don't share the same limit.
     </para>
    </listitem>

    <listitem>
     <para>
      Throw error for an unfinished Unicode surrogate pair at the end of a
      Unicode string (Tom Lane)
     </para>

     <para>
      Normally, a Unicode surrogate leading character must be followed by a
      Unicode surrogate trailing character, but the check for this was
      missed if the leading character was the last character in a Unicode
      string literal (<literal>U&amp;'...'</>) or Unicode identifier
      (<literal>U&amp;"..."</>).
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that a purely negative text search query, such
      as <literal>!foo</>, matches empty <type>tsvector</>s (Tom Dunstan)
     </para>

     <para>
      Such matches were found by GIN index searches, but not by sequential
      scans or GiST index searches.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent crash when <function>ts_rewrite()</> replaces a non-top-level
      subtree with an empty query (Artur Zakirov)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix performance problems in <function>ts_rewrite()</> (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>ts_rewrite()</>'s handling of nested NOT operators
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Improve speed of user-defined aggregates that
      use <function>array_append()</> as transition function (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible crash in <function>array_position()</>
      or <function>array_positions()</> when processing arrays of records
      (Junseok Yang)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix one-byte buffer overrun in <function>quote_literal_cstr()</>
      (Heikki Linnakangas)
     </para>

     <para>
      The overrun occurred only if the input consisted entirely of single
      quotes and/or backslashes.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent multiple calls of <function>pg_start_backup()</>
      and <function>pg_stop_backup()</> from running concurrently (Michael
      Paquier)
     </para>

     <para>
      This avoids an assertion failure, and possibly worse things, if
      someone tries to run these functions in parallel.
     </para>
    </listitem>

    <listitem>
     <para>
      Disable transform that attempted to remove no-op <literal>AT TIME
      ZONE</> conversions (Tom Lane)
     </para>

     <para>
      This resulted in wrong answers when the simplified expression was
      used in an index condition.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid discarding <type>interval</>-to-<type>interval</> casts
      that aren't really no-ops (Tom Lane)
     </para>

     <para>
      In some cases, a cast that should result in zeroing out
      low-order <type>interval</> fields was mistakenly deemed to be a
      no-op and discarded.  An example is that casting from <type>INTERVAL
      MONTH</> to <type>INTERVAL YEAR</> failed to clear the months field.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix bugs in transmitting GUC parameter values to parallel workers
      (Michael Paquier, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that cached plans are invalidated by changes in foreign-table
      options (Amit Langote, Etsuro Fujita, Ashutosh Bapat)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_dump</> to dump user-defined casts and transforms
      that use built-in functions (Stephen Frost)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_restore</> with <option>--create --if-exists</>
      to behave more sanely if an archive contains
      unrecognized <command>DROP</> commands (Tom Lane)
     </para>

     <para>
      This doesn't fix any live bug, but it may improve the behavior in
      future if <application>pg_restore</> is used with an archive
      generated by a later <application>pg_dump</> version.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_basebackup</>'s rate limiting in the presence of
      slow I/O (Antonin Houska)
     </para>

     <para>
      If disk I/O was transiently much slower than the specified rate
      limit, the calculation overflowed, effectively disabling the rate
      limit for the rest of the run.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>pg_basebackup</>'s handling of
      symlinked <filename>pg_stat_tmp</> and <filename>pg_replslot</>
      subdirectories (Magnus Hagander, Michael Paquier)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible <application>pg_basebackup</> failure on standby
      server when including WAL files (Amit Kapila, Robert Haas)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix possible mishandling of expanded arrays in domain check
      constraints and <literal>CASE</> execution (Tom Lane)
     </para>

     <para>
      It was possible for a PL/pgSQL function invoked in these contexts to
      modify or even delete an array value that needs to be preserved for
      additional operations.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix nested uses of PL/pgSQL functions in contexts such as domain
      check constraints evaluated during assignment to a PL/pgSQL variable
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Ensure that the Python exception objects we create for PL/Python are
      properly reference-counted (Rafa de la Torre, Tom Lane)
     </para>

     <para>
      This avoids failures if the objects are used after a Python garbage
      collection cycle has occurred.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix PL/Tcl to support triggers on tables that have <literal>.tupno</>
      as a column name (Tom Lane)
     </para>

     <para>
      This matches the (previously undocumented) behavior of
      PL/Tcl's <command>spi_exec</> and <command>spi_execp</> commands,
      namely that a magic <literal>.tupno</> column is inserted only if
      there isn't a real column named that.
     </para>
    </listitem>

    <listitem>
     <para>
      Allow DOS-style line endings in <filename>~/.pgpass</> files,
      even on Unix (Vik Fearing)
     </para>

     <para>
      This change simplifies use of the same password file across Unix and
      Windows machines.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix one-byte buffer overrun if <application>ecpg</> is given a file
      name that ends with a dot (Takayuki Tsunakawa)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT
      PRIVILEGES</> (Gilles Darold, Stephen Frost)
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>psql</>, treat an empty or all-blank setting of
      the <envar>PAGER</> environment variable as meaning <quote>no
      pager</> (Tom Lane)
     </para>

     <para>
      Previously, such a setting caused output intended for the pager to
      vanish entirely.
     </para>
    </listitem>

    <listitem>
     <para>
      Improve <filename>contrib/dblink</>'s reporting of
      low-level <application>libpq</> errors, such as out-of-memory
      (Joe Conway)
     </para>
    </listitem>

    <listitem>
     <para>
      Teach <filename>contrib/dblink</> to ignore irrelevant server options
      when it uses a <filename>contrib/postgres_fdw</> foreign server as
      the source of connection options (Corey Huinker)
     </para>

     <para>
      Previously, if the foreign server object had options that were not
      also <application>libpq</> connection options, an error occurred.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix portability problems in <filename>contrib/pageinspect</>'s
      functions for GIN indexes (Peter Eisentraut, Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      On Windows, ensure that environment variable changes are propagated
      to DLLs built with debug options (Christian Ullrich)
     </para>
    </listitem>

    <listitem>
     <para>
      Sync our copy of the timezone library with IANA release tzcode2016j
      (Tom Lane)
     </para>

     <para>
      This fixes various issues, most notably that timezone data
      installation failed if the target directory didn't support hard
      links.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</> release 2016j
      for DST law changes in northern Cyprus (adding a new zone
      Asia/Famagusta), Russia (adding a new zone Europe/Saratov), Tonga,
      and Antarctica/Casey.
      Historical corrections for Italy, Kazakhstan, Malta, and Palestine.
      Switch to preferring numeric zone abbreviations for Tonga.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-5">
  <title>Release 9.5.5</title>

  <formalpara>
  <title>Release date:</title>
  <para>2016-10-27</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.4.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.5</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if your installation has been affected by the bug described in
    the first changelog entry below, then after updating you may need
    to take action to repair corrupted free space maps.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.5.2,
    see <xref linkend="release-9-5-2">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Fix WAL-logging of truncation of relation free space maps and
      visibility maps (Pavan Deolasee, Heikki Linnakangas)
     </para>

     <para>
      It was possible for these files to not be correctly restored during
      crash recovery, or to be written incorrectly on a standby server.
      Bogus entries in a free space map could lead to attempts to access
      pages that have been truncated away from the relation itself, typically
      producing errors like <quote>could not read block <replaceable>XXX</>:
      read only 0 of 8192 bytes</quote>.  Checksum failures in the
      visibility map are also possible, if checksumming is enabled.
     </para>

     <para>
      Procedures for determining whether there is a problem and repairing it
      if so are discussed at
      <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [60893786d] 2016-09-03 13:28:53 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [36646d3af] 2016-09-03 13:28:53 -0400
Branch: REL9_5_STABLE [08a72872f] 2016-09-03 13:28:53 -0400
Branch: REL9_4_STABLE [a69443564] 2016-09-03 13:28:53 -0400
-->
     <para>
      Fix incorrect creation of GIN index WAL records on big-endian machines
      (Tom Lane)
     </para>

     <para>
      The typical symptom was <quote>unexpected GIN leaf action</> errors
      during WAL replay.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [5c609a742] 2016-09-09 15:54:29 -0300
Branch: REL9_6_STABLE Release: REL9_6_0 [c3656c9ff] 2016-09-09 15:54:29 -0300
Branch: REL9_5_STABLE [f33765885] 2016-09-09 15:54:29 -0300
Branch: REL9_4_STABLE [8778da2af] 2016-09-09 15:54:29 -0300
Branch: REL9_3_STABLE [dfe7121df] 2016-09-09 15:54:29 -0300
-->
     <para>
      Fix <command>SELECT FOR UPDATE/SHARE</> to correctly lock tuples that
      have been updated by a subsequently-aborted transaction
      (&Aacute;lvaro Herrera)
     </para>

     <para>
      In 9.5 and later, the <command>SELECT</> would sometimes fail to
      return such tuples at all.  A failure has not been proven to occur in
      earlier releases, but might be possible with concurrent updates.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [96dd77d34] 2016-09-22 11:35:03 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [a88fe25f5] 2016-09-22 11:34:44 -0400
Branch: REL9_5_STABLE [c35917835] 2016-09-22 11:34:44 -0400
Branch: REL9_4_STABLE [d3dd00e67] 2016-09-22 11:34:44 -0400
Branch: REL9_3_STABLE [73df86a37] 2016-09-22 11:34:44 -0400
Branch: REL9_2_STABLE [8552f9b90] 2016-09-22 11:34:44 -0400
Branch: REL9_1_STABLE [0183df5dc] 2016-09-22 11:34:45 -0400
-->
     <para>
      Fix EvalPlanQual rechecks involving CTE scans (Tom Lane)
     </para>

     <para>
      The recheck would always see the CTE as returning no rows, typically
      leading to failure to update rows that were recently updated.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [07ef03512] 2016-08-17 17:03:36 -0700
Branch: REL9_6_STABLE Release: REL9_6_0 [e79aaebcc] 2016-08-17 17:03:36 -0700
Branch: REL9_5_STABLE [94bc30725] 2016-08-17 17:03:36 -0700
-->
     <para>
      Fix deletion of speculatively inserted TOAST tuples when backing out
      of <command>INSERT ... ON CONFLICT</> (Oskari Saarenmaa)
     </para>

     <para>
      In the race condition where two transactions try to insert conflicting
      tuples at about the same time, the loser would fail with
      an <quote>attempted to delete invisible tuple</> error if its
      insertion included any TOAST'ed fields.
     </para>
    </listitem>

    <listitem>
     <para>
      Don't throw serialization errors for self-conflicting insertions
      in <command>INSERT ... ON CONFLICT</> (Thomas Munro, Peter Geoghegan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2c00fad28] 2016-08-24 14:38:12 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [616be05df] 2016-08-24 14:38:13 -0400
Branch: REL9_5_STABLE [25fe5f758] 2016-08-24 14:37:50 -0400
Branch: REL9_4_STABLE [08a823e53] 2016-08-24 14:37:51 -0400
Branch: REL9_3_STABLE [aaad96e40] 2016-08-24 14:37:51 -0400
Branch: REL9_2_STABLE [237663897] 2016-08-24 14:37:51 -0400
Branch: REL9_1_STABLE [3570ea424] 2016-08-24 14:37:51 -0400
-->
     <para>
      Fix improper repetition of previous results from hashed aggregation in
      a subquery (Andrew Gierth)
     </para>

     <para>
      The test to see if we can reuse a previously-computed hash table of
      the aggregate state values neglected the possibility of an outer query
      reference appearing in an aggregate argument expression.  A change in
      the value of such a reference should lead to recalculating the hash
      table, but did not.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ae4760d66] 2016-08-24 22:20:25 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [006fb80a5] 2016-08-24 22:20:26 -0400
Branch: REL9_5_STABLE [46bd14a10] 2016-08-24 22:20:01 -0400
Branch: REL9_4_STABLE [566afa15c] 2016-08-24 22:20:01 -0400
-->
     <para>
      Fix query-lifespan memory leak in a bulk <command>UPDATE</> on a table
      with a <literal>PRIMARY KEY</> or <literal>REPLICA IDENTITY</> index
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>COPY</> with a column name list from a table that has
      row-level security enabled (Adam Brightwell)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix <command>EXPLAIN</> to emit valid XML when
      <xref linkend="guc-track-io-timing"> is on (Markus Winand)
     </para>

     <para>
      Previously the XML output-format option produced syntactically invalid
      tags such as <literal>&lt;I/O-Read-Time&gt;</>.  That is now
      rendered as <literal>&lt;I-O-Read-Time&gt;</>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL9_6_BR [4b234fd8b] 2016-08-12 12:13:04 -0400
Branch: REL9_5_STABLE [ed2d7b8c8] 2016-08-12 12:13:04 -0400
Branch: REL9_4_STABLE [85974b468] 2016-08-12 12:13:04 -0400
Branch: REL9_3_STABLE [16cc6d23b] 2016-08-12 12:13:04 -0400
Branch: REL9_2_STABLE [ceb005319] 2016-08-12 12:13:04 -0400
-->
     <para>
      Suppress printing of zeroes for unmeasured times
      in <command>EXPLAIN</> (Maksim Milyutin)
     </para>

     <para>
      Certain option combinations resulted in printing zero values for times
      that actually aren't ever measured in that combination.  Our general
      policy in <command>EXPLAIN</> is not to print such fields at all, so
      do that consistently in all cases.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix statistics update for <command>TRUNCATE</> in a prepared
      transaction (Stas Kelvich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Simon Riggs <simon@2ndQuadrant.com>
Branch: master [dcb12ce8d] 2016-09-06 15:35:47 +0100
Branch: REL9_6_STABLE Release: REL9_6_0 [1fa42debe] 2016-09-09 11:43:08 +0100
Branch: REL9_5_STABLE [f3b3e871e] 2016-09-09 11:43:46 +0100
Branch: REL9_4_STABLE [81b0f8204] 2016-09-09 11:44:54 +0100
Branch: REL9_3_STABLE [e1dddf3e8] 2016-09-09 11:45:16 +0100
Branch: REL9_2_STABLE [eaf6fe7fa] 2016-09-09 11:45:40 +0100
Branch: REL9_1_STABLE [3ed7f54bc] 2016-09-09 11:46:03 +0100
-->
     <para>
      Fix timeout length when <command>VACUUM</> is waiting for exclusive
      table lock so that it can truncate the table (Simon Riggs)
     </para>

     <para>
      The timeout was meant to be 50 milliseconds, but it was actually only
      50 microseconds, causing <command>VACUUM</> to give up on truncation
      much more easily than intended.  Set it to the intended value.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix bugs in merging inherited <literal>CHECK</> constraints while
      creating or altering a table (Tom Lane, Amit Langote)
     </para>

     <para>
      Allow identical <literal>CHECK</> constraints to be added to a parent
      and child table in either order.  Prevent merging of a valid
      constraint from the parent table with a <literal>NOT VALID</>
      constraint on the child.  Likewise, prevent merging of a <literal>NO
      INHERIT</> child constraint with an inherited constraint.
     </para>
    </listitem>

    <listitem>
     <para>
      Show a sensible value
      in <structname>pg_settings</>.<structfield>unit</>
      for <varname>min_wal_size</> and <varname>max_wal_size</> (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL9_6_BR [9389fbd03] 2016-08-14 15:06:01 -0400
Branch: REL9_5_STABLE [635651214] 2016-08-14 15:06:01 -0400
Branch: REL9_4_STABLE [4ac3d7794] 2016-08-14 15:06:01 -0400
Branch: REL9_3_STABLE [e8e20aadd] 2016-08-14 15:06:02 -0400
Branch: REL9_2_STABLE [9d5bf77b5] 2016-08-14 15:06:02 -0400
Branch: REL9_1_STABLE [7e01c8ef3] 2016-08-14 15:06:02 -0400
-->
     <para>
      Remove artificial restrictions on the values accepted
      by <function>numeric_in()</> and <function>numeric_recv()</>
      (Tom Lane)
     </para>

     <para>
      We allow numeric values up to the limit of the storage format (more
      than <literal>1e100000</>), so it seems fairly pointless
      that <function>numeric_in()</> rejected scientific-notation exponents
      above 1000.  Likewise, it was silly for <function>numeric_recv()</> to
      reject more than 1000 digits in an input value.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid very-low-probability data corruption due to testing tuple
      visibility without holding buffer lock (Thomas Munro, Peter Geoghegan,
      Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Preserve commit timestamps across server restart
      (Julien Rouhaud, Craig Ringer)
     </para>

     <para>
      With <xref linkend="guc-track-commit-timestamp"> turned on, old
      commit timestamps became inaccessible after a clean server restart.
     </para>
    </listitem>

    <listitem>
     <para>
      Fix logical WAL decoding to work properly when a subtransaction's WAL
      output is large enough to spill to disk (Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [008c4135c] 2016-08-22 15:22:11 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [48b9ca0b6] 2016-08-22 15:30:31 -0400
Branch: REL9_5_STABLE [da9659f87] 2016-08-22 15:30:37 -0400
-->
     <para>
      Fix possible sorting error when aborting use of abbreviated keys
      (Peter Geoghegan)
     </para>

     <para>
      In the worst case, this could result in a corrupt btree index, which
      would need to be rebuilt using <command>REINDEX</>.  However, the
      situation is believed to be rare.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [769fd9d8e] 2016-09-08 16:51:09 -0700
Branch: REL9_6_STABLE Release: REL9_6_0 [f6802936a] 2016-09-08 16:52:13 -0700
Branch: REL9_5_STABLE [26ce63ce7] 2016-09-08 16:52:13 -0700
Branch: REL9_4_STABLE [075cfbe4a] 2016-09-08 16:52:13 -0700
Branch: REL9_3_STABLE [d2a5b2b28] 2016-09-08 16:52:13 -0700
Branch: REL9_2_STABLE [f5462dedb] 2016-09-08 16:52:13 -0700
Branch: REL9_1_STABLE [08fdfe7a8] 2016-09-08 16:52:13 -0700
-->
     <para>
      Fix file descriptor leakage when truncating a temporary relation of
      more than 1GB (Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0e0f43d6f] 2016-08-31 08:52:13 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [3fc489cb3] 2016-08-31 08:52:13 -0400
Branch: REL9_5_STABLE [c40bb1155] 2016-08-31 08:52:13 -0400
Branch: REL9_4_STABLE [f4e40537e] 2016-08-31 08:52:13 -0400
Branch: REL9_3_STABLE [baf111d31] 2016-08-31 08:52:13 -0400
Branch: REL9_2_STABLE [823df401d] 2016-08-31 08:52:13 -0400
Branch: REL9_1_STABLE [e3439a455] 2016-08-31 08:52:13 -0400
-->
     <para>
      Disallow starting a standalone backend with <literal>standby_mode</>
      turned on (Michael Paquier)
     </para>

     <para>
      This can't do anything useful, since there will be no WAL receiver
      process to fetch more WAL data; and it could result in misbehavior
      in code that wasn't designed with this situation in mind.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [2d7e59100] 2016-08-17 13:15:03 -0700
Branch: REL9_6_STABLE Release: REL9_6_0 [8cb23dba8] 2016-08-17 13:15:03 -0700
Branch: REL9_5_STABLE [de396a1cb] 2016-08-17 13:15:03 -0700
Branch: REL9_4_STABLE [690a2fb90] 2016-08-17 13:15:04 -0700
-->
     <para>
      Properly initialize replication slot state when recycling a
      previously-used slot (Michael Paquier)
     </para>

     <para>
      This failure to reset all of the fields of the slot could
      prevent <command>VACUUM</> from removing dead tuples.
     </para>
    </listitem>

    <listitem>
     <para>
      Round shared-memory allocation request to a multiple of the actual
      huge page size when attempting to use huge pages on Linux (Tom Lane)
     </para>

     <para>
      This avoids possible failures during <function>munmap()</> on systems
      with atypical default huge page sizes.  Except in crash-recovery
      cases, there were no ill effects other than a log message.
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [470d886c3] 2016-09-20 12:26:29 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [92668cd4d] 2016-09-20 12:28:02 -0400
Branch: REL9_5_STABLE [b1aed95f5] 2016-09-20 12:30:38 -0400
Branch: REL9_4_STABLE [626312d1b] 2016-09-20 12:30:42 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [49a91b88e] 2016-09-23 09:54:11 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [b251379fb] 2016-09-23 09:54:11 -0400
Branch: REL9_5_STABLE [93528f7b4] 2016-09-23 09:54:11 -0400
Branch: REL9_4_STABLE [32cdf680f] 2016-09-23 09:54:11 -0400
-->
     <para>
      Use a more random value for the dynamic shared memory control
      segment's ID (Robert Haas, Tom Lane)
     </para>

     <para>
      Previously, the same value would be chosen every time, because it was
      derived from <function>random()</> but <function>srandom()</> had not
      yet been called.  While relatively harmless, this was not the intended
      behavior.
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [419113dfd] 2016-09-20 12:04:41 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [6bcd26c43] 2016-09-20 12:12:27 -0400
Branch: REL9_5_STABLE [c124e3649] 2016-09-20 12:12:31 -0400
Branch: REL9_4_STABLE [c23b2523d] 2016-09-20 12:12:36 -0400
-->
     <para>
      On Windows, retry creation of the dynamic shared memory control
      segment after an access-denied error (Kyotaro Horiguchi, Amit Kapila)
     </para>

     <para>
      Windows sometimes returns <literal>ERROR_ACCESS_DENIED</> rather
      than <literal>ERROR_ALREADY_EXISTS</> when there is an existing
      segment.  This led to postmaster startup failure due to believing that
      the former was an unrecoverable error.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5697522d8] 2016-08-18 14:49:08 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [c81c71d88] 2016-08-18 14:48:51 -0400
Branch: REL9_5_STABLE [a8fc19505] 2016-08-18 14:48:51 -0400
-->
     <para>
      Fix <application>PL/pgSQL</> to not misbehave with parameters and
      local variables of type <type>int2vector</> or <type>oidvector</>
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Don't try to share SSL contexts across multiple connections
      in <application>libpq</> (Heikki Linnakangas)
     </para>

     <para>
      This led to assorted corner-case bugs, particularly when trying to use
      different SSL parameters for different connections.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid corner-case memory leak in <application>libpq</> (Tom Lane)
     </para>

     <para>
      The reported problem involved leaking an error report
      during <function>PQreset()</>, but there might be related cases.
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [3fcc98c99] 2016-09-18 13:46:32 +0300
Branch: REL9_6_STABLE Release: REL9_6_0 [e06728d63] 2016-09-18 13:56:11 +0300
Branch: REL9_5_STABLE [7c177ddc2] 2016-09-18 13:56:52 +0300
Branch: REL9_4_STABLE [d48e10a68] 2016-09-18 13:59:57 +0300
Branch: REL9_3_STABLE [b31f335bf] 2016-09-18 14:00:10 +0300
Branch: REL9_2_STABLE [a4a3fac16] 2016-09-18 14:00:13 +0300
Branch: REL9_1_STABLE [ed29d2de2] 2016-09-18 14:07:30 +0300
-->
     <para>
      Make <application>ecpg</>'s <option>--help</> and <option>--version</>
      options work consistently with our other executables (Haribabu Kommi)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [40c3fe498] 2016-09-19 22:55:43 +0300
Branch: REL9_6_STABLE Release: REL9_6_0 [f65764a04] 2016-09-19 22:55:50 +0300
Branch: REL9_5_STABLE [edb5c4097] 2016-09-19 22:58:03 +0300
Branch: REL9_4_STABLE [476945c45] 2016-09-19 22:59:44 +0300
Branch: master [65c655638] 2016-09-21 13:14:48 +0300
Branch: REL9_6_STABLE Release: REL9_6_0 [93834a20f] 2016-09-21 13:16:02 +0300
Branch: REL9_5_STABLE [b93d37474] 2016-09-21 13:16:20 +0300
Branch: REL9_4_STABLE [f16d4a241] 2016-09-21 13:16:24 +0300
-->
     <para>
      Fix <application>pgbench</>'s calculation of average latency
      (Fabien Coelho)
     </para>

     <para>
      The calculation was incorrect when there were <literal>\sleep</>
      commands in the script, or when the test duration was specified in
      number of transactions rather than total time.
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>pg_upgrade</>, check library loadability in name order
      (Tom Lane)
     </para>

     <para>
      This is a workaround to deal with cross-extension dependencies from
      language transform modules to their base language and data type
      modules.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [12f6eadff] 2016-09-23 13:49:26 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [7e02476f3] 2016-09-23 13:49:26 -0400
Branch: REL9_5_STABLE [96e16d739] 2016-09-23 13:49:26 -0400
Branch: REL9_4_STABLE [912ea1945] 2016-09-23 13:49:27 -0400
Branch: REL9_3_STABLE [f39bb487d] 2016-09-23 13:49:27 -0400
Branch: REL9_2_STABLE [53b29d986] 2016-09-23 13:49:27 -0400
-->
     <para>
      In <application>pg_dump</>, never dump range constructor functions
      (Tom Lane)
     </para>

     <para>
      This oversight led to <application>pg_upgrade</> failures with
      extensions containing range types, due to duplicate creation of the
      constructor functions.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e97e9c57b] 2016-09-08 10:48:03 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [a88cee90f] 2016-09-08 10:48:03 -0400
Branch: REL9_5_STABLE [142a110b3] 2016-09-08 10:48:03 -0400
-->
     <para>
      In <application>pg_dump</> with <option>-C</>,
      suppress <literal>TABLESPACE</> clause of <command>CREATE DATABASE</>
      if <option>--no-tablespaces</> is specified (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Simon Riggs <simon@2ndQuadrant.com>
Branch: master [49340627f] 2016-08-29 12:16:18 +0100
Branch: REL9_6_STABLE Release: REL9_6_0 [216fd7fe7] 2016-08-29 12:18:12 +0100
Branch: REL9_5_STABLE [9050e5c89] 2016-08-29 12:18:57 +0100
Branch: REL9_5_STABLE [3aa233f82] 2016-08-29 18:12:04 -0300
-->
     <para>
      Make <application>pg_receivexlog</> work correctly
      with <option>--synchronous</> without slots (Gabriele Bartolini)
     </para>
    </listitem>

    <listitem>
     <para>
      Disallow specifying both <option>--source-server</>
      and <option>--source-target</> options to <application>pg_rewind</>
      (Michael Banck)
     </para>
    </listitem>

    <listitem>
     <para>
      Make <application>pg_rewind</> turn off <varname>synchronous_commit</>
      in its session on the source server (Michael Banck, Michael Paquier)
     </para>

     <para>
      This allows <application>pg_rewind</> to work even when the source
      server is using synchronous replication that is not working for some
      reason.
     </para>
    </listitem>

    <listitem>
     <para>
      In <application>pg_xlogdump</>, retry opening new WAL segments when
      using <option>--follow</> option (Magnus Hagander)
     </para>

     <para>
      This allows for a possible delay in the server's creation of the next
      segment.
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [bab7823a4] 2016-08-29 14:34:58 +0900
Branch: REL9_6_STABLE Release: REL9_6_0 [2802b02a5] 2016-08-29 14:35:40 +0900
Branch: REL9_5_STABLE [7dfb9b479] 2016-08-29 14:35:51 +0900
Branch: REL9_4_STABLE [314a25fb3] 2016-08-29 14:38:17 +0900
Branch: REL9_3_STABLE [5833306dd] 2016-08-29 15:51:30 +0900
-->
     <para>
      Fix <application>pg_xlogdump</> to cope with a WAL file that begins
      with a continuation record spanning more than one page (Pavan
      Deolasee)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [8a503526e] 2016-09-15 09:30:38 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [bea38f34a] 2016-09-15 09:30:37 -0400
Branch: REL9_5_STABLE [60b6d99da] 2016-09-15 09:30:36 -0400
Branch: REL9_4_STABLE [1336bd986] 2016-09-15 09:22:52 -0400
-->
     <para>
      Fix <filename>contrib/pg_buffercache</> to work
      when <varname>shared_buffers</> exceeds 256GB (KaiGai Kohei)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6657acc01] 2016-08-17 15:51:10 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [d715b76d1] 2016-08-17 15:51:10 -0400
Branch: REL9_5_STABLE [509815ed7] 2016-08-17 15:51:10 -0400
Branch: REL9_4_STABLE [3fa8ec44d] 2016-08-17 15:51:10 -0400
Branch: REL9_3_STABLE [7baa8bfca] 2016-08-17 15:51:10 -0400
Branch: REL9_2_STABLE [60bb1bb12] 2016-08-17 15:51:11 -0400
Branch: REL9_1_STABLE [9942376a5] 2016-08-17 15:51:11 -0400
-->
     <para>
      Fix <filename>contrib/intarray/bench/bench.pl</> to print the results
      of the <command>EXPLAIN</> it does when given the <option>-e</> option
      (Daniel Gustafsson)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [593d4e47d] 2016-09-15 14:42:29 +0300
Branch: REL9_6_STABLE Release: REL9_6_0 [fcd93e4af] 2016-09-15 12:55:38 +0300
Branch: REL9_5_STABLE [e2838c580] 2016-09-15 14:51:42 +0300
Branch: master [5c6df67e0] 2016-09-15 22:52:51 +0300
Branch: REL9_6_STABLE Release: REL9_6_0 [9895818d5] 2016-09-15 22:45:08 +0300
Branch: REL9_5_STABLE [48e5ba61e] 2016-09-15 22:38:01 +0300
-->
     <para>
      Support OpenSSL 1.1.0 (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c3a081846] 2016-09-23 15:50:00 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [5a83e2d4e] 2016-09-23 15:50:00 -0400
Branch: REL9_5_STABLE [025c9a722] 2016-09-23 15:50:00 -0400
Branch: REL9_4_STABLE [5d41f27a9] 2016-09-23 15:50:00 -0400
-->
     <para>
      Install TAP test infrastructure so that it's available for extension
      testing (Craig Ringer)
     </para>

     <para>
      When <productname>PostgreSQL</> has been configured
      with <option>--enable-tap-tests</>, <quote>make install</> will now
      install the Perl support files for TAP testing where PGXS can find
      them.  This allows non-core extensions to
      use <literal>$(prove_check)</> without extra tests.
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [8614b39bc] 2016-09-19 14:25:57 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [156f974f5] 2016-09-19 14:27:04 -0400
Branch: REL9_5_STABLE [52acf020a] 2016-09-19 14:27:08 -0400
Branch: REL9_4_STABLE [ca93b816f] 2016-09-19 14:27:13 -0400
-->
     <para>
      In MSVC builds, include <application>pg_recvlogical</> in a
      client-only installation (MauMau)
     </para>
    </listitem>

    <listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [a79a68562] 2016-08-18 12:32:42 +0200
Branch: REL9_6_STABLE Release: REL9_6_0 [191d45793] 2016-08-18 12:37:55 +0200
Branch: REL9_5_STABLE [a0833b972] 2016-08-18 15:35:12 +0200
Branch: REL9_4_STABLE [1d990cd8c] 2016-08-18 15:35:26 +0200
Branch: REL9_3_STABLE [e8aed974b] 2016-08-18 15:35:36 +0200
Branch: REL9_2_STABLE [35982db49] 2016-08-18 15:35:43 +0200
-->
     <para>
      Update Windows time zone mapping to recognize some time zone names
      added in recent Windows versions (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [39b691f25] 2016-09-02 17:30:02 -0400
Branch: REL9_6_STABLE Release: REL9_6_0 [32c9950b3] 2016-09-02 17:29:31 -0400
Branch: REL9_5_STABLE [73a802a41] 2016-09-02 17:29:31 -0400
Branch: REL9_4_STABLE [7430ac852] 2016-09-02 17:29:32 -0400
Branch: REL9_3_STABLE [ee78d4885] 2016-09-02 17:29:32 -0400
Branch: REL9_2_STABLE [1195b8efe] 2016-09-02 17:29:32 -0400
Branch: REL9_1_STABLE [380dad29d] 2016-09-02 17:29:32 -0400
-->
     <para>
      Prevent failure of obsolete dynamic time zone abbreviations (Tom Lane)
     </para>

     <para>
      If a dynamic time zone abbreviation does not match any entry in the
      referenced time zone, treat it as equivalent to the time zone name.
      This avoids unexpected failures when IANA removes abbreviations from
      their time zone database, as they did in <application>tzdata</>
      release 2016f and seem likely to do again in the future.  The
      consequences were not limited to not recognizing the individual
      abbreviation; any mismatch caused
      the <structname>pg_timezone_abbrevs</> view to fail altogether.
     </para>
    </listitem>

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</> release 2016h
      for DST law changes in Palestine and Turkey, plus historical
      corrections for Turkey and some regions of Russia.
      Switch to numeric abbreviations for some time zones in Antarctica,
      the former Soviet Union, and Sri Lanka.
     </para>

     <para>
      The IANA time zone database previously provided textual abbreviations
      for all time zones, sometimes making up abbreviations that have little
      or no currency among the local population.  They are in process of
      reversing that policy in favor of using numeric UTC offsets in zones
      where there is no evidence of real-world use of an English
      abbreviation.  At least for the time being, <productname>PostgreSQL</>
      will continue to accept such removed abbreviations for timestamp input.
      But they will not be shown in the <structname>pg_timezone_names</>
      view nor used for output.
     </para>

     <para>
      In this update, <literal>AMT</> is no longer shown as being in use to
      mean Armenia Time.  Therefore, we have changed the <literal>Default</>
      abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-4">
  <title>Release 9.5.4</title>

  <formalpara>
  <title>Release date:</title>
  <para>2016-08-11</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.3.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.4</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.2,
    see <xref linkend="release-9-5-2">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f0c7b789a] 2016-08-08 10:33:46 -0400
Branch: REL9_5_STABLE [98b0c6280] 2016-08-08 10:33:46 -0400
Branch: REL9_4_STABLE [f40618092] 2016-08-08 10:33:47 -0400
Branch: REL9_3_STABLE [6c954a6a5] 2016-08-08 10:33:47 -0400
Branch: REL9_2_STABLE [8b32516db] 2016-08-08 10:33:47 -0400
Branch: REL9_1_STABLE [5327b764a] 2016-08-08 10:33:47 -0400
-->
     <para>
      Fix possible mis-evaluation of
      nested <literal>CASE</>-<literal>WHEN</> expressions (Heikki
      Linnakangas, Michael Paquier, Tom Lane)
     </para>

     <para>
      A <literal>CASE</> expression appearing within the test value
      subexpression of another <literal>CASE</> could become confused about
      whether its own test value was null or not.  Also, inlining of a SQL
      function implementing the equality operator used by
      a <literal>CASE</> expression could result in passing the wrong test
      value to functions called within a <literal>CASE</> expression in the
      SQL function's body.  If the test values were of different data
      types, a crash might result; moreover such situations could be abused
      to allow disclosure of portions of server memory.  (CVE-2016-5423)
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [fcd15f135] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [286c8bc64] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [254eb04f1] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [95a6855c5] 2016-08-08 10:07:52 -0400
Branch: REL9_2_STABLE [e8f4922c8] 2016-08-08 10:07:53 -0400
Branch: REL9_1_STABLE [a2385cac1] 2016-08-08 10:07:54 -0400
Branch: master [41f18f021] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [8adff3783] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [6df8ff49d] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [c1b048f49] 2016-08-08 10:07:52 -0400
Branch: REL9_2_STABLE [f1d0b09cf] 2016-08-08 10:07:53 -0400
Branch: REL9_1_STABLE [d2dd5df51] 2016-08-08 10:07:54 -0400
Branch: REL9_2_STABLE [a19edcd24] 2016-08-08 10:07:53 -0400
Branch: REL9_1_STABLE [c761c9fee] 2016-08-08 10:07:54 -0400
Branch: master [bd6537185] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [2e5e90d8d] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [18392ed4a] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [395d565ac] 2016-08-08 10:07:52 -0400
Branch: REL9_2_STABLE [483715529] 2016-08-08 10:07:53 -0400
Branch: REL9_1_STABLE [2d69f5b12] 2016-08-08 10:07:54 -0400
Branch: master [142c24c23] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [ec3aebdbd] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [6bec1a6c8] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [0f679d2c1] 2016-08-08 10:07:52 -0400
Branch: REL9_2_STABLE [ffbdab65d] 2016-08-08 10:07:53 -0400
Branch: REL9_1_STABLE [61c2cd88d] 2016-08-08 10:07:53 -0400
Branch: master [c40071717] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [640768ceb] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [aed038795] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [05abd3bcf] 2016-08-08 10:07:52 -0400
Branch: REL9_2_STABLE [a466ea33c] 2016-08-08 10:07:52 -0400
Branch: REL9_1_STABLE [ba8c4089d] 2016-08-08 10:07:53 -0400
Branch: master [9d924e9a6] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [6655c0757] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [afabfcc0e] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [dfb2d8039] 2016-08-08 10:07:51 -0400
Branch: REL9_2_STABLE [f744e8906] 2016-08-08 10:07:52 -0400
Branch: REL9_1_STABLE [cf7e5f55b] 2016-08-08 10:07:53 -0400
Branch: master [984e5beb3] 2016-08-08 10:07:46 -0400
Branch: REL9_5_STABLE [db951dd19] 2016-08-08 10:07:50 -0400
Branch: REL9_4_STABLE [fed83cdac] 2016-08-08 10:07:51 -0400
Branch: REL9_3_STABLE [a44d71351] 2016-08-08 10:07:51 -0400
Branch: REL9_2_STABLE [0cc3b12d2] 2016-08-08 10:07:52 -0400
Branch: REL9_1_STABLE [aed766ab5] 2016-08-08 10:07:53 -0400
-->
     <para>
      Fix client programs' handling of special characters in database and
      role names (Noah Misch, Nathan Bossart, Michael Paquier)
     </para>

     <para>
      Numerous places in <application>vacuumdb</> and other client programs
      could become confused by database and role names containing double
      quotes or backslashes.  Tighten up quoting rules to make that safe.
      Also, ensure that when a conninfo string is used as a database name
      parameter to these programs, it is correctly treated as such throughout.
     </para>

     <para>
      Fix handling of paired double quotes
      in <application>psql</>'s <command>\connect</>
      and <command>\password</> commands to match the documentation.
     </para>

     <para>
      Introduce a new <option>-reuse-previous</> option
      in <application>psql</>'s <command>\connect</> command to allow
      explicit control of whether to re-use connection parameters from a
      previous connection.  (Without this, the choice is based on whether
      the database name looks like a conninfo string, as before.)  This
      allows secure handling of database names containing special
      characters in <application>pg_dumpall</> scripts.
     </para>

     <para>
      <application>pg_dumpall</> now refuses to deal with database and role
      names containing carriage returns or newlines, as it seems impractical
      to quote those characters safely on Windows.  In future we may reject
      such names on the server side, but that step has not been taken yet.
     </para>

     <para>
      These are considered security fixes because crafted object names
      containing special characters could have been used to execute
      commands with superuser privileges the next time a superuser
      executes <application>pg_dumpall</> or other routine maintenance
      operations.  (CVE-2016-5424)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4452000f3] 2016-07-26 15:25:02 -0400
Branch: REL9_5_STABLE [d2ef7758d] 2016-07-26 15:25:02 -0400
Branch: REL9_4_STABLE [0733188cc] 2016-07-26 15:25:02 -0400
Branch: REL9_3_STABLE [c235d510e] 2016-07-26 15:25:02 -0400
Branch: REL9_2_STABLE [bcdd8a194] 2016-07-26 15:25:02 -0400
Branch: REL9_1_STABLE [d243bf77c] 2016-07-26 15:25:02 -0400
Branch: master [9492cf86e] 2016-07-28 16:09:15 -0400
Branch: REL9_5_STABLE [1e2f96f0a] 2016-07-28 16:09:15 -0400
Branch: REL9_4_STABLE [66f7e4081] 2016-07-28 16:09:15 -0400
Branch: REL9_3_STABLE [069714387] 2016-07-28 16:09:15 -0400
Branch: REL9_2_STABLE [7b8526e5d] 2016-07-28 16:09:15 -0400
Branch: REL9_1_STABLE [c0e5096fc] 2016-07-28 16:09:15 -0400
-->
     <para>
      Fix corner-case misbehaviors for <literal>IS NULL</>/<literal>IS NOT
      NULL</> applied to nested composite values (Andrew Gierth, Tom Lane)
     </para>

     <para>
      The SQL standard specifies that <literal>IS NULL</> should return
      TRUE for a row of all null values (thus <literal>ROW(NULL,NULL) IS
      NULL</> yields TRUE), but this is not meant to apply recursively
      (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</> yields FALSE).
      The core executor got this right, but certain planner optimizations
      treated the test as recursive (thus producing TRUE in both cases),
      and <filename>contrib/postgres_fdw</> could produce remote queries
      that misbehaved similarly.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [eae1ad9b6] 2016-05-23 19:23:36 -0400
Branch: REL9_5_STABLE [e504d915b] 2016-05-23 19:23:36 -0400
-->
     <para>
      Fix <quote>unrecognized node type</> error for <command>INSERT ... ON
      CONFLICT</> within a recursive CTE (a <literal>WITH</> item) (Peter
      Geoghegan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [26e66184d] 2016-05-11 16:20:23 -0400
Branch: REL9_5_STABLE [58d802410] 2016-05-11 16:20:03 -0400
-->
     <para>
      Fix <command>INSERT ... ON CONFLICT</> to successfully match index
      expressions or index predicates that are simplified during the
      planner's expression preprocessing phase (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9c810a2ed] 2016-07-04 16:09:11 -0400
Branch: REL9_5_STABLE [31ce32ade] 2016-07-04 16:09:11 -0400
-->
     <para>
      Correctly handle violations of exclusion constraints that apply to
      the target table of an <literal>INSERT ... ON CONFLICT</> command,
      but are not one of the selected arbiter indexes (Tom Lane)
     </para>

     <para>
      Such a case should raise a normal constraint-violation error, but it
      got into an infinite loop instead.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8a13d5e6d] 2016-05-11 17:06:53 -0400
Branch: REL9_5_STABLE [428484ce1] 2016-05-11 17:06:53 -0400
-->
     <para>
      Fix <command>INSERT ... ON CONFLICT</> to not fail if the target
      table has a unique index on OID (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4c56f3269] 2016-06-16 17:16:32 -0400
Branch: REL9_5_STABLE [a41b14f94] 2016-06-16 17:16:40 -0400
Branch: REL9_4_STABLE [2a8b5d210] 2016-06-16 17:16:44 -0400
Branch: REL9_3_STABLE [519445ba2] 2016-06-16 17:16:48 -0400
Branch: REL9_2_STABLE [f66e0fec3] 2016-06-16 17:16:53 -0400
Branch: REL9_1_STABLE [7b97dafa2] 2016-06-16 17:16:58 -0400
-->
     <para>
      Make the <type>inet</> and <type>cidr</> data types properly reject
      IPv6 addresses with too many colon-separated fields (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [278148907] 2016-07-16 14:42:37 -0400
Branch: REL9_5_STABLE [884bae143] 2016-07-16 14:42:37 -0400
Branch: REL9_4_STABLE [59fa0195c] 2016-07-16 14:42:37 -0400
Branch: REL9_3_STABLE [16e28fcec] 2016-07-16 14:42:37 -0400
Branch: REL9_2_STABLE [89b301104] 2016-07-16 14:42:37 -0400
Branch: REL9_1_STABLE [608cc0c41] 2016-07-16 14:42:37 -0400
-->
     <para>
      Prevent crash in <function>close_ps()</>
      (the <type>point</> <literal>##</> <type>lseg</> operator)
      for NaN input coordinates (Tom Lane)
     </para>

     <para>
      Make it return NULL instead of crashing.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0daeba0e9] 2016-07-01 11:40:33 -0400
Branch: REL9_5_STABLE [40d0bd8d5] 2016-07-01 11:40:22 -0400
Branch: REL9_4_STABLE [b25d87f91] 2016-07-01 11:40:22 -0400
Branch: REL9_3_STABLE [b0f20c2ea] 2016-07-01 11:40:22 -0400
-->
     <para>
      Avoid possible crash in <function>pg_get_expr()</> when inconsistent
      values are passed to it (Michael Paquier, Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [9a46324fd] 2016-08-08 11:12:59 -0400
Branch: REL9_5_STABLE [04cee8f83] 2016-08-08 11:13:25 -0400
Branch: REL9_4_STABLE [20f870fd7] 2016-08-08 11:13:34 -0400
Branch: REL9_3_STABLE [43d7a0af5] 2016-08-08 11:13:40 -0400
Branch: REL9_2_STABLE [b0134fe84] 2016-08-08 11:13:45 -0400
Branch: REL9_1_STABLE [d555d2642] 2016-08-08 11:13:51 -0400
-->
     <para>
      Fix several one-byte buffer over-reads in <function>to_number()</>
      (Peter Eisentraut)
     </para>

     <para>
      In several cases the <function>to_number()</> function would read one
      more character than it should from the input string.  There is a
      small chance of a crash, if the input happens to be adjacent to the
      end of memory.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [874fe3aea] 2016-06-27 15:57:50 -0400
Branch: REL9_5_STABLE [1651b9aa2] 2016-06-27 15:57:21 -0400
Branch: REL9_4_STABLE [dc9e03bf4] 2016-06-27 15:57:21 -0400
Branch: REL9_3_STABLE [17bfef80e] 2016-06-27 15:57:21 -0400
-->
     <para>
      Do not run the planner on the query contained in <literal>CREATE
      MATERIALIZED VIEW</> or <literal>CREATE TABLE AS</>
      when <literal>WITH NO DATA</> is specified (Michael Paquier,
      Tom Lane)
     </para>

     <para>
      This avoids some unnecessary failure conditions, for example if a
      stable function invoked by the materialized view depends on a table
      that doesn't exist yet.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [bfa2ab56b] 2016-07-15 17:49:48 -0700
Branch: REL9_5_STABLE [1f9534b49] 2016-07-15 17:49:48 -0700
Branch: REL9_4_STABLE [3d5b227ba] 2016-07-15 17:49:48 -0700
Branch: REL9_3_STABLE [2e51ae1f6] 2016-07-15 17:49:48 -0700
Branch: REL9_2_STABLE [941557f18] 2016-07-15 17:49:48 -0700
Branch: REL9_1_STABLE [37276017f] 2016-07-15 17:49:49 -0700
-->
     <para>
      Avoid unsafe intermediate state during expensive paths
      through <function>heap_update()</> (Masahiko Sawada, Andres Freund)
     </para>

     <para>
      Previously, these cases locked the target tuple (by setting its XMAX)
      but did not WAL-log that action, thus risking data integrity problems
      if the page were spilled to disk and then a database crash occurred
      before the tuple update could be completed.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [a4d357bfb] 2016-07-15 14:45:37 -0700
Branch: REL9_5_STABLE [b33e81cba] 2016-07-15 14:45:38 -0700
Branch: REL9_4_STABLE [f66828ba6] 2016-07-15 14:50:46 -0700
Branch: REL9_3_STABLE [46acbeb2f] 2016-07-15 14:51:03 -0700
-->
     <para>
      Fix hint bit update during WAL replay of row locking operations
      (Andres Freund)
     </para>

     <para>
      The only known consequence of this problem is that row locks held by
      a prepared, but uncommitted, transaction might fail to be enforced
      after a crash and restart.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [533e9c6b0] 2016-07-15 14:17:20 -0400
Branch: REL9_5_STABLE [649dd1b58] 2016-07-15 14:17:20 -0400
Branch: REL9_4_STABLE [166873dd0] 2016-07-15 14:17:20 -0400
Branch: REL9_3_STABLE [6c243f90a] 2016-07-15 14:17:20 -0400
-->
     <para>
      Avoid unnecessary <quote>could not serialize access</> errors when
      acquiring <literal>FOR KEY SHARE</> row locks in serializable mode
      (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [69f526aa4] 2016-06-03 15:14:50 -0400
Branch: REL9_5_STABLE [a102f98e2] 2016-06-03 15:14:35 -0400
Branch: master [9eaf5be50] 2016-06-03 18:07:14 -0400
Branch: REL9_5_STABLE [8355897ff] 2016-06-03 18:07:14 -0400
-->
     <para>
      Make sure <quote>expanded</> datums returned by a plan node are
      read-only (Tom Lane)
     </para>

     <para>
      This avoids failures in some cases where the result of a lower plan
      node is referenced in multiple places in upper nodes.  So far as
      core <productname>PostgreSQL</> is concerned, only array values
      returned by PL/pgSQL functions are at risk; but extensions might
      use expanded datums for other things.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0b0baf262] 2016-06-16 12:17:38 -0400
Branch: REL9_5_STABLE [4f5995dd9] 2016-06-16 12:17:11 -0400
Branch: REL9_4_STABLE [e542bfe61] 2016-06-16 12:17:16 -0400
Branch: REL9_3_STABLE [29987b2e1] 2016-06-16 12:17:20 -0400
Branch: REL9_2_STABLE [23ed284a5] 2016-06-16 12:17:25 -0400
Branch: master [e45e990e4] 2016-06-22 11:55:18 -0400
Branch: REL9_5_STABLE [f2c28bb1f] 2016-06-22 11:55:24 -0400
Branch: REL9_4_STABLE [f22a3e5ce] 2016-06-22 11:55:28 -0400
Branch: REL9_3_STABLE [dafdcbb6c] 2016-06-22 11:55:32 -0400
Branch: REL9_2_STABLE [dd41661d2] 2016-06-22 11:55:35 -0400
-->
     <para>
      Avoid crash in <literal>postgres -C</> when the specified variable
      has a null string value (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [80b346c20] 2016-07-29 12:52:57 -0400
Branch: REL9_5_STABLE [c8966a925] 2016-07-29 12:53:02 -0400
-->
     <para>
      Prevent unintended waits for the receiver in WAL sender processes
      (Kyotaro Horiguchi)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f8c58554d] 2016-06-30 12:37:02 -0400
Branch: REL9_5_STABLE [8caf9fe62] 2016-06-30 12:37:02 -0400
Branch: REL9_4_STABLE [1843d88e0] 2016-06-30 12:37:02 -0400
-->
     <para>
      Fix possible loss of large subtransactions in logical decoding
      (Petru-Florin Mihancea)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bcbecbce2] 2016-08-07 13:15:55 -0400
Branch: REL9_5_STABLE [71dca408c] 2016-08-07 13:15:55 -0400
Branch: REL9_4_STABLE [c63588feb] 2016-08-07 13:15:55 -0400
-->
     <para>
      Fix failure of logical decoding when a subtransaction contains no
      actual changes (Marko Tiikkaja, Andrew Gierth)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [52e8fc3e2] 2016-05-25 17:48:15 -0400
Branch: REL9_5_STABLE [b2355a29c] 2016-05-25 17:48:15 -0400
Branch: REL9_4_STABLE [4b612a78f] 2016-05-25 17:48:15 -0400
Branch: REL9_3_STABLE [463207630] 2016-05-25 17:48:15 -0400
-->
     <para>
      Ensure that backends see up-to-date statistics for shared catalogs
      (Tom Lane)
     </para>

     <para>
      The statistics collector failed to update the statistics file for
      shared catalogs after a request from a regular backend.  This problem
      was partially masked because the autovacuum launcher regularly makes
      requests that did cause such updates; however, it became obvious with
      autovacuum disabled.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [22b27b4c9] 2016-05-31 15:55:15 -0400
Branch: REL9_5_STABLE [47215c16f] 2016-05-31 15:54:46 -0400
Branch: REL9_4_STABLE [3ffff7257] 2016-05-31 15:54:46 -0400
Branch: REL9_3_STABLE [a84cad224] 2016-05-31 15:54:47 -0400
-->
     <para>
      Avoid redundant writes of the statistics files when multiple
      backends request updates close together (Tom Lane, Tomas Vondra)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [996d27397] 2016-05-24 15:20:36 -0400
Branch: REL9_5_STABLE [a34c3dd50] 2016-05-24 15:20:12 -0400
Branch: REL9_4_STABLE [defe936ef] 2016-05-24 15:20:12 -0400
Branch: REL9_3_STABLE [9f3e4c813] 2016-05-24 15:20:12 -0400
Branch: REL9_2_STABLE [2e7f0c34a] 2016-05-24 15:20:12 -0400
Branch: REL9_1_STABLE [fe1731fca] 2016-05-24 15:20:12 -0400
Branch: master [2d2e40e3b] 2016-05-24 15:47:51 -0400
Branch: REL9_5_STABLE [bbbe2c97e] 2016-05-24 15:47:51 -0400
Branch: REL9_4_STABLE [edd8873ff] 2016-05-24 15:47:51 -0400
Branch: REL9_3_STABLE [ff98ae908] 2016-05-24 15:47:51 -0400
Branch: REL9_2_STABLE [4cf0978ea] 2016-05-24 15:47:51 -0400
Branch: REL9_1_STABLE [5551dac59] 2016-05-24 15:47:51 -0400
-->
     <para>
      Avoid consuming a transaction ID during <command>VACUUM</>
      (Alexander Korotkov)
     </para>

     <para>
      Some cases in <command>VACUUM</> unnecessarily caused an XID to be
      assigned to the current transaction.  Normally this is negligible,
      but if one is up against the XID wraparound limit, consuming more
      XIDs during anti-wraparound vacuums is a very bad thing.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [e3ad3ffa6] 2016-06-24 18:29:28 -0400
Branch: REL9_5_STABLE [d372cb173] 2016-06-24 18:29:28 -0400
Branch: REL9_4_STABLE [61b24fef8] 2016-06-24 18:29:28 -0400
Branch: REL9_3_STABLE [28f294afd] 2016-06-24 18:29:28 -0400
-->
     <para>
      Prevent possible failure when vacuuming multixact IDs in an
      installation that has been pg_upgrade'd from pre-9.3 (Andrew Gierth,
      &Aacute;lvaro Herrera)
     </para>

     <para>
      The usual symptom of this bug is errors
      like <quote>MultiXactId <replaceable>NNN</> has not been created
      yet -- apparent wraparound</quote>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f64340e74] 2016-06-06 17:44:17 -0400
Branch: REL9_5_STABLE [5acc58c5e] 2016-06-06 17:44:17 -0400
Branch: REL9_4_STABLE [a4400c251] 2016-06-06 17:44:17 -0400
Branch: REL9_3_STABLE [5f3e0e84b] 2016-06-06 17:44:17 -0400
Branch: REL9_2_STABLE [3201709de] 2016-06-06 17:44:18 -0400
Branch: REL9_1_STABLE [32ceb8dfb] 2016-06-06 17:44:18 -0400
-->
     <para>
      When a manual <command>ANALYZE</> specifies a column list, don't
      reset the table's <literal>changes_since_analyze</> counter
      (Tom Lane)
     </para>

     <para>
      If we're only analyzing some columns, we should not prevent routine
      auto-analyze from happening for the other columns.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [95bee941b] 2016-08-07 18:52:02 -0400
Branch: REL9_5_STABLE [cb5c14984] 2016-08-07 18:52:02 -0400
Branch: REL9_4_STABLE [8f180a6cc] 2016-08-07 18:52:02 -0400
Branch: REL9_3_STABLE [20a859504] 2016-08-07 18:52:02 -0400
Branch: REL9_2_STABLE [127d73009] 2016-08-07 18:52:02 -0400
Branch: REL9_1_STABLE [a449ad095] 2016-08-07 18:52:02 -0400
-->
     <para>
      Fix <command>ANALYZE</>'s overestimation of <literal>n_distinct</>
      for a unique or nearly-unique column with many null entries (Tom
      Lane)
     </para>

     <para>
      The nulls could get counted as though they were themselves distinct
      values, leading to serious planner misestimates in some types of
      queries.
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [15739393e] 2016-05-10 16:23:54 -0300
Branch: REL9_5_STABLE [7516cdb76] 2016-05-10 16:23:54 -0300
Branch: REL9_4_STABLE [e9a273199] 2016-05-10 16:23:54 -0300
Branch: REL9_3_STABLE [92ebe509e] 2016-05-10 16:23:54 -0300
Branch: REL9_2_STABLE [ca4c6d043] 2016-05-10 16:23:54 -0300
Branch: REL9_1_STABLE [2152762c5] 2016-05-10 16:23:54 -0300
-->
     <para>
      Prevent autovacuum from starting multiple workers for the same shared
      catalog (&Aacute;lvaro Herrera)
     </para>

     <para>
      Normally this isn't much of a problem because the vacuum doesn't take
      long anyway; but in the case of a severely bloated catalog, it could
      result in all but one worker uselessly waiting instead of doing
      useful work on other tables.
     </para>
    </listitem>

    <listitem>
<!--
Author: Kevin Grittner <kgrittn@postgresql.org>
Branch: master [7392eed7c] 2016-06-02 12:23:01 -0500
Branch: REL9_5_STABLE [236d569f9] 2016-06-02 12:23:19 -0500
-->
     <para>
      Fix bug in b-tree mark/restore processing (Kevin Grittner)
     </para>

     <para>
      This error could lead to incorrect join results or assertion failures
      in a merge join whose inner source node is a b-tree indexscan.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e89526d4f] 2016-08-06 14:28:37 -0400
Branch: REL9_5_STABLE [ee5d1de04] 2016-08-06 14:28:37 -0400
Branch: REL9_4_STABLE [98d5f366b] 2016-08-06 14:28:38 -0400
-->
     <para>
      Avoid duplicate buffer lock release when abandoning a b-tree index
      page deletion attempt (Tom Lane)
     </para>

     <para>
      This mistake prevented <command>VACUUM</> from completing in some
      cases involving corrupt b-tree indexes.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8cf739de8] 2016-06-24 16:57:36 -0400
Branch: REL9_5_STABLE [07f69137b] 2016-06-24 16:57:36 -0400
-->
     <para>
      Fix building of large (bigger than <varname>shared_buffers</>)
      hash indexes (Tom Lane)
     </para>

     <para>
      The code path used for large indexes contained a bug causing
      incorrect hash values to be inserted into the index, so that
      subsequent index searches always failed, except for tuples inserted
      into the index after the initial build.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1acf75725] 2016-07-14 18:45:59 -0400
Branch: REL9_5_STABLE [503546376] 2016-07-14 18:46:00 -0400
Branch: REL9_4_STABLE [054052b3a] 2016-07-14 18:46:00 -0400
Branch: REL9_3_STABLE [57dba87a7] 2016-07-14 18:46:00 -0400
Branch: REL9_2_STABLE [042009f24] 2016-07-14 18:46:00 -0400
-->
     <para>
      Prevent infinite loop in GiST index build for geometric columns
      containing NaN component values (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8a859691d] 2016-06-05 11:53:06 -0400
Branch: REL9_5_STABLE [a7aa61ffe] 2016-06-05 11:53:06 -0400
-->
     <para>
      Fix possible crash during a nearest-neighbor (<literal>ORDER BY</>
      distance) indexscan on a <filename>contrib/btree_gist</> index on
      an <type>interval</> column (Peter Geoghegan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [975ad4e60] 2016-05-30 14:47:22 -0400
Branch: REL9_5_STABLE [2973d7d02] 2016-05-30 14:47:22 -0400
-->
     <para>
      Fix <quote>PANIC: failed to add BRIN tuple</> error when attempting
      to update a BRIN index entry (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8d498a5c8] 2016-08-04 16:06:14 -0400
Branch: REL9_5_STABLE [c1d6ee879] 2016-08-04 16:06:14 -0400
-->
     <para>
      Fix possible crash during background worker shutdown (Dmitry Ivanov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [baebab3ac] 2016-07-12 18:07:03 -0400
Branch: REL9_5_STABLE [a0943dbbe] 2016-07-12 18:06:50 -0400
-->
     <para>
      Fix PL/pgSQL's handling of the <literal>INTO</> clause
      within <command>IMPORT FOREIGN SCHEMA</> commands (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [f36ca9af0] 2016-07-17 09:15:37 -0400
Branch: REL9_5_STABLE [fb279fc7a] 2016-07-17 09:24:06 -0400
Branch: REL9_4_STABLE [97d741650] 2016-07-17 09:37:33 -0400
Branch: REL9_3_STABLE [805f2bb53] 2016-07-17 09:38:23 -0400
Branch: REL9_2_STABLE [6c0be49b2] 2016-07-17 09:39:51 -0400
Branch: REL9_1_STABLE [84d679204] 2016-07-17 09:41:08 -0400
-->
     <para>
      Fix <filename>contrib/btree_gin</> to handle the smallest
      possible <type>bigint</> value correctly (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [69dc5ae40] 2016-08-05 18:58:12 -0400
Branch: REL9_5_STABLE [cae0d4f9b] 2016-08-05 18:58:19 -0400
Branch: REL9_4_STABLE [a3cd60ebf] 2016-08-05 18:58:23 -0400
Branch: REL9_3_STABLE [c3107f18a] 2016-08-05 18:58:28 -0400
Branch: REL9_2_STABLE [3e40d9227] 2016-08-05 18:58:32 -0400
Branch: REL9_1_STABLE [1f63b0e09] 2016-08-05 18:58:36 -0400
-->
     <para>
      Teach libpq to correctly decode server version from future servers
      (Peter Eisentraut)
     </para>

     <para>
      It's planned to switch to two-part instead of three-part server
      version numbers for releases after 9.6.  Make sure
      that <function>PQserverVersion()</> returns the correct value for
      such cases.
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [3ebc88e56] 2016-08-01 15:08:12 +0200
Branch: REL9_5_STABLE [dc6b20c6b] 2016-08-01 15:09:23 +0200
Branch: REL9_4_STABLE [057404854] 2016-08-01 15:09:12 +0200
Branch: REL9_3_STABLE [3ca359426] 2016-08-01 15:08:59 +0200
Branch: REL9_2_STABLE [295edbecf] 2016-08-01 15:08:48 +0200
Branch: REL9_1_STABLE [c15f502b6] 2016-08-01 15:08:36 +0200
-->
     <para>
      Fix <application>ecpg</>'s code for <literal>unsigned long long</>
      array elements (Michael Meskes)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e2e95f5ef] 2016-08-02 12:49:40 -0400
Branch: REL9_5_STABLE [89c30d113] 2016-08-02 12:49:41 -0400
Branch: REL9_4_STABLE [2ff8a2fc0] 2016-08-02 12:49:04 -0400
Branch: REL9_3_STABLE [6693c9d7b] 2016-08-02 12:49:09 -0400
Branch: REL9_2_STABLE [a5a7caaa1] 2016-08-02 12:49:15 -0400
-->
     <para>
      In <application>pg_dump</> with both <option>-c</> and <option>-C</>
      options, avoid emitting an unwanted <literal>CREATE SCHEMA public</>
      command (David Johnston, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e652273e0] 2016-06-02 13:28:17 -0400
Branch: REL9_5_STABLE [404429038] 2016-06-02 13:28:18 -0400
Branch: REL9_4_STABLE [96aac0e6d] 2016-06-02 13:27:53 -0400
Branch: REL9_3_STABLE [5c9724305] 2016-06-02 13:27:53 -0400
Branch: master [6c72a28e5] 2016-06-03 11:29:38 -0400
Branch: REL9_5_STABLE [ec5622351] 2016-06-03 11:29:20 -0400
Branch: REL9_4_STABLE [53c2601a5] 2016-06-03 11:29:20 -0400
Branch: REL9_3_STABLE [4a21c6fd7] 2016-06-03 11:29:20 -0400
-->
     <para>
      Improve handling of <systemitem>SIGTERM</>/control-C in
      parallel <application>pg_dump</> and <application>pg_restore</> (Tom
      Lane)
     </para>

     <para>
      Make sure that the worker processes will exit promptly, and also arrange
      to send query-cancel requests to the connected backends, in case they
      are doing something long-running such as a <command>CREATE INDEX</>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9abd64ec9] 2016-05-25 12:40:12 -0400
Branch: REL9_5_STABLE [af6555b80] 2016-05-25 12:39:57 -0400
Branch: REL9_4_STABLE [ea274b2f4] 2016-05-25 12:39:57 -0400
Branch: REL9_3_STABLE [1c8205159] 2016-05-25 12:39:57 -0400
-->
     <para>
      Fix error reporting in parallel <application>pg_dump</>
      and <application>pg_restore</> (Tom Lane)
     </para>

     <para>
      Previously, errors reported by <application>pg_dump</>
      or <application>pg_restore</> worker processes might never make it to
      the user's console, because the messages went through the master
      process, and there were various deadlock scenarios that would prevent
      the master process from passing on the messages.  Instead, just print
      everything to <literal>stderr</>.  In some cases this will result in
      duplicate messages (for instance, if all the workers report a server
      shutdown), but that seems better than no message.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [df8d2d8c4] 2016-05-26 10:50:30 -0400
Branch: REL9_5_STABLE [6479df137] 2016-05-26 10:50:38 -0400
Branch: REL9_4_STABLE [d32bc204c] 2016-05-26 10:50:42 -0400
Branch: REL9_3_STABLE [b9784e1f7] 2016-05-26 10:50:46 -0400
-->
     <para>
      Ensure that parallel <application>pg_dump</>
      or <application>pg_restore</> on Windows will shut down properly
      after an error (Kyotaro Horiguchi)
     </para>

     <para>
      Previously, it would report the error, but then just sit until
      manually stopped by the user.
     </para>
    </listitem>

    <listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [d74048def] 2016-05-26 22:14:23 +0200
Branch: REL9_5_STABLE [47e596976] 2016-05-26 22:18:04 +0200
-->
     <para>
      Make parallel <application>pg_dump</> fail cleanly when run against a
      standby server (Magnus Hagander)
     </para>

     <para>
      This usage is not supported
      unless <option>--no-synchronized-snapshots</> is specified, but the
      error was not handled very well.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cae2bb198] 2016-05-26 11:51:04 -0400
Branch: REL9_5_STABLE [64b296976] 2016-05-26 11:51:11 -0400
Branch: REL9_4_STABLE [f2f18a37c] 2016-05-26 11:51:16 -0400
Branch: REL9_3_STABLE [99565a1ef] 2016-05-26 11:51:20 -0400
-->
     <para>
      Make <application>pg_dump</> behave better when built without zlib
      support (Kyotaro Horiguchi)
     </para>

     <para>
      It didn't work right for parallel dumps, and emitted some rather
      pointless warnings in other cases.
     </para>
    </listitem>

    <listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [74d8c95b7] 2016-08-01 17:36:14 +0900
Branch: REL9_5_STABLE [928e92fda] 2016-08-01 17:37:18 +0900
Branch: REL9_4_STABLE [dbe56f2a1] 2016-08-01 17:37:41 +0900
Branch: REL9_3_STABLE [013f42372] 2016-08-01 17:37:53 +0900
Branch: REL9_2_STABLE [a21617759] 2016-08-01 17:38:00 +0900
Branch: REL9_1_STABLE [366f4a962] 2016-08-01 17:38:05 +0900
-->
     <para>
      Make <application>pg_basebackup</> accept <literal>-Z 0</> as
      specifying no compression (Fujii Masao)
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [e8564ef03] 2016-07-23 20:30:03 -0400
Branch: REL9_5_STABLE [cf35406f9] 2016-07-23 20:30:40 -0400
Branch: REL9_4_STABLE [f0c9e4697] 2016-07-23 20:30:44 -0400
Branch: REL9_3_STABLE [98b7a3cf2] 2016-07-23 20:30:48 -0400
Branch: REL9_2_STABLE [a4daf59ee] 2016-07-23 20:30:55 -0400
Branch: REL9_1_STABLE [b1fa6c0eb] 2016-07-23 20:30:59 -0400
-->
     <para>
      Fix makefiles' rule for building AIX shared libraries to be safe for
      parallel make (Noah Misch)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [30b2731bd] 2016-07-09 16:47:38 -0400
Branch: REL9_5_STABLE [f80395ca1] 2016-07-09 16:47:39 -0400
Branch: REL9_4_STABLE [02a898b00] 2016-07-09 16:47:39 -0400
Branch: REL9_3_STABLE [57e9ea2dd] 2016-07-11 11:24:04 -0400
Branch: REL9_2_STABLE [fdf2ee62e] 2016-07-11 11:24:04 -0400
Branch: REL9_1_STABLE [71af6c006] 2016-07-11 11:24:04 -0400
-->
     <para>
      Fix TAP tests and MSVC scripts to work when build directory's path
      name contains spaces (Michael Paquier, Kyotaro Horiguchi)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9dd4178ce] 2016-05-27 10:40:20 -0400
Branch: REL9_5_STABLE [cea17ba07] 2016-05-27 10:40:20 -0400
Branch: REL9_4_STABLE [c2651cd24] 2016-05-27 10:40:20 -0400
Branch: REL9_3_STABLE [1f1e70a87] 2016-05-27 10:40:20 -0400
-->
     <para>
      Be more predictable about reporting <quote>statement timeout</>
      versus <quote>lock timeout</> (Tom Lane)
     </para>

     <para>
      On heavily loaded machines, the regression tests sometimes failed due
      to reporting <quote>lock timeout</> even though the statement timeout
      should have occurred first.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b3399cb0f] 2016-07-21 13:11:00 -0400
Branch: REL9_5_STABLE [fd507d542] 2016-07-21 13:11:00 -0400
Branch: master [9d7abca90] 2016-07-22 15:41:39 -0400
Branch: REL9_5_STABLE [2aa2533f2] 2016-07-22 15:41:40 -0400
Branch: master [95810ed8e] 2016-07-21 14:24:07 -0400
Branch: REL9_5_STABLE [95e8b44f0] 2016-07-21 14:24:07 -0400
Branch: REL9_4_STABLE [dfddc452d] 2016-07-21 14:24:07 -0400
Branch: REL9_3_STABLE [0060638c8] 2016-07-21 14:24:07 -0400
Branch: REL9_2_STABLE [52502e7a5] 2016-07-21 14:24:07 -0400
Branch: REL9_1_STABLE [f61ecd01e] 2016-07-21 14:24:07 -0400
Branch: master [d70d11915] 2016-07-21 16:52:35 -0400
Branch: REL9_5_STABLE [d365dc3d1] 2016-07-21 16:52:36 -0400
Branch: REL9_4_STABLE [1156a9db8] 2016-07-21 16:52:36 -0400
Branch: REL9_3_STABLE [e15e7886e] 2016-07-21 16:52:36 -0400
Branch: REL9_2_STABLE [a1e750553] 2016-07-21 16:52:36 -0400
Branch: REL9_1_STABLE [ba64aed70] 2016-07-21 16:52:36 -0400
-->
     <para>
      Make regression tests safe for Danish and Welsh locales (Jeff Janes,
      Tom Lane)
     </para>

     <para>
      Change some test data that triggered the unusual sorting rules of
      these locales.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [19d477aa6] 2016-07-19 15:59:36 -0400
Branch: REL9_4_STABLE [590a7f82b] 2016-07-19 15:59:36 -0400
Branch: REL9_3_STABLE [3928132ea] 2016-07-19 15:59:36 -0400
Branch: REL9_2_STABLE [cd951aa61] 2016-07-19 15:59:36 -0400
Branch: REL9_1_STABLE [5db14fad0] 2016-07-19 15:59:36 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [0aabe80c6] 2016-07-19 17:53:31 -0400
Branch: REL9_4_STABLE [bdbcfba35] 2016-07-19 17:53:31 -0400
Branch: REL9_3_STABLE [f102bd868] 2016-07-19 17:53:31 -0400
Branch: REL9_2_STABLE [4d37b7cff] 2016-07-19 17:53:31 -0400
Branch: REL9_1_STABLE [d70df7867] 2016-07-19 17:53:31 -0400
-->
     <para>
      Update our copy of the timezone code to match
      IANA's <application>tzcode</> release 2016c (Tom Lane)
     </para>

     <para>
      This is needed to cope with anticipated future changes in the time
      zone data files.  It also fixes some corner-case bugs in coping with
      unusual time zones.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a629330b2] 2016-08-05 12:59:29 -0400
Branch: REL9_5_STABLE [3fddd6484] 2016-08-05 12:58:38 -0400
Branch: REL9_4_STABLE [8080337b0] 2016-08-05 12:58:46 -0400
Branch: REL9_3_STABLE [5630bd2ec] 2016-08-05 12:58:53 -0400
Branch: REL9_2_STABLE [7822792f7] 2016-08-05 12:58:58 -0400
Branch: REL9_1_STABLE [a44388ffe] 2016-08-05 12:59:02 -0400
-->
     <para>
      Update time zone data files to <application>tzdata</> release 2016f
      for DST law changes in Kemerovo and Novosibirsk, plus historical
      corrections for Azerbaijan, Belarus, and Morocco.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-3">
  <title>Release 9.5.3</title>

  <formalpara>
  <title>Release date:</title>
  <para>2016-05-12</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.2.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.3</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, if you are upgrading from a version earlier than 9.5.2,
    see <xref linkend="release-9-5-2">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [7c7d4fdda] 2016-04-08 14:11:56 -0400
Branch: REL9_5_STABLE [a3c17b2af] 2016-05-06 23:47:42 -0400
Branch: REL9_4_STABLE [e3b14de9f] 2016-05-07 00:10:31 -0400
Branch: REL9_3_STABLE [a9d8644de] 2016-05-07 00:10:17 -0400
Branch: REL9_2_STABLE [e3a493ac0] 2016-05-07 00:05:39 -0400
Branch: REL9_1_STABLE [9b676fd49] 2016-05-07 00:09:37 -0400
-->
     <para>
      Clear the OpenSSL error queue before OpenSSL calls, rather than
      assuming it's clear already; and make sure we leave it clear
      afterwards (Peter Geoghegan, Dave Vitek, Peter Eisentraut)
     </para>

     <para>
      This change prevents problems when there are multiple connections
      using OpenSSL within a single process and not all the code involved
      follows the same rules for when to clear the error queue.
      Failures have been reported specifically when a client application
      uses SSL connections in <application>libpq</> concurrently with
      SSL connections using the PHP, Python, or Ruby wrappers for OpenSSL.
      It's possible for similar problems to arise within the server as well,
      if an extension module establishes an outgoing SSL connection.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [80f66a9ad] 2016-04-21 20:05:58 -0400
Branch: REL9_5_STABLE [94c685a7c] 2016-04-21 20:05:58 -0400
Branch: REL9_4_STABLE [3232c2427] 2016-04-21 20:05:58 -0400
Branch: REL9_3_STABLE [d9742ac46] 2016-04-21 20:05:58 -0400
Branch: REL9_2_STABLE [ad2d32b57] 2016-04-21 20:05:58 -0400
Branch: REL9_1_STABLE [6882dbd34] 2016-04-21 20:05:58 -0400
-->
     <para>
      Fix <quote>failed to build any <replaceable>N</>-way joins</quote>
      planner error with a full join enclosed in the right-hand side of a
      left join (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [207d5a656] 2016-04-29 20:19:38 -0400
Branch: REL9_5_STABLE [f25d0619c] 2016-04-29 20:19:38 -0400
Branch: REL9_4_STABLE [72edc8ffe] 2016-04-29 20:19:38 -0400
Branch: REL9_3_STABLE [67349e5a8] 2016-04-29 20:19:38 -0400
Branch: REL9_2_STABLE [f02cb8c9a] 2016-04-29 20:19:38 -0400
-->
     <para>
      Fix incorrect handling of equivalence-class tests in multilevel
      nestloop plans (Tom Lane)
     </para>

     <para>
      Given a three-or-more-way equivalence class of variables, such
      as <literal>X.X = Y.Y = Z.Z</>, it was possible for the planner to omit
      some of the tests needed to enforce that all the variables are actually
      equal, leading to join rows being output that didn't satisfy
      the <literal>WHERE</> clauses.  For various reasons, erroneous plans
      were seldom selected in practice, so that this bug has gone undetected
      for a long time.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [abb164655] 2016-04-21 23:17:36 -0400
Branch: REL9_5_STABLE [81deadd31] 2016-04-21 23:17:36 -0400
-->
     <para>
      Fix corner-case parser failures occurring
      when <xref linkend="guc-operator-precedence-warning"> is turned on
      (Tom Lane)
     </para>

     <para>
      An example is that <literal>SELECT (ARRAY[])::text[]</> gave an error,
      though it worked without the parentheses.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f0e766bd7] 2016-04-15 00:02:26 -0400
Branch: REL9_5_STABLE [edd57377f] 2016-04-15 00:02:26 -0400
Branch: REL9_4_STABLE [0479eccdc] 2016-04-15 00:02:26 -0400
-->
     <para>
      Fix query-lifespan memory leak in GIN index scans (Julien Rouhaud)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bde361fef] 2016-04-20 14:25:15 -0400
Branch: REL9_5_STABLE [be2754456] 2016-04-20 14:25:15 -0400
Branch: REL9_4_STABLE [ef35afa35] 2016-04-20 14:25:15 -0400
-->
     <para>
      Fix query-lifespan memory leak and potential index corruption hazard in
      GIN index insertion (Tom Lane)
     </para>

     <para>
      The memory leak would typically not amount to much in simple queries,
      but it could be very substantial during a large GIN index build with
      high <varname>maintenance_work_mem</>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d136d600f] 2016-05-06 12:09:20 -0400
Branch: REL9_5_STABLE [504af1fe0] 2016-05-06 12:09:20 -0400
Branch: REL9_4_STABLE [1180868d1] 2016-05-06 12:09:20 -0400
Branch: REL9_3_STABLE [462456d8d] 2016-05-06 12:09:20 -0400
Branch: REL9_2_STABLE [11247dd99] 2016-05-06 12:09:20 -0400
Branch: REL9_1_STABLE [7bad282c3] 2016-05-06 12:09:20 -0400
-->
     <para>
      Fix possible misbehavior of <literal>TH</>, <literal>th</>,
      and <literal>Y,YYY</> format codes in <function>to_timestamp()</>
      (Tom Lane)
     </para>

     <para>
      These could advance off the end of the input string, causing subsequent
      format codes to read garbage.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1f7c85b82] 2016-04-21 14:20:30 -0400
Branch: REL9_5_STABLE [4b52cc289] 2016-04-21 14:20:18 -0400
Branch: REL9_4_STABLE [679c92238] 2016-04-21 14:20:18 -0400
Branch: REL9_3_STABLE [e5882f26b] 2016-04-21 14:20:18 -0400
Branch: REL9_2_STABLE [c7c145e4f] 2016-04-21 14:20:18 -0400
Branch: REL9_1_STABLE [663624e60] 2016-04-21 14:20:18 -0400
-->
     <para>
      Fix dumping of rules and views in which the <replaceable>array</>
      argument of a <literal><replaceable>value</> <replaceable>operator</>
      ANY (<replaceable>array</>)</literal> construct is a sub-SELECT
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [99f3b5613] 2016-04-04 18:05:23 -0400
Branch: REL9_5_STABLE [f3d17491c] 2016-04-04 18:05:23 -0400
Branch: REL9_4_STABLE [28148e258] 2016-04-04 18:05:24 -0400
-->
     <para>
      Disallow newlines in <command>ALTER SYSTEM</> parameter values
      (Tom Lane)
     </para>

     <para>
      The configuration-file parser doesn't support embedded newlines in
      string literals, so we mustn't allow them in values to be inserted
      by <command>ALTER SYSTEM</>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8f1911d5e] 2016-04-15 12:11:40 -0400
Branch: REL9_5_STABLE [8f8e65d34] 2016-04-15 12:11:27 -0400
Branch: REL9_4_STABLE [8eed31ffb] 2016-04-15 12:11:27 -0400
-->
     <para>
      Fix <command>ALTER TABLE ... REPLICA IDENTITY USING INDEX</> to
      work properly if an index on OID is selected (David Rowley)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [93c301fc4] 2016-04-08 12:31:53 -0400
Branch: REL9_5_STABLE [0da7cf6e8] 2016-04-08 12:31:42 -0400
-->
     <para>
      Avoid possible misbehavior after failing to remove a tablespace symlink
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6a3d3965d] 2016-04-14 19:42:21 -0400
Branch: REL9_5_STABLE [e7a456174] 2016-04-14 19:42:22 -0400
Branch: REL9_4_STABLE [00456911f] 2016-04-14 19:42:22 -0400
-->
     <para>
      Fix crash in logical decoding on alignment-picky platforms (Tom Lane,
      Andres Freund)
     </para>

     <para>
      The failure occurred only with a transaction large enough to spill to
      disk and a primary-key change within that transaction.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [59455018a] 2016-04-28 22:11:18 -0700
Branch: REL9_5_STABLE [2e1b4adf3] 2016-04-28 22:11:18 -0700
Branch: REL9_4_STABLE [596f93605] 2016-04-28 22:11:18 -0700
-->
     <para>
      Avoid repeated requests for feedback from receiver while shutting down
      walsender (Nick Cleaton)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cbabb70f3] 2016-04-20 23:48:13 -0400
Branch: REL9_5_STABLE [0b8e0bf0a] 2016-04-20 23:48:13 -0400
Branch: REL9_4_STABLE [f05ac711b] 2016-04-20 23:48:13 -0400
Branch: REL9_3_STABLE [691073bd8] 2016-04-20 23:48:13 -0400
Branch: REL9_2_STABLE [1b22368ff] 2016-04-20 23:48:13 -0400
Branch: REL9_1_STABLE [4c1c9f80b] 2016-04-20 23:48:13 -0400
-->
     <para>
      Make <application>pg_regress</> use a startup timeout from the
      <envar>PGCTLTIMEOUT</> environment variable, if that's set (Tom Lane)
     </para>

     <para>
      This is for consistency with a behavior recently added
      to <application>pg_ctl</>; it eases automated testing on slow machines.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6cead413b] 2016-04-13 18:58:14 -0400
Branch: REL9_5_STABLE [fb0f63933] 2016-04-13 18:57:52 -0400
Branch: REL9_4_STABLE [5daf1012a] 2016-04-13 18:57:52 -0400
Branch: REL9_3_STABLE [34bf6bc56] 2016-04-13 18:57:52 -0400
Branch: REL9_2_STABLE [6bb42d520] 2016-04-13 18:57:52 -0400
Branch: REL9_1_STABLE [3ef1f3a3e] 2016-04-13 18:57:52 -0400
-->
     <para>
      Fix <application>pg_upgrade</> to correctly restore extension
      membership for operator families containing only one operator class
      (Tom Lane)
     </para>

     <para>
      In such a case, the operator family was restored into the new database,
      but it was no longer marked as part of the extension.  This had no
      immediate ill effects, but would cause later <application>pg_dump</>
      runs to emit output that would cause (harmless) errors on restore.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1a2c17f8e] 2016-05-06 22:05:56 -0400
Branch: REL9_5_STABLE [196870f2f] 2016-05-06 22:05:51 -0400
Branch: REL9_4_STABLE [e1aecebc0] 2016-05-06 22:05:51 -0400
Branch: REL9_3_STABLE [e1d88f983] 2016-05-06 22:05:51 -0400
-->
     <para>
      Fix <application>pg_upgrade</> to not fail when new-cluster TOAST rules
      differ from old (Tom Lane)
     </para>

     <para>
      <application>pg_upgrade</> had special-case code to handle the
      situation where the new <productname>PostgreSQL</> version thinks that
      a table should have a TOAST table while the old version did not.  That
      code was broken, so remove it, and instead do nothing in such cases;
      there seems no reason to believe that we can't get along fine without
      a TOAST table if that was okay according to the old version's rules.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [213c7df03] 2016-04-26 21:53:58 -0400
Branch: REL9_5_STABLE [f9989482d] 2016-04-26 21:54:07 -0400
-->
     <para>
      Fix atomic operations for PPC when using IBM's XLC compiler (Noah Misch)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [75c24d0f7] 2016-04-18 13:33:06 -0400
Branch: REL9_5_STABLE [c6a5b6677] 2016-04-18 13:33:07 -0400
Branch: REL9_4_STABLE [21b7f49eb] 2016-04-18 13:33:07 -0400
Branch: REL9_3_STABLE [6ec1ff852] 2016-04-18 13:33:07 -0400
Branch: REL9_2_STABLE [b24f7e280] 2016-04-18 13:33:07 -0400
-->
     <para>
      Reduce the number of SysV semaphores used by a build configured with
      <option>--disable-spinlocks</> (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0ab3595e5] 2016-04-23 16:53:15 -0400
Branch: REL9_5_STABLE [bdf7744f7] 2016-04-23 16:53:15 -0400
Branch: REL9_4_STABLE [2a715371c] 2016-04-23 16:53:15 -0400
Branch: REL9_3_STABLE [252c35895] 2016-04-23 16:53:15 -0400
Branch: REL9_2_STABLE [0f5491283] 2016-04-23 16:53:15 -0400
Branch: REL9_1_STABLE [cbff4b708] 2016-04-23 16:53:15 -0400
-->
     <para>
      Rename internal function <function>strtoi()</>
      to <function>strtoint()</> to avoid conflict with a NetBSD library
      function (Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [20d4428f0] 2016-04-21 15:44:18 -0400
Branch: REL9_4_STABLE [5e2fb8862] 2016-04-21 15:44:18 -0400
Branch: REL9_3_STABLE [8f9518414] 2016-04-21 15:44:18 -0400
Branch: REL9_2_STABLE [6848827b4] 2016-04-21 15:44:18 -0400
Branch: REL9_1_STABLE [b2bb59bd5] 2016-04-21 15:44:18 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [125ad539a] 2016-04-21 16:58:47 -0400
Branch: REL9_5_STABLE [d2e59cbc3] 2016-04-21 16:58:59 -0400
Branch: REL9_4_STABLE [56dee70d9] 2016-04-21 16:59:04 -0400
Branch: REL9_3_STABLE [82bf369ed] 2016-04-21 16:59:08 -0400
Branch: REL9_2_STABLE [b5ebc513d] 2016-04-21 16:59:13 -0400
Branch: REL9_1_STABLE [9028f404e] 2016-04-21 16:59:17 -0400
-->
     <para>
      Fix reporting of errors from <function>bind()</>
      and <function>listen()</> system calls on Windows (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [01a07e6c1] 2016-04-08 12:37:20 -0400
Branch: REL9_5_STABLE [849167943] 2016-04-08 12:36:59 -0400
Branch: REL9_4_STABLE [f79a7fa90] 2016-04-08 12:29:31 -0400
Branch: REL9_3_STABLE [ca5d6edbf] 2016-04-08 12:29:34 -0400
Branch: REL9_2_STABLE [9e77d0e3c] 2016-04-08 12:29:36 -0400
Branch: REL9_1_STABLE [d2189a802] 2016-04-08 12:33:29 -0400
-->
     <para>
      Reduce verbosity of compiler output when building with Microsoft Visual
      Studio (Christian Ullrich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [0fb54de9a] 2016-04-29 08:09:07 -0400
Branch: REL9_5_STABLE [da52474f3] 2016-04-29 08:06:25 -0400
Branch: master [7dc549238] 2016-04-29 09:49:31 -0400
Branch: REL9_5_STABLE [b71b4d852] 2016-04-29 09:50:38 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [23b09e15b] 2016-04-28 11:50:58 -0400
Branch: REL9_5_STABLE [94a16531b] 2016-04-28 11:51:08 -0400
Branch: REL9_4_STABLE [65c2eeb00] 2016-04-28 11:51:13 -0400
Branch: REL9_3_STABLE [707c44fe2] 2016-04-28 11:51:17 -0400
Branch: REL9_2_STABLE [c563d97c6] 2016-04-28 11:51:22 -0400
Branch: REL9_1_STABLE [a6c6789c4] 2016-04-28 11:51:26 -0400
-->
     <para>
      Support building with Visual Studio 2015
      (Michael Paquier, Petr Jel&iacute;nek)
     </para>

     <para>
      Note that builds made with VS2015 will not run on Windows versions
      before Windows Vista.
     </para>
    </listitem>

    <listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [9f633b404] 2016-04-22 05:18:59 -0400
Branch: REL9_5_STABLE [409c49c64] 2016-04-22 05:19:57 -0400
Branch: REL9_4_STABLE [c238a4101] 2016-04-22 05:20:07 -0400
Branch: REL9_3_STABLE [ab5c6d01f] 2016-04-22 05:20:18 -0400
-->
     <para>
      Fix <function>putenv()</> to work properly with Visual Studio 2013
      (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7abc15716] 2016-03-29 11:55:19 -0400
Branch: REL9_5_STABLE [491e84738] 2016-03-29 11:54:57 -0400
Branch: REL9_4_STABLE [2fed676c9] 2016-03-29 11:54:57 -0400
Branch: REL9_3_STABLE [11cc7bb88] 2016-03-29 11:54:57 -0400
Branch: REL9_2_STABLE [b4b06931e] 2016-03-29 11:54:58 -0400
Branch: REL9_1_STABLE [6cd30292b] 2016-03-29 11:54:58 -0400
-->
     <para>
      Avoid possibly-unsafe use of Windows' <function>FormatMessage()</>
      function (Christian Ullrich)
     </para>

     <para>
      Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</> flag where
      appropriate.  No live bug is known to exist here, but it seems like a
      good idea to be careful.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [98f158e41] 2016-05-05 20:08:58 -0400
Branch: REL9_5_STABLE [4edbb265c] 2016-05-05 20:09:10 -0400
Branch: REL9_4_STABLE [a5148e800] 2016-05-05 20:09:17 -0400
Branch: REL9_3_STABLE [d30c67af8] 2016-05-05 20:09:22 -0400
Branch: REL9_2_STABLE [29d154e36] 2016-05-05 20:09:27 -0400
Branch: REL9_1_STABLE [bfc39da64] 2016-05-05 20:09:32 -0400
-->
     <para>
      Update time zone data files to <application>tzdata</> release 2016d
      for DST law changes in Russia and Venezuela.  There are new zone
      names <literal>Europe/Kirov</> and <literal>Asia/Tomsk</> to reflect
      the fact that these regions now have different time zone histories from
      adjacent regions.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-2">
  <title>Release 9.5.2</title>

  <formalpara>
  <title>Release date:</title>
  <para>2016-03-31</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.1.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.2</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>

   <para>
    However, you may need to <command>REINDEX</> some indexes after applying
    the update, as per the first changelog entry below.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [3df9c374e] 2016-03-23 16:03:13 -0400
Branch: REL9_5_STABLE [8aa6e9780] 2016-03-23 16:04:35 -0400
-->

    <listitem>
     <para>
      Disable abbreviated keys for string sorting in non-<literal>C</>
      locales (Robert Haas)
     </para>

     <para>
      <productname>PostgreSQL</> 9.5 introduced logic for speeding up
      comparisons of string data types by using the standard C library
      function <function>strxfrm()</> as a substitute
      for <function>strcoll()</>.  It now emerges that most versions of
      glibc (Linux's implementation of the C library) have buggy
      implementations of <function>strxfrm()</> that, in some locales,
      can produce string comparison results that do not
      match <function>strcoll()</>.  Until this problem can be better
      characterized, disable the optimization in all non-<literal>C</>
      locales.  (<literal>C</> locale is safe since it uses
      neither <function>strcoll()</> nor <function>strxfrm()</>.)
     </para>

     <para>
      Unfortunately, this problem affects not only sorting but also entry
      ordering in B-tree indexes, which means that B-tree indexes
      on <type>text</>, <type>varchar</>, or <type>char</> columns may now
      be corrupt if they sort according to an affected locale and were
      built or modified under <productname>PostgreSQL</> 9.5.0 or 9.5.1.
      Users should <command>REINDEX</> indexes that might be affected.
     </para>

     <para>
      It is not possible at this time to give an exhaustive list of
      known-affected locales.  <literal>C</> locale is known safe, and
      there is no evidence of trouble in English-based locales such
      as <literal>en_US</>, but some other popular locales such
      as <literal>de_DE</> are affected in most glibc versions.
     </para>
    </listitem>

<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [86ebf30fd] 2016-03-28 09:03:20 -0400
Branch: REL9_5_STABLE [db69e58a0] 2016-03-28 09:03:41 -0400
-->

    <listitem>
     <para>
      Maintain row-security status properly in cached plans (Stephen Frost)
     </para>

     <para>
      In a session that performs queries as more than one role, the plan
      cache might incorrectly re-use a plan that was generated for another
      role ID, thus possibly applying the wrong set of policies when
      row-level security (RLS) is in use.
      (CVE-2016-2193)
     </para>
    </listitem>

<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [3e1338475] 2016-03-28 10:57:42 -0300
Branch: REL9_5_STABLE [bf78a6f10] 2016-03-28 10:57:46 -0300
-->

    <listitem>
     <para>
      Add must-be-superuser checks to some
      new <filename>contrib/pageinspect</> functions (Andreas Seltenreich)
     </para>

     <para>
      Most functions in the <filename>pageinspect</> extension that
      inspect <type>bytea</> values disallow calls by non-superusers,
      but <function>brin_page_type()</> and <function>brin_metapage_info()</>
      failed to do so.  Passing contrived <type>bytea</> values to them might
      crash the server or disclose a few bytes of server memory.  Add the
      missing permissions checks to prevent misuse.
      (CVE-2016-3065)
     </para>
    </listitem>

<!--
Author: Simon Riggs <simon@2ndQuadrant.com>
Branch: master [c7111d11b] 2016-03-03 09:53:43 +0000
Branch: REL9_5_STABLE [bf7ced5e2] 2016-03-03 09:50:38 +0000
-->

    <listitem>
     <para>
      Fix incorrect handling of indexed <literal>ROW()</> comparisons
      (Simon Riggs)
     </para>

     <para>
      Flaws in a minor optimization introduced in 9.5 caused incorrect
      results if the <literal>ROW()</> comparison matches the index ordering
      partially but not exactly (for example, differing column order, or the
      index contains both <literal>ASC</> and <literal>DESC</> columns).
      Pending a better solution, the optimization has been removed.
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a298a1e06] 2016-03-09 14:51:22 -0500
Branch: REL9_5_STABLE [b2ce9485b] 2016-03-09 14:51:01 -0500
Branch: REL9_4_STABLE [da936200d] 2016-03-09 14:51:01 -0500
Branch: REL9_3_STABLE [1ab7a160f] 2016-03-09 14:51:01 -0500
Branch: REL9_2_STABLE [c8e059724] 2016-03-09 14:51:01 -0500
Branch: REL9_1_STABLE [d485d9581] 2016-03-09 14:51:02 -0500
-->

    <listitem>
     <para>
      Fix incorrect handling of NULL index entries in
      indexed <literal>ROW()</> comparisons (Tom Lane)
     </para>

     <para>
      An index search using a row comparison such as <literal>ROW(a, b) &gt;
      ROW('x', 'y')</> would stop upon reaching a NULL entry in
      the <structfield>b</> column, ignoring the fact that there might be
      non-NULL <structfield>b</> values associated with later values
      of <structfield>a</>.
     </para>
    </listitem>

<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [1d4a0ab19] 2016-03-09 18:53:53 -0800
Branch: REL9_5_STABLE [301cc3549] 2016-03-09 18:53:53 -0800
Branch: REL9_4_STABLE [4f37d0916] 2016-03-09 18:53:54 -0800
Branch: REL9_3_STABLE [bfa282a02] 2016-03-09 18:53:54 -0800
Branch: REL9_2_STABLE [ce8f42919] 2016-03-09 18:53:54 -0800
Branch: REL9_1_STABLE [a62714fae] 2016-03-09 18:53:54 -0800
Branch: master [606e0f984] 2016-03-09 18:53:53 -0800
Branch: REL9_5_STABLE [63b06e8fa] 2016-03-09 18:53:53 -0800
Branch: REL9_4_STABLE [43b491a81] 2016-03-09 18:53:54 -0800
Branch: REL9_3_STABLE [e069848a3] 2016-03-09 18:53:54 -0800
Branch: REL9_2_STABLE [c224d44f7] 2016-03-09 18:53:54 -0800
Branch: REL9_1_STABLE [d0e47bcd4] 2016-03-09 18:53:54 -0800
-->

    <listitem>
     <para>
      Avoid unlikely data-loss scenarios due to renaming files without
      adequate <function>fsync()</> calls before and after (Michael Paquier,
      Tomas Vondra, Andres Freund)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [71404af2a] 2016-03-22 17:56:20 -0400
Branch: REL9_5_STABLE [d8d5a00b1] 2016-03-22 17:56:06 -0400
-->

    <listitem>
     <para>
      Fix incorrect behavior when rechecking a just-modified row in a query
      that does <command>SELECT FOR UPDATE/SHARE</> and contains some
      relations that need not be locked (Tom Lane)
     </para>

     <para>
      Rows from non-locked relations were incorrectly treated as containing
      all NULLs during the recheck, which could result in incorrectly
      deciding that the updated row no longer passes the <literal>WHERE</>
      condition, or in incorrectly outputting NULLs.
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a9d199f6d] 2016-03-02 23:31:39 -0500
Branch: REL9_5_STABLE [429d68465] 2016-03-02 23:31:39 -0500
Branch: REL9_4_STABLE [597e41e45] 2016-03-02 23:31:39 -0500
-->

    <listitem>
     <para>
      Fix bug in <function>json_to_record()</> when a field of its input
      object contains a sub-object with a field name matching one of the
      requested output column names (Tom Lane)
     </para>
    </listitem>

<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [94c745eb1] 2016-02-21 10:30:49 -0500
Branch: REL9_5_STABLE [68d68ff83] 2016-02-21 10:40:39 -0500
-->

    <listitem>
     <para>
      Fix nonsense result from two-argument form
      of <function>jsonb_object()</> when called with empty arrays
      (Michael Paquier, Andrew Dunstan)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [384dfbde1] 2016-03-23 10:43:13 -0400
Branch: REL9_5_STABLE [5f95521b3] 2016-03-23 10:43:24 -0400
-->

    <listitem>
     <para>
      Fix misbehavior in <function>jsonb_set()</> when converting a path
      array element into an integer for use as an array subscript
      (Michael Paquier)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [55c3a04d6] 2016-03-17 15:50:33 -0400
Branch: REL9_5_STABLE [d0a585c69] 2016-03-17 15:50:33 -0400
Branch: REL9_4_STABLE [17a250b18] 2016-03-17 15:50:33 -0400
-->

    <listitem>
     <para>
      Fix misformatting of negative time zone offsets
      by <function>to_char()</>'s <literal>OF</> format code
      (Thomas Munro, Tom Lane)
     </para>
    </listitem>

<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [fd658dbb3] 2016-03-15 18:04:39 -0400
Branch: REL9_5_STABLE [3f14d8d59] 2016-03-15 18:04:48 -0400
-->

    <listitem>
     <para>
      Fix possible incorrect logging of waits done by
      <command>INSERT ... ON CONFLICT</> (Peter Geoghegan)
     </para>

     <para>
      Log messages would sometimes claim that the wait was due to an
      exclusion constraint although no such constraint was responsible.
     </para>
    </listitem>

<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [d34794f7d] 2016-03-06 02:29:04 +0900
Branch: REL9_5_STABLE [f95f1ce00] 2016-03-06 02:43:17 +0900
Branch: REL9_4_STABLE [a9613ee69] 2016-03-06 02:43:26 +0900
-->

    <listitem>
     <para>
      Ignore <xref linkend="recovery-min-apply-delay"> parameter until
      recovery has reached a consistent state (Michael Paquier)
     </para>

     <para>
      Previously, standby servers would delay application of WAL records in
      response to <varname>recovery_min_apply_delay</> even while replaying
      the initial portion of WAL needed to make their database state valid.
      Since the standby is useless until it's reached a consistent database
      state, this was deemed unhelpful.
     </para>
    </listitem>

<!--
Author: Simon Riggs <simon@2ndQuadrant.com>
Branch: master [481725c0b] 2016-02-19 08:31:12 +0000
Branch: REL9_5_STABLE [c479024d3] 2016-02-19 08:31:39 +0000
Branch: REL9_4_STABLE [6830cae5f] 2016-02-19 08:32:28 +0000
Branch: REL9_3_STABLE [71e3cff2e] 2016-02-19 08:33:33 +0000
Branch: REL9_2_STABLE [c063d3c43] 2016-02-19 08:33:52 +0000
Branch: REL9_1_STABLE [ca32f125b] 2016-02-19 08:35:02 +0000
-->

    <listitem>
     <para>
      Correctly handle cases where <literal>pg_subtrans</> is close to XID
      wraparound during server startup (Jeff Janes)
     </para>
    </listitem>

<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [c8f621c43] 2016-03-05 18:02:20 -0800
Branch: REL9_5_STABLE [5990a034a] 2016-03-05 18:02:20 -0800
Branch: REL9_4_STABLE [3b94b3a49] 2016-03-05 18:02:20 -0800
Branch: master [fd45d16f6] 2016-03-06 16:27:20 -0800
Branch: REL9_5_STABLE [5d1826fe7] 2016-03-06 16:27:20 -0800
Branch: REL9_4_STABLE [fb3ea0465] 2016-03-06 16:27:20 -0800
Branch: master [b63bea5fd] 2016-03-07 14:24:03 -0800
Branch: REL9_5_STABLE [250e5bd71] 2016-03-07 14:24:52 -0800
Branch: REL9_4_STABLE [e3e84fd35] 2016-03-07 14:24:58 -0800
Author: Andres Freund <andres@anarazel.de>
Branch: master [0bda14d54] 2016-03-05 18:02:20 -0800
Branch: REL9_5_STABLE [e76e365be] 2016-03-05 18:02:20 -0800
Branch: REL9_4_STABLE [a50f50a65] 2016-03-05 18:02:20 -0800
Author: Andres Freund <andres@anarazel.de>
Branch: master [d9e903f3c] 2016-03-05 18:02:20 -0800
Branch: REL9_5_STABLE [6e759cefe] 2016-03-05 18:02:20 -0800
Branch: REL9_4_STABLE [465dd92d9] 2016-03-05 18:02:20 -0800
Author: Andres Freund <andres@anarazel.de>
Branch: master [7c17aac69] 2016-03-02 23:42:21 -0800
Branch: REL9_5_STABLE [f8a75881f] 2016-03-02 23:43:42 -0800
-->

    <listitem>
     <para>
      Fix assorted bugs in logical decoding (Andres Freund)
     </para>

     <para>
      Trouble cases included tuples larger than one page when replica
      identity is <literal>FULL</>, <command>UPDATE</>s that change a
      primary key within a transaction large enough to be spooled to disk,
      incorrect reports of <quote>subxact logged without previous toplevel
      record</>, and incorrect reporting of a transaction's commit time.
     </para>
    </listitem>

<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Branch: master [41fedc246] 2016-02-29 12:28:06 +0000
Branch: REL9_5_STABLE [f1dfcf63d] 2016-02-29 12:31:25 +0000
Branch: REL9_4_STABLE [9b69d5c1d] 2016-02-29 12:34:33 +0000
-->

    <listitem>
     <para>
      Fix planner error with nested security barrier views when the outer
      view has a <literal>WHERE</> clause containing a correlated subquery
      (Dean Rasheed)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ab4ff2889] 2016-03-13 16:44:31 -0400
Branch: REL9_5_STABLE [aa9c4e71c] 2016-03-13 16:44:10 -0400
-->

    <listitem>
     <para>
      Fix memory leak in GIN index searches (Tom Lane)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [907e4dd2b] 2016-02-28 23:39:20 -0500
Branch: REL9_5_STABLE [2d43c45e9] 2016-02-28 23:40:04 -0500
Branch: REL9_4_STABLE [80c925c7b] 2016-02-28 23:40:13 -0500
Branch: REL9_3_STABLE [0c4457de8] 2016-02-28 23:40:21 -0500
Branch: REL9_2_STABLE [47792639c] 2016-02-28 23:40:28 -0500
Branch: REL9_1_STABLE [7d6c58aa1] 2016-02-28 23:40:35 -0500
-->

    <listitem>
     <para>
      Fix corner-case crash due to trying to free <function>localeconv()</>
      output strings more than once (Tom Lane)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b3e05097e] 2016-03-06 19:20:55 -0500
Branch: REL9_5_STABLE [c2d61adc3] 2016-03-06 19:21:03 -0500
Branch: REL9_4_STABLE [3fa4715c5] 2016-03-06 19:21:03 -0500
Branch: REL9_3_STABLE [a35f85a52] 2016-03-06 19:21:03 -0500
Branch: REL9_2_STABLE [8894c9f79] 2016-03-06 19:21:03 -0500
Branch: REL9_1_STABLE [fe747b741] 2016-03-06 19:21:03 -0500
-->

    <listitem>
     <para>
      Fix parsing of affix files for <literal>ispell</> dictionaries
      (Tom Lane)
     </para>

     <para>
      The code could go wrong if the affix file contained any characters
      whose byte length changes during case-folding, for
      example <literal>I</> in Turkish UTF8 locales.
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [51e78ab4f] 2016-02-10 19:30:11 -0500
Branch: REL9_5_STABLE [b10635bb5] 2016-02-10 19:30:11 -0500
Branch: REL9_4_STABLE [19e469410] 2016-02-10 19:30:12 -0500
Branch: REL9_3_STABLE [24ce5754a] 2016-02-10 19:30:12 -0500
Branch: REL9_2_STABLE [64f99a2ee] 2016-02-10 19:30:12 -0500
Branch: REL9_1_STABLE [e56acbe2a] 2016-02-10 19:30:12 -0500
-->

    <listitem>
     <para>
      Avoid use of <function>sscanf()</> to parse <literal>ispell</>
      dictionary files (Artur Zakirov)
     </para>

     <para>
      This dodges a portability problem on FreeBSD-derived platforms
      (including macOS).
     </para>
    </listitem>

<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [5882ca668] 2016-02-19 22:47:50 -0500
Branch: REL9_5_STABLE [377a1af56] 2016-02-19 22:48:04 -0500
-->

    <listitem>
     <para>
      Fix atomic-operations code used on PPC with IBM's xlc compiler
      (Noah Misch)
     </para>

     <para>
      This error led to rare failures of concurrent operations on that
      platform.
     </para>
    </listitem>

<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [9d9038824] 2016-03-10 14:10:18 +0100
Branch: REL9_5_STABLE [ad9a15d3f] 2016-03-10 14:10:32 +0100
Branch: REL9_4_STABLE [8857488b6] 2016-03-10 14:10:41 +0100
Branch: REL9_3_STABLE [270d8a12e] 2016-03-10 14:10:48 +0100
Branch: REL9_2_STABLE [78b597808] 2016-03-10 14:10:54 +0100
Branch: REL9_1_STABLE [3e6385e27] 2016-03-10 14:11:01 +0100
-->

    <listitem>
     <para>
      Avoid a crash on old Windows versions (before 7SP1/2008R2SP1) with an
      AVX2-capable CPU and a Postgres build done with Visual Studio 2013
      (Christian Ullrich)
     </para>

     <para>
      This is a workaround for a bug in Visual Studio 2013's runtime
      library, which Microsoft have stated they will not fix in that
      version.
     </para>
    </listitem>

<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [9445db925] 2016-03-04 11:53:20 -0500
Branch: REL9_5_STABLE [0315dfa8f] 2016-03-04 11:57:22 -0500
Branch: REL9_4_STABLE [8de488d00] 2016-03-04 11:57:23 -0500
Branch: REL9_3_STABLE [54139ac22] 2016-03-04 11:57:31 -0500
Branch: REL9_2_STABLE [c658d5a9b] 2016-03-04 11:57:36 -0500
Branch: REL9_1_STABLE [b4895bf79] 2016-03-04 11:57:40 -0500
-->

    <listitem>
     <para>
      Fix <application>psql</>'s tab completion logic to handle multibyte
      characters properly (Kyotaro Horiguchi, Robert Haas)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [1bee54e51] 2016-03-14 11:31:22 -0400
Branch: REL9_4_STABLE [13108dd0e] 2016-03-14 11:31:34 -0400
Branch: REL9_3_STABLE [0576de5c7] 2016-03-14 11:31:39 -0400
Branch: REL9_2_STABLE [39b3ea714] 2016-03-14 11:31:44 -0400
Branch: REL9_1_STABLE [2d61d88d8] 2016-03-14 11:31:49 -0400
-->

    <listitem>
     <para>
      Fix <application>psql</>'s tab completion for
      <literal>SECURITY LABEL</> (Tom Lane)
     </para>

     <para>
      Pressing TAB after <literal>SECURITY LABEL</> might cause a crash
      or offering of inappropriate keywords.
     </para>
    </listitem>

<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [2ffa86962] 2016-02-10 20:34:02 -0500
Branch: REL9_5_STABLE [725f0ce29] 2016-02-10 20:34:24 -0500
Branch: REL9_4_STABLE [4492ab53b] 2016-02-10 20:34:30 -0500
Branch: REL9_3_STABLE [198242ede] 2016-02-10 20:34:35 -0500
Branch: REL9_2_STABLE [4421b5253] 2016-02-10 20:34:41 -0500
Branch: REL9_1_STABLE [f97664cf5] 2016-02-10 20:34:48 -0500
-->

    <listitem>
     <para>
      Make <application>pg_ctl</> accept a wait timeout from the
      <envar>PGCTLTIMEOUT</> environment variable, if none is specified on
      the command line (Noah Misch)
     </para>

     <para>
      This eases testing of slower buildfarm members by allowing them
      to globally specify a longer-than-normal timeout for postmaster
      startup and shutdown.
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b642e50ae] 2016-03-07 10:40:44 -0500
Branch: REL9_5_STABLE [45b87cc57] 2016-03-07 10:40:53 -0500
Branch: REL9_4_STABLE [89f8372cb] 2016-03-07 10:40:57 -0500
Branch: REL9_3_STABLE [b73e81605] 2016-03-07 10:41:01 -0500
Branch: REL9_2_STABLE [15d43196c] 2016-03-07 10:41:07 -0500
Branch: REL9_1_STABLE [5a39c7395] 2016-03-07 10:41:11 -0500
-->

    <listitem>
     <para>
      Fix incorrect test for Windows service status
      in <application>pg_ctl</> (Manuel Mathar)
     </para>

     <para>
      The previous set of minor releases attempted to
      fix <application>pg_ctl</> to properly determine whether to send log
      messages to Window's Event Log, but got the test backwards.
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [47211af17] 2016-03-16 23:18:07 -0400
Branch: REL9_5_STABLE [8ee2e5f78] 2016-03-16 23:18:07 -0400
Branch: REL9_4_STABLE [23cb32660] 2016-03-16 23:18:07 -0400
Branch: REL9_3_STABLE [c02aae418] 2016-03-16 23:18:07 -0400
Branch: REL9_2_STABLE [be6f9ea2e] 2016-03-16 23:18:08 -0400
Branch: REL9_1_STABLE [1965a8ce1] 2016-03-16 23:18:08 -0400
-->

    <listitem>
     <para>
      Fix <application>pgbench</> to correctly handle the combination
      of <literal>-C</> and <literal>-M prepared</> options (Tom Lane)
     </para>
    </listitem>

<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [3386f34cd] 2016-02-18 18:32:27 -0500
Branch: REL9_5_STABLE [6f43c4d34] 2016-02-18 18:32:26 -0500
Branch: REL9_4_STABLE [bec4d0ffb] 2016-02-18 18:32:26 -0500
Branch: REL9_3_STABLE [bf26c4f44] 2016-02-18 18:32:26 -0500
-->

    <listitem>
     <para>
      In <application>pg_upgrade</>, skip creating a deletion script when
      the new data directory is inside the old data directory (Bruce
      Momjian)
     </para>

     <para>
      Blind application of the script in such cases would result in loss of
      the new data directory.
     </para>
    </listitem>

<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [e66197fa2] 2016-03-08 13:42:57 -0800
Branch: REL9_5_STABLE [68dababfe] 2016-03-08 13:42:58 -0800
Branch: REL9_4_STABLE [6041d388c] 2016-03-08 13:42:58 -0800
Branch: REL9_3_STABLE [44f9f1f2d] 2016-03-08 13:42:58 -0800
Branch: REL9_2_STABLE [ee06c97e4] 2016-03-08 13:42:58 -0800
Branch: REL9_1_STABLE [c5f1fbbfb] 2016-03-08 13:42:58 -0800
-->

    <listitem>
     <para>
      In PL/Perl, properly translate empty Postgres arrays into empty Perl
      arrays (Alex Hunsaker)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [66f503868] 2016-02-16 21:08:15 -0500
Branch: REL9_5_STABLE [2ce19f8a5] 2016-02-16 21:08:15 -0500
Branch: REL9_4_STABLE [f461fa7d0] 2016-02-16 21:08:15 -0500
Branch: REL9_3_STABLE [b3ec98c8b] 2016-02-16 21:08:15 -0500
Branch: REL9_2_STABLE [7d48349fd] 2016-02-16 21:08:15 -0500
Branch: REL9_1_STABLE [875973f5d] 2016-02-16 21:08:15 -0500
-->

    <listitem>
     <para>
      Make PL/Python cope with function names that aren't valid Python
      identifiers (Jim Nasby)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [48e6c943e] 2016-02-18 15:40:35 -0500
Branch: REL9_5_STABLE [0276bbd62] 2016-02-18 15:40:35 -0500
Branch: REL9_4_STABLE [b7547166f] 2016-02-18 15:40:35 -0500
Branch: REL9_3_STABLE [9dfb5b940] 2016-02-18 15:40:35 -0500
Branch: REL9_2_STABLE [29f299728] 2016-02-18 15:40:35 -0500
Branch: REL9_1_STABLE [0f359c7de] 2016-02-18 15:40:36 -0500
-->

    <listitem>
     <para>
      Fix multiple mistakes in the statistics returned
      by <filename>contrib/pgstattuple</>'s <function>pgstatindex()</>
      function (Tom Lane)
     </para>
    </listitem>

<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [5d0320105] 2016-03-19 18:36:35 -0400
Branch: REL9_5_STABLE [2f38b3e7d] 2016-03-19 18:44:04 -0400
Branch: REL9_4_STABLE [6336ca916] 2016-03-19 18:49:19 -0400
Branch: REL9_3_STABLE [a0adf3852] 2016-03-19 18:51:01 -0400
Branch: REL9_2_STABLE [89bf78a9b] 2016-03-19 18:51:01 -0400
Branch: REL9_1_STABLE [2aa9fd963] 2016-03-19 18:59:41 -0400
-->

    <listitem>
     <para>
      Remove dependency on <literal>psed</> in MSVC builds, since it's no
      longer provided by core Perl (Michael Paquier, Andrew Dunstan)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [676265eb7] 2016-03-25 19:03:08 -0400
Branch: REL9_5_STABLE [31d02ebf7] 2016-03-25 19:03:24 -0400
Branch: REL9_4_STABLE [de371e68a] 2016-03-25 19:03:32 -0400
Branch: REL9_3_STABLE [8e16592d4] 2016-03-25 19:03:39 -0400
Branch: REL9_2_STABLE [96fa37459] 2016-03-25 19:03:47 -0400
Branch: REL9_1_STABLE [e5fd35cc5] 2016-03-25 19:03:54 -0400
-->

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</> release 2016c
      for DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia
      (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions), plus
      historical corrections for Lithuania, Moldova, and Russia
      (Kaliningrad, Samara, Volgograd).
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5-1">
  <title>Release 9.5.1</title>

  <formalpara>
  <title>Release date:</title>
  <para>2016-02-11</para>
  </formalpara>

  <para>
   This release contains a variety of fixes from 9.5.0.
   For information about new features in the 9.5 major release, see
   <xref linkend="release-9-5">.
  </para>

  <sect2>
   <title>Migration to Version 9.5.1</title>

   <para>
    A dump/restore is not required for those running 9.5.X.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3bb3f42f3] 2016-02-08 10:25:40 -0500
Branch: REL9_5_STABLE [a61de2bc1] 2016-02-08 10:25:40 -0500
Branch: REL9_4_STABLE [fdc3139e2] 2016-02-08 10:25:40 -0500
Branch: REL9_3_STABLE [6403a6b74] 2016-02-08 10:25:40 -0500
Branch: REL9_2_STABLE [e93516cf7] 2016-02-08 10:25:40 -0500
Branch: REL9_1_STABLE [98d6b7305] 2016-02-08 10:25:40 -0500
-->

    <listitem>
     <para>
      Fix infinite loops and buffer-overrun problems in regular expressions
      (Tom Lane)
     </para>

     <para>
      Very large character ranges in bracket expressions could cause
      infinite loops in some cases, and memory overwrites in other cases.
      (CVE-2016-0773)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f867ce551] 2016-02-07 12:29:32 -0500
Branch: REL9_5_STABLE [129db3cbe] 2016-02-07 12:29:17 -0500
-->

    <listitem>
     <para>
      Fix an oversight that caused hash joins to miss joining to some tuples
      of the inner relation in rare cases (Tomas Vondra, Tom Lane)
     </para>
    </listitem>

<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [a6897efab] 2016-02-08 11:03:31 +0100
Branch: REL9_5_STABLE [87dbc72a7] 2016-02-08 11:03:37 +0100
-->

    <listitem>
     <para>
      Avoid pushdown of <literal>HAVING</> clauses when grouping sets are
      used (Andrew Gierth)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cc2ca9319] 2016-02-07 14:57:24 -0500
Branch: REL9_5_STABLE [82406d6ff] 2016-02-07 14:57:24 -0500
-->

    <listitem>
     <para>
      Fix deparsing of <literal>ON CONFLICT</> arbiter <literal>WHERE</>
      clauses (Peter Geoghegan)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b8682a715] 2016-01-26 15:38:33 -0500
Branch: REL9_5_STABLE [2acb682f6] 2016-01-26 15:38:33 -0500
Branch: REL9_4_STABLE [2b3983158] 2016-01-26 15:38:33 -0500
Branch: REL9_3_STABLE [9bbfca8fd] 2016-01-26 15:38:33 -0500
Branch: REL9_2_STABLE [3a7af9d73] 2016-01-26 15:38:33 -0500
Branch: REL9_1_STABLE [b043df093] 2016-01-26 15:38:33 -0500
-->

    <listitem>
     <para>
      Make <literal>%h</> and <literal>%r</> escapes
      in <varname>log_line_prefix</> work for messages emitted due
      to <varname>log_connections</> (Tom Lane)
     </para>

     <para>
      Previously, <literal>%h</>/<literal>%r</> started to work just after a
      new session had emitted the <quote>connection received</> log message;
      now they work for that message too.
     </para>
    </listitem>

<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [6a61d1ff9] 2016-01-14 13:06:03 +0100
Branch: REL9_5_STABLE [3276ca303] 2016-01-14 13:07:20 +0100
Branch: REL9_4_STABLE [ab49f87d5] 2016-01-14 13:07:35 +0100
Branch: REL9_3_STABLE [77d8edcf5] 2016-01-14 13:07:45 +0100
Branch: REL9_2_STABLE [df0bd5a0f] 2016-01-14 13:07:55 +0100
Branch: REL9_1_STABLE [b1c0f92eb] 2016-01-14 13:08:10 +0100
-->

    <listitem>
     <para>
      Avoid leaking a token handle during SSPI authentication
      (Christian Ullrich)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7e2247047] 2016-01-29 10:28:02 +0100
Branch: REL9_5_STABLE [56251f396] 2016-01-29 10:28:02 +0100
Branch: REL9_4_STABLE [5849b6e32] 2016-01-29 10:28:02 +0100
Branch: REL9_3_STABLE [db678ca16] 2016-01-29 10:28:03 +0100
Branch: REL9_2_STABLE [a362cc2e3] 2016-01-29 10:28:03 +0100
Branch: REL9_1_STABLE [ed5f57218] 2016-01-29 10:28:03 +0100
-->

    <listitem>
     <para>
      Fix <application>psql</>'s <literal>\det</> command to interpret its
      pattern argument the same way as other <literal>\d</> commands with
      potentially schema-qualified patterns do (Reece Hart)
     </para>
    </listitem>

<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [a96761391] 2016-01-07 11:59:08 -0300
Branch: REL9_5_STABLE [744d01c9a] 2016-01-07 11:59:08 -0300
Branch: REL9_4_STABLE [c7aca3d45] 2016-01-07 11:59:08 -0300
Branch: REL9_3_STABLE [74d4009b8] 2016-01-07 11:59:08 -0300
Branch: REL9_2_STABLE [5c4cbd5d1] 2016-01-07 11:59:08 -0300
Branch: REL9_1_STABLE [b96f6f444] 2016-01-07 11:59:08 -0300
-->

    <listitem>
     <para>
      In <application>pg_ctl</> on Windows, check service status to decide
      where to send output, rather than checking if standard output is a
      terminal (Michael Paquier)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e72d7d853] 2016-01-13 18:55:27 -0500
Branch: REL9_5_STABLE [c42df2d46] 2016-01-13 18:55:27 -0500
Branch: REL9_4_STABLE [7393208b5] 2016-01-13 18:55:27 -0500
Branch: REL9_3_STABLE [b87403f70] 2016-01-13 18:55:27 -0500
Branch: REL9_2_STABLE [be2b27651] 2016-01-13 18:55:27 -0500
Branch: REL9_1_STABLE [5108013db] 2016-01-13 18:55:27 -0500
-->

    <listitem>
     <para>
      Fix assorted corner-case bugs in <application>pg_dump</>'s processing
      of extension member objects (Tom Lane)
     </para>
    </listitem>

<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [df43fcf45] 2016-01-22 20:04:35 -0300
Branch: REL9_5_STABLE [1e910cf5b] 2016-01-22 20:04:35 -0300
-->

    <listitem>
     <para>
      Fix improper quoting of domain constraint names
      in <application>pg_dump</> (Elvis Pranskevichus)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0ed707e9b] 2016-02-04 00:26:10 -0500
Branch: REL9_5_STABLE [b99dd7170] 2016-02-04 00:26:10 -0500
Branch: REL9_4_STABLE [411e2b0d5] 2016-02-04 00:26:10 -0500
Branch: REL9_3_STABLE [aefbc208b] 2016-02-04 00:26:10 -0500
Branch: REL9_2_STABLE [4f58a7003] 2016-02-04 00:26:10 -0500
Branch: REL9_1_STABLE [9c704632c] 2016-02-04 00:26:10 -0500
-->

    <listitem>
     <para>
      Make <application>pg_dump</> mark a view's triggers as needing to be
      processed after its rule, to prevent possible failure during
      parallel <application>pg_restore</> (Tom Lane)
     </para>
    </listitem>

<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [64f5edca2] 2016-02-01 08:23:41 -0500
Branch: REL9_5_STABLE [829757c8a] 2016-02-01 08:26:07 -0500
Branch: REL9_4_STABLE [c33d1a8d5] 2016-02-03 09:15:29 -0500
Branch: REL9_3_STABLE [014796aa3] 2016-02-03 09:19:58 -0500
Branch: REL9_2_STABLE [b63a4f418] 2016-02-03 09:21:44 -0500
Branch: REL9_1_STABLE [4c8b07d3c] 2016-02-03 09:25:34 -0500
-->

    <listitem>
     <para>
      Install guards in <application>pgbench</> against corner-case overflow
      conditions during evaluation of script-specified division or modulo
      operators (Fabien Coelho, Michael Paquier)
     </para>
    </listitem>

<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [4aecd22d3] 2016-01-05 17:25:12 -0300
Branch: REL9_5_STABLE [7ef311eb4] 2016-01-05 17:25:12 -0300
-->

    <listitem>
     <para>
      Suppress useless warning message when <application>pg_receivexlog</>
      connects to a pre-9.4 server (Marco Nenciarini)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [866566a69] 2016-01-11 19:55:39 -0500
Branch: REL9_5_STABLE [db8fa56d6] 2016-01-11 19:55:39 -0500
Branch: REL9_4_STABLE [22815752e] 2016-01-11 19:55:40 -0500
Branch: REL9_3_STABLE [0ddeaba7e] 2016-01-11 19:55:40 -0500
Branch: REL9_2_STABLE [3843ba510] 2016-01-11 19:55:40 -0500
Branch: master [fb6fcbd33] 2016-01-11 20:06:36 -0500
Branch: REL9_5_STABLE [5ef26b8de] 2016-01-11 20:06:47 -0500
-->

    <listitem>
     <para>
      Avoid dump/reload problems when using both <application>plpython2</>
      and <application>plpython3</> (Tom Lane)
     </para>

     <para>
      In principle, both versions of <application>PL/Python</> can be used in
      the same database, though not in the same session (because the two
      versions of <application>libpython</> cannot safely be used concurrently).
      However, <application>pg_restore</> and <application>pg_upgrade</> both
      do things that can fall foul of the same-session restriction.  Work
      around that by changing the timing of the check.
     </para>
    </listitem>

<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: REL9_4_STABLE [f1b898759] 2015-11-14 13:43:43 -0500
Branch: REL9_3_STABLE [a37ab812c] 2015-11-14 13:44:09 -0500
Branch: REL9_2_STABLE [82076c1e4] 2015-11-14 13:53:26 -0500
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_5_STABLE [a66c1fcdd] 2016-01-08 11:39:28 -0500
-->

    <listitem>
     <para>
      Fix <application>PL/Python</> regression tests to pass with Python 3.5
      (Peter Eisentraut)
     </para>
    </listitem>

<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [f4aa3a18a] 2016-02-05 20:22:51 -0500
Branch: REL9_5_STABLE [0089dd34a] 2016-02-05 20:23:04 -0500
Branch: REL9_4_STABLE [ed6deeb7a] 2016-02-05 20:23:07 -0500
Branch: REL9_3_STABLE [34e91736b] 2016-02-05 20:23:11 -0500
Branch: REL9_2_STABLE [de9766d39] 2016-02-05 20:23:14 -0500
Branch: REL9_1_STABLE [b1f591c50] 2016-02-05 20:23:19 -0500
-->

    <listitem>
     <para>
      Prevent certain <application>PL/Java</> parameters from being set by
      non-superusers (Noah Misch)
     </para>

     <para>
      This change mitigates a <application>PL/Java</> security bug
      (CVE-2016-0766), which was fixed in <application>PL/Java</> by marking
      these parameters as superuser-only.  To fix the security hazard for
      sites that update <productname>PostgreSQL</> more frequently
      than <application>PL/Java</>, make the core code aware of them also.
     </para>
    </listitem>

<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [7a58d19b0] 2016-02-01 13:21:00 +0100
Branch: REL9_5_STABLE [40482e606] 2016-02-01 13:20:37 +0100
Branch: REL9_3_STABLE [0b55fef39] 2016-02-01 13:19:10 +0100
Branch: REL9_2_STABLE [d9ce5d201] 2016-02-01 13:19:34 +0100
Branch: REL9_1_STABLE [79782b407] 2016-02-01 13:19:43 +0100
Author: Andres Freund <andres@anarazel.de>
Branch: REL9_4_STABLE [33b26426e] 2016-02-08 11:10:14 +0100
-->

    <listitem>
     <para>
      Fix <application>ecpg</>-supplied header files to not contain comments
      continued from a preprocessor directive line onto the next line
      (Michael Meskes)
     </para>

     <para>
      Such a comment is rejected by <application>ecpg</>.  It's not yet clear
      whether <application>ecpg</> itself should be changed.
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e6ecc93a1] 2016-02-03 01:39:48 -0500
Branch: REL9_5_STABLE [1c291624b] 2016-02-03 01:39:08 -0500
Branch: REL9_4_STABLE [aa223a037] 2016-02-03 01:39:08 -0500
Branch: REL9_3_STABLE [1f2b195eb] 2016-02-03 01:39:08 -0500
-->

    <listitem>
     <para>
      Fix <function>hstore_to_json_loose()</>'s test for whether
      an <type>hstore</> value can be converted to a JSON number (Tom Lane)
     </para>

     <para>
      Previously this function could be fooled by non-alphanumeric trailing
      characters, leading to emitting syntactically-invalid JSON.
     </para>
    </listitem>

<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [9418d79a7] 2016-02-04 21:17:53 -0500
Branch: REL9_5_STABLE [453d40817] 2016-02-04 21:17:46 -0500
Branch: REL9_4_STABLE [1f3294c22] 2016-02-04 21:15:57 -0500
Branch: master [37c84570b] 2016-02-04 22:27:13 -0500
Branch: REL9_5_STABLE [d160e2a34] 2016-02-04 22:27:38 -0500
Branch: REL9_4_STABLE [2099b911d] 2016-02-04 22:27:47 -0500
-->

    <listitem>
     <para>
      In <filename>contrib/postgres_fdw</>, fix bugs triggered by use
      of <literal>tableoid</> in data-modifying commands (Etsuro Fujita,
      Robert Haas)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a396144ac] 2016-01-22 11:53:06 -0500
Branch: REL9_5_STABLE [47acf3add] 2016-01-22 11:53:06 -0500
-->

    <listitem>
     <para>
      Fix ill-advised restriction of <literal>NAMEDATALEN</> to be less
      than 256 (Robert Haas, Tom Lane)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3343ea9e8] 2016-01-05 15:47:05 -0500
Branch: REL9_5_STABLE [8805af088] 2016-01-05 15:47:05 -0500
Branch: REL9_4_STABLE [8c558b2e9] 2016-01-05 15:47:05 -0500
Branch: REL9_3_STABLE [6d899f098] 2016-01-05 15:47:05 -0500
-->

    <listitem>
     <para>
      Improve reproducibility of build output by ensuring filenames are given
      to the linker in a fixed order (Christoph Berg)
     </para>

     <para>
      This avoids possible bitwise differences in the produced executable
      files from one build to the next.
     </para>
    </listitem>

<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [216d56843] 2016-01-19 23:30:29 -0500
Branch: REL9_5_STABLE [34bda20ae] 2016-01-19 23:30:29 -0500
Branch: REL9_4_STABLE [8b3d52801] 2016-01-19 23:30:29 -0500
Branch: REL9_3_STABLE [7a47262ce] 2016-01-19 23:30:28 -0500
Branch: REL9_2_STABLE [49d65e857] 2016-01-19 23:30:28 -0500
Branch: REL9_1_STABLE [b1bc38144] 2016-01-19 23:30:28 -0500
-->

    <listitem>
     <para>
      Ensure that <filename>dynloader.h</> is included in the installed
      header files in MSVC builds (Bruce Momjian, Michael Paquier)
     </para>
    </listitem>

<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a73311e52] 2016-02-05 10:59:09 -0500
Branch: REL9_5_STABLE [37e694632] 2016-02-05 10:59:21 -0500
Branch: REL9_4_STABLE [31b792f61] 2016-02-05 10:59:26 -0500
Branch: REL9_3_STABLE [9a3475b84] 2016-02-05 10:59:31 -0500
Branch: REL9_2_STABLE [32f17a2e7] 2016-02-05 10:59:35 -0500
Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500
-->

    <listitem>
     <para>
      Update time zone data files to <application>tzdata</> release 2016a for
      DST law changes in Cayman Islands, Metlakatla, and Trans-Baikal
      Territory (Zabaykalsky Krai), plus historical corrections for Pakistan.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-5">
  <title>Release 9.5</title>

  <formalpara>
   <title>Release date:</title>
   <para>2016-01-07</para>
  </formalpara>

  <sect2>
   <title>Overview</title>

   <para>
    Major enhancements in <productname>PostgreSQL</> 9.5 include:
   </para>

   <!-- This list duplicates items below, but without authors or details-->

   <itemizedlist>

    <listitem>
     <para>
      Allow <link linkend="sql-on-conflict"><command>INSERT</></>s
      that would generate constraint conflicts to be turned into
      <command>UPDATE</>s or ignored
     </para>
    </listitem>

    <listitem>
     <para>
      Add <literal>GROUP BY</> analysis features <link
      linkend="queries-grouping-sets"><literal>GROUPING SETS</></>,
      <link linkend="queries-grouping-sets"><literal>CUBE</></> and
      <link linkend="queries-grouping-sets"><literal>ROLLUP</></>
     </para>
    </listitem>

    <listitem>
     <para>
      Add <link linkend="ddl-rowsecurity">row-level security control</>
     </para>
    </listitem>

    <listitem>
     <para>
      Create mechanisms for tracking
      the <link linkend="replication-origins">progress of replication</>,
      including methods for identifying the origin of individual changes
      during logical replication
     </para>
    </listitem>

    <listitem>
     <para>
      Add <link linkend="BRIN">Block Range Indexes</> (<acronym>BRIN</>)
     </para>
    </listitem>

    <listitem>
     <para>
      Substantial performance improvements for sorting
     </para>
    </listitem>

    <listitem>
     <para>
      Substantial performance improvements for multi-CPU machines
     </para>
    </listitem>

   </itemizedlist>

   <para>
    The above items are explained in more detail in the sections below.
   </para>

  </sect2>

  <sect2>

  <title>Migration to Version 9.5</title>

   <para>
    A dump/restore using <xref linkend="app-pg-dumpall">, or use
    of <xref linkend="pgupgrade">, is required for those wishing to migrate
    data from any previous release.
   </para>

   <para>
    Version 9.5 contains a number of changes that may affect compatibility
    with previous releases.  Observe the following incompatibilities:
   </para>

   <itemizedlist>

    <listitem>
<!--
2015-03-11 [c6b3c93] Tom Lane: Make operator precedence follow the SQL standar..
-->
     <para>
      Adjust <link linkend="sql-precedence">operator precedence</>
      to match the <acronym>SQL</> standard (Tom Lane)
     </para>

     <para>
      The precedence of <literal>&lt;=</literal>, <literal>&gt;=</literal>
      and <literal>&lt;&gt;</literal> has been reduced to match that of
      <literal>&lt;</literal>, <literal>&gt;</literal>
      and <literal>=</literal>.  The precedence of <literal>IS</> tests
      (e.g., <replaceable>x</> <literal>IS NULL</>) has been reduced to be
      just below these six comparison operators.
      Also, multi-keyword operators beginning with <literal>NOT</> now have
      the precedence of their base operator (for example, <literal>NOT
      BETWEEN</> now has the same precedence as <literal>BETWEEN</>) whereas
      before they had inconsistent precedence, behaving like <literal>NOT</>
      with respect to their left operand but like their base operator with
      respect to their right operand.  The new configuration
      parameter <xref linkend="guc-operator-precedence-warning"> can be
      enabled to warn about queries in which these precedence changes result
      in different parsing choices.
     </para>
    </listitem>

    <listitem>
<!--
2015-03-31 [0badb06] Bruce ..: pg_ctl:  change default shutdown mode from 'sma..
-->
     <para>
      Change <xref linkend="app-pg-ctl">'s default shutdown mode from
      <literal>smart</> to <literal>fast</> (Bruce Momjian)
     </para>

     <para>
      This means the default behavior will be to forcibly cancel existing
      database sessions, not simply wait for them to exit.
     </para>
    </listitem>

    <listitem>
<!--
2015-03-04 [1345cc6] Tom Lane: Use standard casting mechanism to convert type..
-->
     <para>
      Use assignment cast behavior for data type conversions
      in <application>PL/pgSQL</> assignments, rather than converting to and
      from text (Tom Lane)
     </para>

     <para>
      This change causes conversions of Booleans to strings to
      produce <literal>true</> or <literal>false</>, not <literal>t</>
      or <literal>f</>.  Other type conversions may succeed in more cases
      than before; for example, assigning a numeric value <literal>3.9</> to
      an integer variable will now assign 4 rather than failing.  If no
      assignment-grade cast is defined for the particular source and
      destination types, <application>PL/pgSQL</> will fall back to its old
      I/O conversion behavior.
     </para>
    </listitem>

    <listitem>
<!--
2014-08-28 [11a020e] Andres..: Allow escaping of option values for options pas..
-->
     <para>
      Allow characters in <link linkend="libpq-connect-options">server
      command-line options</> to be escaped with a backslash (Andres Freund)
     </para>

     <para>
      Formerly, spaces in the options string always separated options, so
      there was no way to include a space in an option value.  Including
      a backslash in an option value now requires writing <literal>\\</>.
     </para>
    </listitem>

    <listitem>
<!--
2015-05-08 [9a08841] Stephe..: Change default for include_realm to 1
-->
     <para>
      Change the default value of the GSSAPI <link
      linkend="gssapi-auth"><varname>include_realm</></> parameter to 1, so
      that by default the realm is not removed from a <acronym>GSS</>
      or <acronym>SSPI</> principal name (Stephen Frost)
     </para>
    </listitem>

    <listitem>
<!--
2015-02-23 [88e9823] Heikki..: Replace checkpoint_segments with min_wal_size a..
2015-03-15 [a0f5954] Andres..: Increase max_wal_size's default from 128MB to 1..
2015-06-29 [d661532] Heikki..: Also trigger restartpoints based on max_wal_siz..
-->
     <para>
      Replace configuration parameter <varname>checkpoint_segments</>
      with <xref linkend="guc-min-wal-size">
      and <xref linkend="guc-max-wal-size"> (Heikki Linnakangas)
     </para>

     <para>
      If you previously adjusted <varname>checkpoint_segments</varname>, the
      following formula will give you an approximately equivalent setting:
<programlisting>
max_wal_size = (3 * checkpoint_segments) * 16MB
</programlisting>
      Note that the default setting for <varname>max_wal_size</varname> is
      much higher than the default <varname>checkpoint_segments</varname> used
      to be, so adjusting it might no longer be necessary.
     </para>
    </listitem>

      <listitem>
<!--
2014-06-18 [df8b7bc] Tom Lane: Improve our mechanism for controlling the Linux..
-->
       <para>
        Control the Linux <acronym>OOM</> killer via new environment
        variables <link
        linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_FILE</></>
        and <link
        linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_VALUE</></>,
        instead of compile-time options <literal>LINUX_OOM_SCORE_ADJ</> and
        <literal>LINUX_OOM_ADJ</>
        (Gurjeet Singh)
       </para>
      </listitem>

    <listitem>
<!--
2015-10-20 [b06f1f2] Robert..: Put back ssl_renegotiation_limit parameter, bu..
2015-07-28 [6087d95] Andres..: Remove ssl renegotiation support.
-->
     <para>
      Decommission server configuration
      parameter <varname>ssl_renegotiation_limit</>, which was deprecated
      in earlier releases (Andres Freund)
     </para>

     <para>
      While SSL renegotiation is a good idea in theory, it has caused enough
      bugs to be considered a net negative in practice, and it is due to be
      removed from future versions of the relevant standards.  We have
      therefore removed support for it from <productname>PostgreSQL</>.
      The <varname>ssl_renegotiation_limit</> parameter still exists, but
      cannot be set to anything but zero (disabled).  It's not documented
      anymore, either.
     </para>
    </listitem>

    <listitem>
<!--
2014-11-05 [525a489] Tom Lane: Remove the last vestige of server-side autocomm..
-->
     <para>
      Remove server configuration parameter <varname>autocommit</>, which
      was already deprecated and non-operational (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
2015-03-06 [bb8582a] Peter ..: Remove rolcatupdate
-->
     <para>
      Remove the <link linkend="catalog-pg-authid"><structname>pg_authid</></>
      catalog's <structfield>rolcatupdate</> field, as it had no usefulness
      (Adam Brightwell)
     </para>
    </listitem>

    <listitem>
<!--
2015-12-13 [28c3667] Magnus..: Consistently set all fields in pg_stat_replica..
-->
     <para>
      The <link
      linkend="pg-stat-replication-view"><structname>pg_stat_replication</></link>
      system view's <structfield>sent</> field is now NULL, not zero, when
      it has no valid value (Magnus Hagander)
     </para>
    </listitem>

    <listitem>
<!--
2015-07-17 [89ddd29] Andrew..: Support JSON negative array subscripts everywh..
-->
     <para>
      Allow <type>json</> and <type>jsonb</> array extraction operators to
      accept negative subscripts, which count from the end of JSON arrays
      (Peter Geoghegan, Andrew Dunstan)
     </para>

     <para>
      Previously, these operators returned <literal>NULL</> for negative
      subscripts.
     </para>
    </listitem>

   </itemizedlist>

  </sect2>

  <sect2>
   <title>Changes</title>

   <para>
    Below you will find a detailed account of the changes between
    <productname>PostgreSQL</productname> 9.5 and the previous major
    release.
   </para>

   <sect3>
    <title>Server</title>

    <sect4>
     <title>Indexes</title>

     <itemizedlist>

      <listitem>
<!--
2014-11-07 [7516f52] Alvaro..: BRIN: Block Range Indexes
2015-05-05 [3b6db1f] Alvaro..: Add geometry/range functions to support BRIN in..
2015-05-15 [b0b7be6] Alvaro..: Add BRIN infrastructure for "inclusion" opclasses
-->
       <para>
        Add <link linkend="BRIN">Block Range Indexes</> (<acronym>BRIN</>)
        (&Aacute;lvaro Herrera)
       </para>

       <para>
        <acronym>BRIN</> indexes store only summary data (such as minimum
        and maximum values) for ranges of heap blocks.  They are therefore
        very compact and cheap to update; but if the data is naturally
        clustered, they can still provide substantial speedup of searches.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-15 [35fcb1b] Heikki..: Allow GiST distance function to return merely ..
-->
       <para>
        Allow queries to perform accurate distance filtering of
        bounding-box-indexed objects (polygons, circles) using <link
        linkend="GiST">GiST</> indexes (Alexander Korotkov, Heikki
        Linnakangas)
       </para>

       <para>
        Previously, to exploit such an index a subquery had to be used to
        select a large number of rows ordered by bounding-box distance, and
        the result then had to be filtered further with a more accurate
        distance calculation.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-26 [d04c8ed] Heikki..: Add support for index-only scans in GiST.
2015-03-27 [e09b483] Heikki..: Add index-only scan support to btree_gist.
2015-03-28 [3a20b0e] Heikki..: Add index-only scan support to inet GiST opclass.
2015-03-30 [0633a60] Heikki..: Add index-only scan support to range type GiST ..
-->
       <para>
        Allow <link linkend="GiST">GiST</> indexes to perform index-only
        scans (Anastasia Lubennikova, Heikki Linnakangas, Andreas Karlsson)
       </para>
      </listitem>

      <listitem>
<!--
Add GUC and storage parameter to set the maximum size of GIN pending list.
-->
       <para>
        Add configuration parameter <xref linkend="guc-gin-pending-list-limit">
        to control the size of <acronym>GIN</> pending lists (Fujii Masao)
       </para>

       <para>
        This value can also be set on a per-index basis as an index storage
        parameter.  Previously the pending-list size was controlled
        by <xref linkend="guc-work-mem">, which was awkward because
        appropriate values for <varname>work_mem</> are often much too large
        for this purpose.
       </para>
      </listitem>

      <listitem>
<!--
2014-09-10 [84aa8ba] Bruce ..: Issue a warning during the creation of hash in..
-->
       <para>
        Issue a warning during the creation of <link
        linkend="indexes-types">hash</> indexes because they are not
        crash-safe (Bruce Momjian)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>General Performance</title>

     <itemizedlist>

      <listitem>
<!--
2015-01-19 [4ea51cd] Robert..: Use abbreviated keys for faster sorting of text..
2014-09-19 [e246b3d] Robert..: Add a fast pre-check for equality of equal-leng..
2015-05-13 [78efd5c] Robert..: Extend abbreviated key infrastructure to datum ..
-->
       <para>
        Improve the speed of sorting of <type>varchar</>, <type>text</>,
        and <type>numeric</> fields via <quote>abbreviated</> keys
        (Peter Geoghegan, Andrew Gierth, Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2014-11-07 [5ea86e6] Robert..: Use the sortsupport infrastructure in more cas..
-->
       <para>
        Extend the infrastructure that allows sorting to be performed by
        inlined, non-<acronym>SQL</acronym>-callable comparison functions to
        cover <command>CREATE INDEX</>, <command>REINDEX</>, and
        <command>CLUSTER</> (Peter Geoghegan)
       </para>
      </listitem>

      <listitem>
<!--
2014-09-10 [45f6240] Heikki..: Pack tuples in a hash join batch densely, to sa..
2014-09-12 [8cce08f] Robert..: Change NTUP_PER_BUCKET to 1 to improve hash joi..
2014-10-13 [30d7ae3] Kevin ..: Increase number of hash join buckets for undere..
-->
       <para>
        Improve performance of hash joins (Tomas Vondra, Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2014-09-25 [5d7962c] Robert..: Change locking regimen around buffer replacement.
2014-12-25 [d72731a] Andres..: Lockless StrategyGetBuffer clock sweep hot path.
-->
       <para>
        Improve concurrency of shared buffer replacement
        (Robert Haas, Amit Kapila, Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-25 [2ed5b87f] Kevin ..: Reduce pinning and buffer content locking for b..
-->
       <para>
        Reduce the number of page locks and pins during index scans (Kevin Grittner)
       </para>

       <para>
        The primary benefit of this is to allow index vacuums to be blocked
        less often.
       </para>
      </listitem>

      <listitem>
<!--
2014-08-30 [4b4b680] Andres..: Make backend local tracking of buffer pins memo..
2015-01-19 [2d115e4] Andres..: Fix various shortcomings of the new PrivateRefC..
-->
       <para>
        Make per-backend tracking of buffer pins more memory-efficient
        (Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2014-12-25 [ab5194e] Andres..: Improve LWLock scalability.
-->
       <para>
        Improve lock scalability (Andres Freund)
       </para>

       <para>
        This particularly addresses scalability problems when running on
        systems with multiple <acronym>CPU</> sockets.
       </para>
      </listitem>

      <listitem>
<!--
2014-07-15 [f15821e] Tom Lane: Allow join removal in some cases involving a le..
-->
       <para>
        Allow the optimizer to remove unnecessary references to left-joined
        subqueries (David Rowley)
       </para>
      </listitem>

      <listitem>
<!--
2014-06-27 [d222585] Tom Lane: Allow pushdown of WHERE quals into subqueries w..
-->
       <para>
        Allow pushdown of query restrictions into subqueries with <link
        linkend="tutorial-window">window functions</>, where appropriate
        (David Rowley)
       </para>
      </listitem>

      <listitem>
<!--
2015-04-27 [dcbf594]  Stephe..: Improve qual pushdown for RLS and SB views
-->
       <para>
        Allow a non-leakproof function to be pushed down into a security
        barrier view if the function does not receive any view output
        columns (Dean Rasheed)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-24 [45d256c] Tom Lane: Allow planner to use expression-index stats fo..
-->
       <para>
        Teach the planner to use statistics obtained from an expression
        index on a boolean-returning function, when a matching function call
        appears in <literal>WHERE</> (Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-23 [cfb2024] Tom Lane: Make ANALYZE compute basic statistics even for..
-->
       <para>
        Make <command>ANALYZE</> compute basic statistics (null fraction and
        average column width) even for columns whose data type lacks an
        equality function (Oleksandr Shulgin)
       </para>
      </listitem>

      <listitem>
<!--
2014-11-04 [5028f22] Heikki..: Switch to CRC-32C in WAL and other places.
2015-02-10 [025c024] Heikki..: Speed up CRC calculation using slicing-by-8 alg..
2015-04-14 [3dc2d62] Heikki..: Use Intel SSE 4.2 CRC instructions where availa..

-->
       <para>
        Speed up <acronym>CRC</> (cyclic redundancy check) computations
        and switch to CRC-32C (Abhijit Menon-Sen, Heikki Linnakangas)
       </para>
      </listitem>

      <listitem>
<!--
2015-01-16 [f5ae3ba] Andres..: Make tbm_add_tuples more efficient by caching t..
2015-01-16 [779fdcd] Tom Lane: Improve new caching logic in tbm_add_tuples().
-->
       <para>
        Improve bitmap index scan performance (Teodor Sigaev, Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2014-07-01 [9f03ca9] Robert..: Avoid copying index tuples when building an ind..
-->
       <para>
        Speed up <command>CREATE INDEX</> by avoiding unnecessary memory
        copies (Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2014-10-02 [3acc10c9] Robert..: Increase the number of buffer mapping partitio..
-->
       <para>
        Increase the number of buffer mapping partitions (Amit Kapila,
        Andres Freund, Robert Haas)
       </para>

       <para>
        This improves performance for highly concurrent workloads.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Monitoring</title>

     <itemizedlist>

      <listitem>
<!--
2015-04-03 [4ff695b1] Alvaro..: Add log_min_autovacuum_duration per-table option
-->
       <para>
        Add per-table autovacuum logging control via new
        <varname>log_autovacuum_min_duration</> storage parameter
        (Michael Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2014-06-29 [51adcaa] Andres..: Add cluster_name GUC which is included in proce..
-->
       <para>
        Add new configuration parameter <xref linkend="guc-cluster-name">
        (Thomas Munro)
       </para>

       <para>
        This string, typically set in <link
        linkend="config-setting-configuration-file"><filename>postgresql.conf</></>,
        allows clients to identify the cluster.  This name also appears
        in the process title of all server processes, allowing for easier
        identification of processes belonging to the same cluster.
       </para>
      </listitem>

      <listitem>
<!--
2014-09-13 [fe550b2] Tom Lane: Invent PGC_SU_BACKEND and mark log_connections..
-->
       <para>
        Prevent non-superusers from changing <xref
        linkend="guc-log-disconnections"> on connection startup (Fujii Masao)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><acronym>SSL</></title>

     <itemizedlist>

      <listitem>
<!--
2014-09-12 [acd08d7] Heikki..: Support Subject Alternative Names in SSL server..
-->
       <para>
        Check <link linkend="libpq-ssl"><quote>Subject Alternative
        Names</></> in <acronym>SSL</> server certificates, if present
        (Alexey Klyukin)
       </para>

       <para>
        When they are present, this replaces checks against the certificate's
        <quote>Common Name</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-04-12 [9029f4b] Magnus..: Add system view pg_stat_ssl
-->
       <para>
        Add system view <link
        linkend="pg-stat-ssl-view"><structname>pg_stat_ssl</></> to report
        <acronym>SSL</> connection information (Magnus Hagander)
       </para>
      </listitem>

      <listitem>
<!--
2015-02-03 [91fa7b4] Heikki..: Add API functions to libpq to interrogate SSL ..
-->
       <para>
        Add <application>libpq</> functions to return <acronym>SSL</>
        information in an implementation-independent way (Heikki Linnakangas)
       </para>

       <para>
        While <link linkend="libpq-pqgetssl"><function>PQgetssl()</></> can
        still be used to call <productname>OpenSSL</> functions, it is now
        considered deprecated because future versions
        of <application>libpq</> might support other <acronym>SSL</>
        implementations.  When possible, use the new
        functions <link
        linkend="libpq-pqsslattribute"><function>PQsslAttribute()</></>, <link
        linkend="libpq-pqsslattributenames"><function>PQsslAttributeNames()</></>,
        and <link linkend="libpq-pqsslinuse"><function>PQsslInUse()</></>
        to obtain <acronym>SSL</> information in
        an <acronym>SSL</>-implementation-independent way.
       </para>
      </listitem>

      <listitem>
<!--
2015-04-09 [8a0d34e4] Peter ..: libpq: Don't overwrite existing OpenSSL thread..
-->
       <para>
        Make <application>libpq</> honor any <productname>OpenSSL</>
        thread callbacks (Jan Urbanski)
       </para>

       <para>
        Previously they were overwritten.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Server Settings</title>

     <itemizedlist>

      <listitem>
<!--
2015-02-23 [88e9823] Heikki..: Replace checkpoint_segments with min_wal_size a..
2015-03-15 [a0f5954] Andres..: Increase max_wal_size's default from 128MB to 1..
2015-06-29 [d661532] Heikki..: Also trigger restartpoints based on max_wal_siz..
-->
       <para>
        Replace configuration parameter <varname>checkpoint_segments</>
        with <xref linkend="guc-min-wal-size">
        and <xref linkend="guc-max-wal-size"> (Heikki Linnakangas)
       </para>

       <para>
        This change allows the allocation of a large number of <acronym>WAL</>
        files without keeping them after they are no longer needed.
        Therefore the default for <varname>max_wal_size</> has been set
        to <literal>1GB</>, much larger than the old default
        for <varname>checkpoint_segments</>.
        Also note that standby servers perform restartpoints to try to limit
        their WAL space consumption to <varname>max_wal_size</>; previously
        they did not pay any attention to <varname>checkpoint_segments</>.
       </para>
      </listitem>

      <listitem>
<!--
2014-06-18 [df8b7bc] Tom Lane: Improve our mechanism for controlling the Linux..
-->
       <para>
        Control the Linux <acronym>OOM</> killer via new environment
        variables <link
        linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_FILE</></>
        and <link
        linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_VALUE</></>
        (Gurjeet Singh)
       </para>

       <para>
        The previous <acronym>OOM</> control infrastructure involved
        compile-time options <literal>LINUX_OOM_SCORE_ADJ</> and
        <literal>LINUX_OOM_ADJ</>, which are no longer supported.
        The new behavior is available in all builds.
       </para>
      </listitem>

      <listitem>
<!--
2014-12-03 [73c986a] Alvaro..: Keep track of transaction commit timestamps
-->
       <para>
        Allow recording of transaction
        commit time stamps when configuration parameter <xref
        linkend="guc-track-commit-timestamp">
        is enabled (&Aacute;lvaro Herrera, Petr Jel&iacute;nek)
       </para>

       <para>
        Time stamp information can be accessed using functions <link
        linkend="functions-commit-timestamp"><function>pg_xact_commit_timestamp()</></>
        and <function>pg_last_committed_xact()</>.
       </para>
      </listitem>

      <listitem>
<!--
2014-12-22 [584e35d] Peter ..: Change local_preload_libraries to PGC_USERSET
-->
       <para>
        Allow <xref linkend="guc-local-preload-libraries"> to be set
        by <command>ALTER ROLE SET</> (Peter Eisentraut, Kyotaro Horiguchi)
       </para>
      </listitem>

      <listitem>
<!--
2015-04-03 [a75fb9b] Alvaro..: Have autovacuum workers listen to SIGHUP, too
-->
       <para>
        Allow <link linkend="autovacuum">autovacuum workers</>
        to respond to configuration parameter changes during a run
        (Michael Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2014-06-20 [3bdcf6a] Andres..: Don't allow to disable backend assertions via t..
-->
       <para>
        Make configuration parameter <xref linkend="guc-debug-assertions">
        read-only (Andres Freund)
       </para>

       <para>
        This means that assertions can no longer be turned
        off if they were enabled at compile time, allowing for more
        efficient code optimization.  This change also removes the <link
        linkend="app-postgres-options">postgres</> <option>-A</> option.
       </para>
      </listitem>

      <listitem>
<!--
2014-10-18 [7feaccc] Peter ..: Allow setting effective_io_concurrency even on..
-->
       <para>
        Allow setting <xref linkend="guc-effective-io-concurrency"> on
        systems where it has no effect (Peter Eisentraut)
       </para>
      </listitem>

      <listitem>
<!--
2015-05-08 [a97e0c3] Stephe..: Add pg_file_settings view and function
2015-06-28 [62d16c7] Tom Lane: Improve design and implementation of pg_file_se..
-->
       <para>
        Add system view <link
        linkend="view-pg-file-settings"><structname>pg_file_settings</></>
        to show the contents of the server's configuration files
        (Sawada Masahiko)
       </para>
      </listitem>

      <listitem>
<!--
2015-05-14 [a486e35] Peter ..: Add pg_settings.pending_restart column
-->
       <para>
        Add <structname>pending_restart</> to the system view <link
        linkend="view-pg-settings"><structname>pg_settings</></> to
        indicate a change has been made but will not take effect until a
        database restart (Peter Eisentraut)
       </para>
      </listitem>

      <listitem>
<!--
2014-09-02 [bd3b7a9] Fujii ..: Support ALTER SYSTEM RESET command.
-->
       <para>
        Allow <link linkend="SQL-ALTERSYSTEM"><command>ALTER SYSTEM</></>
        values to be reset with <command>ALTER SYSTEM RESET</> (Vik
        Fearing)
       </para>

       <para>
        This command removes the specified setting
        from <filename>postgresql.auto.conf</>.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Replication and Recovery</title>

     <itemizedlist>

      <listitem>
<!--
2015-04-29 [5aa2350] Andres..: Introduce replication progress tracking infrast..
-->
       <para>
        Create mechanisms for tracking
        the <link linkend="replication-origins">progress of replication</>,
        including methods for identifying the origin of individual changes
        during logical replication (Andres Freund)
       </para>

       <para>
        This is helpful when implementing replication solutions.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-26 [bd7c348] Andres..: Rework the way multixact truncations work.
2015-09-26 [6e8af37] Andres..: Remove legacy multixact truncation support.
-->
       <para>
        Rework truncation of the multixact commit log to be properly
        WAL-logged (Andres Freund)
       </para>

       <para>
        This makes things substantially simpler and more robust.
       </para>
      </listitem>

      <listitem>
<!--
2014-11-25 [aedccb1] Simon ..: action_at_recovery_target recovery config option
2014-12-07 [b8e33a8] Simon ..: Tweaks for recovery_target_action
2015-03-15 [51c11a7] Andres..: Remove pause_at_recovery_target recovery.conf s..
-->
       <para>
        Add <link linkend="recovery-config"><filename>recovery.conf</></>
        parameter <link
        linkend="recovery-target-action"><varname>recovery_target_action</></>
        to control post-recovery activity (Petr Jel&iacute;nek)
       </para>

       <para>
        This replaces the old parameter <varname>pause_at_recovery_target</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-15 [ffd3774] Heikki..: Add archive_mode='always' option.
-->
       <para>
        Add new <xref linkend="guc-archive-mode"> value
        <literal>always</> to allow standbys to always archive received
        <acronym>WAL</> files (Fujii Masao)
       </para>
      </listitem>

      <listitem>
<!--
2015-02-23 [5d2b45e] Fujii ..: Add GUC to control the time to wait before retr..
-->
       <para>
        Add configuration
        parameter <xref linkend="guc-wal-retrieve-retry-interval"> to
        control <acronym>WAL</> read retry after failure
        (Alexey Vasiliev, Michael Paquier)
       </para>

       <para>
        This is particularly helpful for warm standbys.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-11 [57aa5b2] Fujii ..: Add GUC to enable compression of full page imag..
-->
       <para>
        Allow compression of full-page images stored in <acronym>WAL</>
        (Rahila Syed, Michael Paquier)
       </para>

       <para>
        This feature reduces WAL volume, at the cost of more CPU time spent
        on WAL logging and WAL replay.  It is controlled by a new
        configuration parameter <xref linkend="guc-wal-compression">, which
        currently is off by default.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-08 [de76884] Heikki..: At promotion, archive last segment from old tim..
-->
       <para>
        Archive <acronym>WAL</> files with suffix <literal>.partial</>
        during standby promotion (Heikki Linnakangas)
       </para>
      </listitem>

      <listitem>
<!--
2014-09-13 [4ad2a54] Fujii ..: Add GUC to enable logging of replication comman..
-->
       <para>
        Add configuration parameter <xref
        linkend="guc-log-replication-commands">
        to log replication commands (Fujii Masao)
       </para>

       <para>
        By default, replication commands, e.g., <link
        linkend="protocol-replication"><literal>IDENTIFY_SYSTEM</></>,
        are not logged, even when <xref linkend="guc-log-statement"> is set
        to <literal>all</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-04-21 [d811c03] Andres..: Add 'active_in' column to pg_replication_slots.
-->
       <para>
        Report the processes holding replication slots in <link
        linkend="view-pg-replication-slots"><structname>pg_replication_slots</></>
        (Craig Ringer)
       </para>

       <para>
        The new output column is <structname>active_pid</>.
       </para>
      </listitem>

      <listitem>
<!--
2014-11-25 [b3fc672] Heikki..: Allow using connection URI in primary_conninfo.
-->
       <para>
        Allow <filename>recovery.conf</>'s <link
        linkend="primary-conninfo"><varname>primary_conninfo</></> setting to
        use connection <acronym>URI</>s, e.g., <literal>postgres://</>
        (Alexander Shulgin)
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Queries</title>

     <itemizedlist>

      <listitem>
<!--
2015-05-08 [168d580] Andres..: Add support for INSERT ... ON CONFLICT DO NOTHI..
2015-05-08 [2c8f483] Andres..: Represent columns requiring insert and update p..
-->
       <para>
        Allow <link linkend="sql-on-conflict"><command>INSERT</></>s
        that would generate constraint conflicts to be turned into
        <command>UPDATE</>s or ignored (Peter Geoghegan, Heikki
        Linnakangas, Andres Freund)
       </para>

       <para>
        The syntax is <command>INSERT ... ON CONFLICT DO NOTHING/UPDATE</>.
        This is the Postgres implementation of the popular
        <command>UPSERT</> command.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-16 [f3d3118] Andres..: Support GROUPING SETS, CUBE and ROLLUP.
-->
       <para>
        Add <literal>GROUP BY</> analysis features <link
        linkend="queries-grouping-sets"><literal>GROUPING SETS</></>,
        <link linkend="queries-grouping-sets"><literal>CUBE</></> and
        <link linkend="queries-grouping-sets"><literal>ROLLUP</></>
        (Andrew Gierth, Atri Sharma)
       </para>
      </listitem>

      <listitem>
<!--
2014-06-18 [8f889b1] Tom Lane: Implement UPDATE tab SET (col1,col2,...) = (SEL..
-->
       <para>
        Allow setting multiple target columns in
        an <link linkend="SQL-UPDATE"><command>UPDATE</></> from the result of
        a single sub-SELECT (Tom Lane)
       </para>

       <para>
        This is accomplished using the syntax <command>UPDATE tab SET
        (col1, col2, ...) = (SELECT ...)</>.
       </para>
      </listitem>

      <listitem>
<!--
2014-10-07 [df630b0] Alvaro..: Implement SKIP LOCKED for row-level locks
-->
       <para>
        Add <link linkend="SQL-SELECT"><command>SELECT</></> option
        <literal>SKIP LOCKED</> to skip locked rows (Thomas Munro)
       </para>

       <para>
        This does not throw an error for locked rows like
        <literal>NOWAIT</> does.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-15 [f6d208d] Simon ..: TABLESAMPLE, SQL Standard and extensible
-->
       <para>
        Add <link linkend="SQL-SELECT"><command>SELECT</></> option
        <literal>TABLESAMPLE</> to return a subset of a table (Petr
        Jel&iacute;nek)
       </para>

       <para>
        This feature supports the SQL-standard table sampling methods.
        In addition, there are provisions
        for <link linkend="tablesample-method">user-defined
        table sampling methods</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-11 [e529cd4] Robert..: Suggest to the user the column they may have m..
-->
       <para>
        Suggest possible matches for mistyped column names (Peter
        Geoghegan, Robert Haas)
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Utility Commands</title>

     <itemizedlist>

      <listitem>
<!--
2015-01-16 [20af53d] Tom Lane: Show sort ordering options in EXPLAIN output.
-->
       <para>
        Add more details about sort ordering in <link
        linkend="SQL-EXPLAIN"><command>EXPLAIN</></> output (Marius Timmer,
        Lukas Kreft, Arne Scheffer)
       </para>

       <para>
        Details include <literal>COLLATE</>, <literal>DESC</>,
        <literal>USING</>, and <literal>NULLS FIRST</><literal>/LAST</>.
       </para>
      </listitem>

      <listitem>
<!--
2014-12-18 [35192f0] Alvaro..: Have VACUUM log number of skipped pages due to ..
-->
       <para>
        Make <link linkend="SQL-VACUUM"><command>VACUUM</></> log the
        number of pages skipped due to pins (Jim Nasby)
       </para>
      </listitem>

      <listitem>
<!--
2015-02-20 [d42358e] Alvaro..: Have TRUNCATE update pgstat tuple counters
-->
       <para>
        Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE</></> properly
        update the <literal>pg_stat</>* tuple counters (Alexander Shulgin)
       </para>
      </listitem>

       </itemizedlist>

       <sect4>
        <title><xref linkend="SQL-REINDEX"></title>

        <itemizedlist>

      <listitem>
<!--
2014-12-09 [fe263d1] Simon ..: REINDEX SCHEMA
-->
       <para>
        Allow <command>REINDEX</> to reindex an entire schema using the
        <literal>SCHEMA</> option (Sawada Masahiko)
       </para>
      </listitem>

      <listitem>
<!--
2015-05-15 [ecd222e] Fujii ..: Support VERBOSE option in REINDEX command.
-->
       <para>
        Add <literal>VERBOSE</> option to <command>REINDEX</> (Sawada
        Masahiko)
       </para>
      </listitem>

      <listitem>
<!--
2014-12-09 [ae4e688] Simon ..: Silence REINDEX
-->
       <para>
        Prevent <command>REINDEX DATABASE</> and <command>SCHEMA</>
        from outputting object names, unless <literal>VERBOSE</> is used
        (Simon Riggs)
       </para>
      </listitem>

      <listitem>
<!--
2015-04-09 [17d436d] Fujii ..: Remove obsolete FORCE option from REINDEX.
-->
       <para>
        Remove obsolete <literal>FORCE</> option from <command>REINDEX</>
        (Fujii Masao)
       </para>
      </listitem>

      </itemizedlist>

     </sect4>
   </sect3>

   <sect3>
    <title>Object Manipulation</title>

     <itemizedlist>

      <listitem>
<!--
2014-09-19 [491c029] Stephe..: Row-Level Security Policies (RLS)
-->
       <para>
        Add  <link linkend="ddl-rowsecurity">row-level security control</>
        (Craig Ringer, KaiGai Kohei, Adam Brightwell, Dean Rasheed,
        Stephen Frost)
       </para>

       <para>
        This feature allows row-by-row control over which users can add,
        modify, or even see rows in a table.  This is controlled by new
        commands <link linkend="SQL-CREATEPOLICY"><command>CREATE</></>/<link
        linkend="SQL-ALTERPOLICY"><command>ALTER</></>/<link
        linkend="SQL-DROPPOLICY"><command>DROP POLICY</></> and <link
        linkend="SQL-ALTERTABLE"><command>ALTER TABLE ... ENABLE/DISABLE
        ROW SECURITY</></>.
       </para>
      </listitem>

      <listitem>
<!--
2014-08-22 [f41872d] Alvaro..: Implement ALTER TABLE .. SET LOGGED / UNLOGGED
-->
       <para>
        Allow changing of the <acronym>WAL</acronym>
        logging status of a table after creation with <link
        linkend="SQL-ALTERTABLE"><command>ALTER TABLE ... SET LOGGED /
        UNLOGGED</></> (Fabr&iacute;zio de Royes Mello)
       </para>
      </listitem>

      <listitem>
<!--
2014-08-26 [0076f26] Heikki..: Implement IF NOT EXISTS for CREATE SEQUENCE.
2014-11-06 [08309aa] Fujii ..: Implement IF NOT EXIST for CREATE INDEX.
2014-12-13 [e39b6f9] Andrew..: Add CINE option for CREATE TABLE AS and CREATE ..
-->
       <para>
        Add <literal>IF NOT EXISTS</> clause to <link
        linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></>,
        <link linkend="SQL-CREATEINDEX"><command>CREATE INDEX</></>,
        <link linkend="SQL-CREATESEQUENCE"><command>CREATE SEQUENCE</></>,
        and <link linkend="SQL-CREATEMATERIALIZEDVIEW"><command>CREATE
        MATERIALIZED VIEW</></> (Fabr&iacute;zio de Royes Mello)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-24 [1d8198b] Bruce ..: Add support for ALTER TABLE IF EXISTS ... RENAM..
-->
       <para>
        Add support for <literal>IF EXISTS</> to <link
        linkend="SQL-ALTERTABLE"><command>ALTER TABLE ... RENAME
        CONSTRAINT</></> (Bruce Momjian)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-09 [31eae60] Alvaro..: Allow CURRENT/SESSION_USER to be used in certai..
-->
       <para>
        Allow some DDL commands to accept <literal>CURRENT_USER</>
        or <literal>SESSION_USER</>, meaning the current user or session
        user, in place of a specific user name (Kyotaro Horiguchi,
        &Aacute;lvaro Herrera)
       </para>

       <para>
        This feature is now supported in
        <xref linkend="SQL-ALTERUSER">, <xref linkend="SQL-ALTERGROUP">,
        <xref linkend="SQL-ALTERROLE">, <xref linkend="SQL-GRANT">,
        and <command>ALTER <replaceable>object</> OWNER TO</> commands.
       </para>
      </listitem>

      <listitem>
<!--
2014-12-23 [7eca575] Alvaro..: get_object_address: separate domain constraints..
-->
       <para>
        Support comments on <link linkend="SQL-CREATEDOMAIN">domain
        constraints</> (&Aacute;lvaro Herrera)
       </para>
      </listitem>

      <listitem>
<!--
2015-04-05 [0ef0396] Simon ..: Reduce lock levels of some trigger DDL and add ..
-->
       <para>
        Reduce lock levels of some create and alter trigger and foreign
        key commands (Simon Riggs, Andreas Karlsson)
       </para>
      </listitem>

      <listitem>
<!--
2015-05-11 [fa26424] Stephe..: Allow LOCK TABLE .. ROW EXCLUSIVE MODE with IN..
-->
       <para>
        Allow <link linkend="SQL-LOCK"><command>LOCK TABLE ... ROW EXCLUSIVE
        MODE</></> for those with <command>INSERT</> privileges on the
        target table (Stephen Frost)
       </para>

       <para>
        Previously this command required <command>UPDATE</>, <command>DELETE</>,
        or <command>TRUNCATE</> privileges.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-23 [e5f455f] Tom Lane: Apply table and domain CHECK constraints in nam.
-->
       <para>
        Apply table and domain <literal>CHECK</> constraints in order by name
        (Tom Lane)
       </para>

       <para>
        The previous ordering was indeterminate.
       </para>
      </listitem>

      <listitem>
<!--
2014-07-01 [15c82ef] Tom Lane: Refactor CREATE/ALTER DATABASE syntax so option..
2014-07-01 [fbb1d7d] Tom Lane: Allow CREATE/ALTER DATABASE to manipulate datis..
-->
       <para>
        Allow <link
        linkend="SQL-CREATEDATABASE"><command>CREATE</></>/<link
        linkend="SQL-ALTERDATABASE"><command>ALTER DATABASE</></>
        to manipulate <structname>datistemplate</> and
        <structname>datallowconn</> (Vik Fearing)
       </para>

       <para>
        This allows these per-database settings to be
        changed without manually modifying the <link
        linkend="catalog-pg-database"><structname>pg_database</></>
        system catalog.
       </para>
      </listitem>

     </itemizedlist>

     <sect4>
      <title><link linkend="ddl-foreign-data">Foreign Tables</link></title>

      <itemizedlist>

      <listitem>
<!--
2014-07-10 [59efda3] Tom Lane: Implement IMPORT FOREIGN SCHEMA.
-->
       <para>
        Add support for <xref linkend="SQL-IMPORTFOREIGNSCHEMA">
        (Ronan Dunklau, Michael Paquier, Tom Lane)
       </para>

       <para>
        This command allows automatic creation of local foreign tables
        that match the structure of existing tables on a remote server.
       </para>
      </listitem>

      <listitem>
<!--
2014-12-17 [fc2ac1f] Tom Lane: Allow CHECK constraints to be placed on foreign..
-->
       <para>
        Allow <literal>CHECK</> constraints to be placed on foreign tables
        (Shigeru Hanada, Etsuro Fujita)
       </para>

       <para>
        Such constraints are assumed to be enforced on the remote server,
        and are not enforced locally.  However, they are assumed to hold for
        purposes of query optimization, such
        as <link linkend="ddl-partitioning-constraint-exclusion">constraint
        exclusion</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-22 [cb1ca4d] Tom Lane: Allow foreign tables to participate in inherita..
-->
       <para>
        Allow foreign tables to participate in inheritance (Shigeru Hanada,
        Etsuro Fujita)
       </para>

       <para>
        To let this work naturally, foreign tables are now allowed to have
        check constraints marked as not valid, and to set storage
        and <type>OID</> characteristics, even though these operations are
        effectively no-ops for a foreign table.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-01 [e7cb7ee] Robert..: Allow FDWs and custom scan providers to replace..
2015-05-10 [1a8a4e5] Tom Lane: Code review for foreign/custom join pushdown pa..
-->
       <para>
        Allow foreign data wrappers and custom scans to implement join
        pushdown (KaiGai Kohei)
       </para>
      </listitem>

     </itemizedlist>

     </sect4>

     <sect4>
      <title><link linkend="event-triggers">Event Triggers</link></title>

      <itemizedlist>

       <listitem>
<!--
2015-05-11 [b488c58] Alvaro..: Allow on-the-fly capture of DDL event details
-->
        <para>
         Whenever a <literal>ddl_command_end</> event trigger is installed,
         capture details of <acronym>DDL</> activity for it to inspect
         (&Aacute;lvaro Herrera)
        </para>

        <para>
         This information is available through a set-returning function <link
         linkend="pg-event-trigger-ddl-command-end-functions"><function>pg_event_trigger_ddl_commands()</></link>,
         or by inspection of C data structures if that function doesn't
         provide enough detail.
        </para>
       </listitem>

       <listitem>
<!--
2014-12-08 [618c943] Simon ..: Event Trigger for table_rewrite
-->
        <para>
         Allow event triggers on table rewrites caused by <link
         linkend="SQL-ALTERTABLE"><command>ALTER TABLE</></> (Dimitri
         Fontaine)
        </para>
       </listitem>

       <listitem>
<!--
2015-02-23 [296f3a6] Alvaro..: Support more commands in event triggers
-->
        <para>
         Add event trigger support for database-level <link
         linkend="SQL-COMMENT"><command>COMMENT</></>, <link
         linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></>,
         and <link linkend="SQL-GRANT"><command>GRANT</></>/<link
         linkend="SQL-REVOKE"><command>REVOKE</></> (&Aacute;lvaro Herrera)
        </para>
       </listitem>

       <listitem>
<!--
2014-12-30 [72dd233] Alvaro..: pg_event_trigger_dropped_objects: Add name/args..
2015-04-06 [e9a077c] Alvaro..: pg_event_trigger_dropped_objects: add is_temp c..
-->
        <para>
         Add columns to the output of <link
         linkend="pg-event-trigger-sql-drop-functions"><function>pg_event_trigger_dropped_objects</></>
         (&Aacute;lvaro Herrera)
        </para>

        <para>
         This allows simpler processing of delete operations.
        </para>
       </listitem>

      </itemizedlist>

     </sect4>

   </sect3>

   <sect3>
    <title>Data Types</title>

    <itemizedlist>

     <listitem>
<!--
2014-09-09 [57b1085] Peter ..: Allow empty content in xml type
-->
      <para>
       Allow the <link linkend="datatype-xml"><type>xml</></> data type
       to accept empty or all-whitespace content values (Peter Eisentraut)
      </para>

      <para>
       This is required by the <acronym>SQL</>/<acronym>XML</>
       specification.
      </para>
     </listitem>

     <listitem>
<!--
2014-10-21 [6f04368] Peter ..: Allow input format xxxx-xxxx-xxxx for macaddr ..
-->
      <para>
       Allow <link linkend="datatype-macaddr"><type>macaddr</></> input
       using the format <literal>xxxx-xxxx-xxxx</> (Herwin Weststrate)
      </para>
     </listitem>

     <listitem>
<!--
2014-10-18 [417f924] Bruce ..: interval:  tighten precision specification
-->
      <para>
       Disallow non-SQL-standard syntax for <link
       linkend="datatype-interval-input"><type>interval</></link> with
       both precision and field specifications (Bruce Momjian)
      </para>

      <para>
       Per the standard, such type specifications should be written as,
       for example, <literal>INTERVAL MINUTE TO SECOND(2)</>.
       <productname>PostgreSQL</> formerly allowed this to be written as
       <literal>INTERVAL(2) MINUTE TO SECOND</>, but it must now be
       written in the standard way.
      </para>
     </listitem>

     <listitem>
<!--
2015-04-01 [89840d7] Tom Lane: Provide real selectivity estimators for inet/ci..
-->
      <para>
       Add selectivity estimators for <link
       linkend="datatype-inet"><type>inet</></>/<link
       linkend="datatype-cidr"><type>cidr</></> operators and improve
       estimators for text search functions (Emre Hasegeli, Tom Lane)
      </para>
     </listitem>

     <listitem>
<!--
2015-05-09 [0c90f67] Andrew..: Add new OID alias type regrole
2015-05-09 [cb9fa80] Andrew..: Add new OID alias type regnamespace
-->
      <para>
       Add data
       types <link linkend="datatype-oid-table"><type>regrole</></link>
       and <link linkend="datatype-oid-table"><type>regnamespace</></link>
       to simplify entering and pretty-printing the <type>OID</> of a role
       or namespace (Kyotaro Horiguchi)
      </para>
     </listitem>

    </itemizedlist>

    <sect4>
     <title><link linkend="datatype-json"><acronym>JSON</></link></title>

     <itemizedlist>

      <listitem>
<!--
2015-05-12 [c694701] Andrew..: Additional functions and operators for jsonb
2015-05-31 [37def42] Andrew..: Rename jsonb_replace to jsonb_set and allow it ..
-->
       <para>
        Add <type>jsonb</> functions <link
        linkend="functions-json-processing-table"><function>jsonb_set()</></>
        and <link
        linkend="functions-json-processing-table"><function>jsonb_pretty()</></>
        (Dmitry Dolgov, Andrew Dunstan, Petr Jel&iacute;nek)
       </para>
      </listitem>

      <listitem>
<!--
2014-12-12 [7e354ab] Andrew..: Add several generator functions for jsonb that ..
-->
       <para>
        Add <type>jsonb</> generator functions <link
        linkend="functions-json-creation-table"><function>to_jsonb()</></>,
        <link
        linkend="functions-json-creation-table"><function>jsonb_object()</></>,
        <link
        linkend="functions-json-creation-table"><function>jsonb_build_object()</></>,
        <link
        linkend="functions-json-creation-table"><function>jsonb_build_array()</></>,
        <link
        linkend="functions-aggregate-table"><function>jsonb_agg()</></>,
        and <link
        linkend="functions-aggregate-table"><function>jsonb_object_agg()</></>
        (Andrew Dunstan)
       </para>

       <para>
        Equivalent functions already existed for type <type>json</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-03 [b67f1ce] Tom Lane: Reduce json <=> jsonb casts from explicit-only..
-->
       <para>
        Reduce casting requirements to/from <link
        linkend="datatype-json"><type>json</></> and <link
        linkend="datatype-json"><type>jsonb</></> (Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-06-11 [908e234] Andrew..: Rename jsonb - text[] operator to #- to avoid a..
-->
       <para>
        Allow <type>text</>, <type>text</> array, and <type>integer</>
        values to be <link linkend="functions-jsonb-op-table">subtracted</>
        from <type>jsonb</> documents (Dmitry Dolgov, Andrew Dunstan)
       </para>
      </listitem>

      <listitem>
<!--
2015-05-12 [c694701] Andrew..: Additional functions and operators for jsonb
-->
       <para>
        Add <type>jsonb</> <link
        linkend="functions-jsonb-op-table"><literal>||</></> operator
        (Dmitry Dolgov, Andrew Dunstan)
       </para>
      </listitem>

      <listitem>
<!--
2014-12-12 [237a882] Andrew..: Add json_strip_nulls and jsonb_strip_nulls fun..
-->
       <para>
        Add <link
        linkend="functions-json-processing-table"><function>json_strip_nulls()</></>
        and <link
        linkend="functions-json-processing-table"><function>jsonb_strip_nulls()</></>
        functions to remove JSON null values from documents
        (Andrew Dunstan)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Functions</title>

     <itemizedlist>

      <listitem>
<!--
2014-11-11 [1871c89] Fujii ..: Add generate_series(numeric, numeric).
-->
       <para>
        Add <link linkend="functions-srf"><function>generate_series()</></>
        for <type>numeric</> values (Plato Malugin)
       </para>
      </listitem>

      <listitem>
<!--
2014-11-25 [bac2739] Tom Lane: Support arrays as input to array_agg() and ARRA..
-->
       <para>
        Allow <link
        linkend="functions-aggregate-table"><function>array_agg()</></> and
        <function>ARRAY()</> to take arrays as inputs (Ali Akbar, Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-18 [13dbc7a] Alvaro..: array_offset() and array_offsets()
2015-03-30 [97690ea] Alvaro..: Change array_offset to return subscripts, not o..
-->
       <para>
        Add functions <link
        linkend="array-functions-table"><function>array_position()</></>
        and <link
        linkend="array-functions-table"><function>array_positions()</></>
        to return subscripts of array values (Pavel Stehule)
       </para>
      </listitem>

      <listitem>
<!--
2014-12-15 [4520ba6] Heikki..: Add point <-> polygon distance operator.
-->
       <para>
        Add a <type>point</>-to-<type>polygon</> distance operator
        <link linkend="functions-geometry-op-table">&lt;-&gt;</>
        (Alexander Korotkov)
       </para>
      </listitem>

      <listitem>
<!--
2014-08-27 [8167a38] Jeff D..: Allow multibyte characters as escape in SIMILA..
-->
       <para>
        Allow multibyte characters as escapes in <link
        linkend="functions-similarto-regexp"><literal>SIMILAR TO</></>
        and <link linkend="functions-string-sql"><literal>SUBSTRING</></>
        (Jeff Davis)
       </para>

       <para>
        Previously, only a single-byte character was allowed as an escape.
       </para>
      </listitem>

      <listitem>
<!--
2014-09-09 [e80252d] Tom Lane: Add width_bucket(anyelement, anyarray).
-->
       <para>
        Add a <link
        linkend="functions-math-func-table"><function>width_bucket()</></>
        variant that supports any sortable data type and non-uniform bucket
        widths (Petr Jel&iacute;nek)
       </para>
      </listitem>

      <listitem>
<!--
2015-06-28 [cb2acb1] Heikki..: Add missing_ok option to the SQL functions for..
-->
       <para>
        Add an optional <replaceable>missing_ok</> argument to <link
        linkend="functions-admin-genfile-table"><function>pg_read_file()</></>
        and related functions (Michael Paquier, Heikki Linnakangas)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-10 [865f14a] Robert..: Allow named parameters to be specified using =>..
-->
       <para>
        Allow <link linkend="sql-syntax-calling-funcs"><literal>=&gt;</></>
        to specify named parameters in function calls (Pavel Stehule)
       </para>

       <para>
        Previously only <literal>:=</> could be used.  This requires removing
        the possibility for <literal>=&gt;</> to be a user-defined operator.
        Creation of user-defined <literal>=&gt;</> operators has been issuing
        warnings since PostgreSQL 9.0.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-25 [06bf0dd] Tom Lane: Upgrade src/port/rint.c to be POSIX-compliant.
-->
       <para>
        Add <acronym>POSIX</>-compliant rounding for platforms that use
        PostgreSQL-supplied rounding functions (Pedro Gimeno Fortea)
       </para>
      </listitem>

     </itemizedlist>

    <sect4>
     <title>System Information Functions and Views</title>

     <itemizedlist>

      <listitem>
<!--
2014-12-23 [d7ee82e] Alvaro..: Add SQL-callable pg_get_object_address
2014-12-30 [a676201] Alvaro..: Add pg_identify_object_as_address
-->
       <para>
        Add function <link
        linkend="functions-info-object-table"><function>pg_get_object_address()</></>
        to return <type>OID</>s that uniquely
        identify an object, and function <link
        linkend="functions-info-object-table"><function>pg_identify_object_as_address()</></>
        to return object information based on <type>OID</>s (&Aacute;lvaro
        Herrera)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-19 [bf03889] Stephe..: GetUserId() changes to has_privs_of_role()
-->
       <para>
        Loosen security checks for viewing queries in <link
        linkend="pg-stat-activity-view"><structname>pg_stat_activity</></>,
        executing <link
        linkend="functions-admin-signal-table"><function>pg_cancel_backend()</></>,
        and executing <link
        linkend="functions-admin-signal-table"><function>pg_terminate_backend()</></>
        (Stephen Frost)
       </para>

       <para>
        Previously, only the specific role owning the target session could
        perform these operations; now membership in that role is sufficient.
       </para>
      </listitem>

      <listitem>
<!--
2015-02-19 [2fb7a75] Tom Lane: Add pg_stat_get_snapshot_timestamp() to show s..
-->
       <para>
        Add <link
        linkend="monitoring-stats-funcs-table"><function>pg_stat_get_snapshot_timestamp()</></>
        to output the time stamp of the statistics snapshot (Matt Kelly)
       </para>

       <para>
        This represents the last time the snapshot file was written to
        the file system.
       </para>
      </listitem>

      <listitem>
<!--
2014-09-10 [36ad1a8] Bruce ..: Implement mxid_age() to compute multi-xid age
-->
       <para>
        Add <link
        linkend="vacuum-for-multixact-wraparound"><function>mxid_age()</></>
        to compute multi-xid age (Bruce Momjian)
       </para>
      </listitem>
     </itemizedlist>

    </sect4>

    <sect4>
     <title>Aggregates</title>

     <itemizedlist>

      <listitem>
<!--
2014-08-28 [6c40f83] Tom Lane: Add min and max aggregates for inet/cidr data t..
-->
       <para>
        Add <function>min()</>/<function>max()</> aggregates
        for <link linkend="datatype-inet"><type>inet</></>/<link
        linkend="datatype-cidr"><type>cidr</></> data types (Haribabu
        Kommi)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-20 [8122e14] Andres..: Add, optional, support for 128bit integers.
2015-03-20 [959277a] Andres..: Use 128-bit math to accelerate some aggregation..
-->
       <para>
        Use 128-bit integers, where supported, as accumulators for some
        aggregate functions (Andreas Karlsson)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Server-Side Languages</title>

    <itemizedlist>

     <listitem>
<!--
2014-07-03 [8b6010b] Tom Lane: Improve support for composite types in PL/Python.
-->
      <para>
       Improve support for composite types in <link
       linkend="plpython"><application>PL/Python</></> (Ed Behn, Ronan
       Dunklau)
      </para>

      <para>
       This allows <application>PL/Python</> functions to return arrays
       of composite types.
      </para>
     </listitem>

     <listitem>
<!--
2015-03-11 [1ce7a57] Peter ..: PL/Python: Avoid lossiness in float conversion
-->
      <para>
       Reduce lossiness of <link
       linkend="plpython"><application>PL/Python</></> floating-point value
       conversions (Marko Kreen)
      </para>
     </listitem>

     <listitem>
<!--
2015-04-26 [cac7658] Peter ..: Add transforms feature
-->
      <para>
       Allow specification of conversion routines between <acronym>SQL</>
       data types and data types of procedural languages (Peter Eisentraut)
      </para>

      <para>
       This change adds new commands <link
       linkend="SQL-CREATETRANSFORM"><command>CREATE</></>/<link
       linkend="SQL-DROPTRANSFORM"><command>DROP TRANSFORM</></>.
       This also adds optional transformations between the <link
       linkend="hstore"><application>hstore</></> and <link
       linkend="ltree"><application>ltree</></> types to/from <link
       linkend="plperl"><application>PL/Perl</></> and <link
       linkend="plpython"><application>PL/Python</></>.
      </para>
     </listitem>

     </itemizedlist>

     <sect4>
      <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>

      <itemizedlist>

     <listitem>
<!--
2015-05-14 [1dc5ebc] Tom Lane: Support "expanded" objects, particularly arrays..
2015-02-16 [e983c4d] Tom Lane: Rationalize the APIs of array element/slice acc..
2015-02-18 [56a79a8] Tom Lane: Split array_push into separate array_append and..
2015-02-16 [9e3ad1a] Tom Lane: Use fast path in plpgsql's RETURN/RETURN NEXT i..
-->
      <para>
       Improve <link linkend="plpgsql"><application>PL/pgSQL</></> array
       performance (Tom Lane)
      </para>
     </listitem>

     <listitem>
<!--
2015-03-25 [a4847fc] Tom Lane: Add an ASSERT statement in plpgsql.
-->
      <para>
       Add an <link linkend="plpgsql-statements-assert"><command>ASSERT</></>
       statement in <application>PL/pgSQL</> (Pavel Stehule)
      </para>
     </listitem>

     <listitem>
<!--
2014-11-25 [bb1b8f6] Tom Lane: De-reserve most statement-introducing keywords ..
-->
      <para>
       Allow more <link linkend="plpgsql"><application>PL/pgSQL</></>
       keywords to be used as identifiers (Tom Lane)
      </para>
     </listitem>

    </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Client Applications</title>

    <itemizedlist>

     <listitem>
<!--
2015-04-11 [83aca89] Peter ..: Move pg_archivecleanup from contrib/ to src/bin/
2015-04-19 [00882d9] Peter ..: Move pg_test_fsync from contrib/ to src/bin/
2015-04-20 [528c2e4] Peter ..: Move pg_test_timing from contrib/ to src/bin/
2015-04-21 [b0a738f] Peter ..: Move pg_xlogdump from contrib/ to src/bin/
-->
      <para>
       Move <link
       linkend="pgarchivecleanup"><application>pg_archivecleanup</></>,
       <link linkend="pgtestfsync"><application>pg_test_fsync</></>,
       <link linkend="pgtesttiming"><application>pg_test_timing</></>,
       and <link linkend="pgxlogdump"><application>pg_xlogdump</></>
       from <filename>contrib</> to <filename>src/bin</> (Peter Eisentraut)
      </para>

      <para>
       This should result in these programs being installed by default in
       most installations.
      </para>
     </listitem>

     <listitem>
<!--
2015-03-23 [61081e7] Heikki..: Add pg_rewind, for re-synchronizing a master se..
-->
      <para>
       Add <link linkend="app-pgrewind"><application>pg_rewind</></>,
       which allows re-synchronizing a master server after failback
       (Heikki Linnakangas)
      </para>
     </listitem>

     <listitem>
<!--
2014-10-06 [d9f38c7] Andres..: Add support for managing physical replication s..
-->
      <para>
       Allow <link
       linkend="app-pgreceivexlog"><application>pg_receivexlog</></>
       to manage physical replication slots (Michael Paquier)
      </para>

      <para>
       This is controlled via new <option>--create-slot</> and
       <option>--drop-slot</> options.
      </para>
     </listitem>

     <listitem>
<!--
2014-11-18 [c4f99d2] Fujii ..: Add &#8211;&#8211;synchronous option to pg_receivexlog, for..
-->
      <para>
       Allow <link
       linkend="app-pgreceivexlog"><application>pg_receivexlog</></>
       to synchronously flush <acronym>WAL</> to storage using new
       <option>--synchronous</> option (Furuya Osamu, Fujii Masao)
      </para>

      <para>
       Without this, <acronym>WAL</> files are fsync'ed only on close.
      </para>
     </listitem>

     <listitem>
<!--
2015-01-23 [a179232] Alvaro..: vacuumdb: enable parallel mode
-->
      <para>
       Allow <link linkend="APP-VACUUMDB"><application>vacuumdb</></> to
       vacuum in parallel using new <option>--jobs</> option (Dilip Kumar)
      </para>
     </listitem>

     <listitem>
<!--
2015-11-12 [5094da9] Alvaro..: vacuumdb: don't prompt for passwords over and ..
-->
      <para>
       In <link linkend="APP-VACUUMDB"><application>vacuumdb</></>, do not
       prompt for the same password repeatedly when multiple connections
       are necessary (Haribabu Kommi, Michael Paquier)
      </para>
     </listitem>

     <listitem>
<!--
2015-05-15 [458a077] Fujii ..: Support &#8211;&#8211;verbose option in reindexdb.
-->
      <para>
       Add <option>--verbose</> option to <link
       linkend="APP-REINDEXDB"><application>reindexdb</></> (Sawada
       Masahiko)
      </para>
     </listitem>

     <listitem>
<!--
2015-05-12 [72d422a] Andrew..: Map basebackup tablespaces using a tablespace_..
-->
      <para>
       Make <link linkend="app-pgbasebackup"><application>pg_basebackup</></>
       use a tablespace mapping file when using <application>tar</> format,
       to support symbolic links and file paths of 100+ characters in length
       on <systemitem class="osname">MS Windows</> (Amit Kapila)
      </para>
     </listitem>

     <listitem>
<!--
2014-09-19 [728f152] Andres..: Add rmgr callback to name xlog record types for..
2014-09-19 [bdd5726] Andres..: Add the capability to display summary statistic..
-->
      <para>
       Add <link linkend="pgxlogdump"><application>pg_xlogdump</></> option
       <option>--stats</> to display summary statistics (Abhijit Menon-Sen)
      </para>
     </listitem>

    </itemizedlist>

     <sect4>
      <title><xref linkend="APP-PSQL"></title>

      <itemizedlist>

       <listitem>
<!--
2015-03-31 [9d9991c] Bruce ..: psql:  add asciidoc output format
-->
        <para>
         Allow <application>psql</> to produce AsciiDoc output (Szymon Guz)
        </para>
       </listitem>

       <listitem>
<!--
2014-07-10 [5b214c5] Fujii ..: Add new ECHO mode 'errors' that displays only ..
-->
        <para>
         Add an <literal>errors</> mode that displays only failed commands
         to <application>psql</>'s <varname>ECHO</> variable
         (Pavel Stehule)
        </para>

        <para>
         This behavior can also be selected with <application>psql</>'s
         <option>-b</> option.
        </para>
       </listitem>

       <listitem>
<!--
2014-09-12 [a2dabf0] Stephe..: Add unicode_{column|header|border}_style to psql
-->
        <para>
         Provide separate column, header, and border linestyle control
         in <application>psql</>'s unicode linestyle (Pavel Stehule)
        </para>

        <para>
         Single or double lines are supported; the default is
         <literal>single</>.
        </para>
       </listitem>

       <listitem>
<!--
2014-09-02 [51bb795] Andres..: Add psql PROMPT variable showing which line of ..
-->
        <para>
         Add new option <literal>%l</> in <application>psql</>'s <link
         linkend="APP-PSQL-variables"><envar>PROMPT</></> variables
         to display the current multiline statement line number
         (Sawada Masahiko)
        </para>
       </listitem>

       <listitem>
<!--
2015-03-28 [7655f4c] Andrew..: Add a pager_min_lines setting to psql
-->
        <para>
         Add <literal>\pset</> option <link
         linkend="APP-PSQL-meta-commands"><varname>pager_min_lines</></>
         to control pager invocation (Andrew Dunstan)
        </para>
       </listitem>

       <listitem>
<!--
2014-11-21 [4077fb4] Andrew..: Fix an error in psql that overcounted output l..
-->
        <para>
         Improve <application>psql</> line counting used when deciding
         to invoke the pager (Andrew Dunstan)
        </para>
       </listitem>

       <listitem>
<!--
2015-12-03 [07338cb] Tom Lane: Clean up some psql issues around handling of t..
2015-12-08 [e90371d] Tom Lane: Make failure to open psql log-file fatal.
-->
        <para>
         <application>psql</> now fails if the file specified by
         an <option>--output</> or <option>--log-file</> switch cannot be
         written (Tom Lane, Daniel V&eacute;rit&eacute;)
        </para>

        <para>
         Previously, it effectively ignored the switch in such cases.
        </para>
       </listitem>

       <listitem>
<!--
2014-07-12 [bd40951] Andres..: Minimal psql tab completion support for SET se..
-->
        <para>
         Add <application>psql</> tab completion when setting the
         <xref linkend="guc-search-path"> variable (Jeff Janes)
        </para>

        <para>
         Currently only the first schema can be tab-completed.
        </para>
       </listitem>

       <listitem>
<!--
2014-06-23 [631e7f6] Heikki..: Improve tab-completion of DROP and ALTER ENABLE..
-->
        <para>
         Improve <application>psql</>'s tab completion for triggers and rules
         (Andreas Karlsson)
        </para>
       </listitem>

      </itemizedlist>

     <sect5>
      <title><link linkend="APP-PSQL-meta-commands">Backslash Commands</link></title>

      <itemizedlist>

       <listitem>
<!--
2014-09-10 [07c8651] Andres..: Add new psql help topics, accessible to both..
-->
        <para>
         Add <application>psql</> <command>\?</> help sections
         <literal>variables</> and <literal>options</> (Pavel Stehule)
        </para>

        <para>
         <literal>\? variables</> shows <application>psql</>'s special
         variables and <literal>\? options</> shows the command-line options.
         <command>\? commands</> shows the meta-commands, which is the
         traditional output and remains the default.  These help displays
         can also be obtained with the command-line
         option <literal>--help=<replaceable>section</></literal>.
        </para>
       </listitem>

       <listitem>
<!--
2014-07-14 [ee80f04] Alvaro..: psql: Show tablespace size in \db+
-->
        <para>
         Show tablespace size in <application>psql</>'s <literal>\db+</>
         (Fabr&iacute;zio de Royes Mello)
        </para>
       </listitem>

       <listitem>
<!--
2015-04-09 [a6f3c1f] Magnus..: Show owner of types in psql \dT+
-->
        <para>
         Show data type owners in <application>psql</>'s <literal>\dT+</>
         (Magnus Hagander)
        </para>
       </listitem>

       <listitem>
<!--
2014-09-04 [f6f654f] Fujii ..: Allow \watch to display query execution time if..
-->
        <para>
         Allow <application>psql</>'s <command>\watch</> to output
         <command>\timing</> information (Fujii Masao)
        </para>

        <para>
         Also prevent <option>--echo-hidden</> from echoing
         <command>\watch</> queries, since that is generally unwanted.
        </para>
       </listitem>

       <listitem>
<!--
2014-11-22 [eca2b9b] Andrew..: Rework echo_hidden for \sf and \ef from commit ..
-->
        <para>
         Make <application>psql</>'s <literal>\sf</> and <literal>\ef</>
         commands honor <envar>ECHO_HIDDEN</> (Andrew Dunstan)
        </para>
       </listitem>

       <listitem>
<!--
2014-08-12 [e15c4ab] Fujii ..: Add tab-completion for \unset and valid setting..
-->
        <para>
         Improve <application>psql</> tab completion for <command>\set</>,
         <command>\unset</>, and <literal>:variable</> names (Pavel
         Stehule)
        </para>
       </listitem>

       <listitem>
<!--
2014-11-10 [095d401] Robert..: Tab complete second argument to \c with role n..
-->
        <para>
         Allow tab completion of role names
         in <application>psql</> <literal>\c</> commands (Ian Barwick)
        </para>
       </listitem>

      </itemizedlist>

     </sect5>

    </sect4>

    <sect4>
     <title><xref linkend="APP-PGDUMP"></title>

     <itemizedlist>

      <listitem>
<!--
2014-11-17 [be1cc8f] Simon ..: Add pg_dump &#8211;&#8211;snapshot option
-->
       <para>
        Allow <application>pg_dump</> to share a snapshot taken by another
        session using <option>--snapshot</> (Simon Riggs, Michael Paquier)
       </para>

       <para>
        The remote snapshot must have been exported by
        <function>pg_export_snapshot()</> or logical replication slot
        creation.  This can be used to share a consistent snapshot
        across multiple <application>pg_dump</> processes.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-21 [5f5e68b] Tom Lane: Adopt the GNU convention for handling tar-arch..
-->
       <para>
        Support table sizes exceeding 8GB in tar archive format (Tom Lane)
       </para>

       <para>
        The POSIX standard for tar format does not allow elements of a tar
        archive to exceed 8GB, but most modern implementations of tar
        support an extension that does allow it.  Use the extension format
        when necessary, rather than failing.
       </para>
      </listitem>

      <listitem>
<!--
2014-07-07 [7700597] Tom Lane: In pg_dump, show server and pg_dump versions w..
-->
       <para>
        Make <application>pg_dump</> always print the server and
        <application>pg_dump</> versions (Jing Wang)
       </para>

       <para>
        Previously, version information was only printed in
        <option>--verbose</> mode.
       </para>
      </listitem>

      <listitem>
<!--
2015-06-04 [232cd63] Fujii ..: Remove -i/-ignore-version option from pg_dump..
-->
       <para>
        Remove the long-ignored <option>-i</>/<option>--ignore-version</>
        option from <application>pg_dump</>, <application>pg_dumpall</>,
        and <application>pg_restore</> (Fujii Masao)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><xref linkend="app-pg-ctl"></title>

     <itemizedlist>

      <listitem>
<!--
2014-08-25 [ebe30ad] Bruce ..: pg_ctl, pg_upgrade:  allow multiple -o/-O opti..
-->
       <para>
        Support multiple <application>pg_ctl</> <option>-o</> options,
        concatenating their values (Bruce Momjian)
       </para>
      </listitem>

      <listitem>
<!--
2014-07-17 [c0e4520] Magnus..: Add option to pg_ctl to choose event source for..
-->
       <para>
        Allow control of <application>pg_ctl</>'s event source logging
        on <systemitem class="osname">MS Windows</> (MauMau)
       </para>

       <para>
        This only controls <application>pg_ctl</>, not the server, which
        has separate settings in <filename>postgresql.conf</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-08 [bdb42ba] Noah M..: Don't connect() to a wildcard address in test_..
-->
       <para>
        If the server's listen address is set to a wildcard value
        (<literal>0.0.0.0</> in IPv4 or <literal>::</> in IPv6), connect via
        the loopback address rather than trying to use the wildcard address
        literally (Kondo Yuta)
       </para>

       <para>
        This fix primarily affects Windows, since on other platforms
        <application>pg_ctl</> will prefer to use a Unix-domain socket.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><xref linkend="pgupgrade"></title>

     <itemizedlist>

      <listitem>
<!--
2015-04-14 [9fa8b0e] Peter ..: Move pg_upgrade from contrib/ to src/bin/
-->
       <para>
        Move <application>pg_upgrade</> from <filename>contrib</> to
        <filename>src/bin</> (Peter Eisentraut)
       </para>

       <para>
        In connection with this change, the functionality previously
        provided by the <application>pg_upgrade_support</> module has been
        moved into the core server.
       </para>
      </listitem>

      <listitem>
<!--
2014-08-25 [ebe30ad] Bruce ..: pg_ctl, pg_upgrade:  allow multiple -o/-O optio..
-->
       <para>
        Support multiple <application>pg_upgrade</>
        <option>-o</>/<option>-O</> options,
        concatenating their values (Bruce Momjian)
       </para>
      </listitem>

      <listitem>
<!--
2014-10-10 [33755e8] Heikki..: Change the way encoding and locale checks are d..
-->
       <para>
        Improve database collation comparisons in
        <application>pg_upgrade</> (Heikki Linnakangas)
       </para>
      </listitem>

      <listitem>
<!--
2014-08-25 [2209b39] Bruce ..: pg_upgrade:  remove support for 8.3 old clusters
-->
       <para>
        Remove support for upgrading from 8.3 clusters (Bruce Momjian)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><xref linkend="pgbench"></title>

     <itemizedlist>

      <listitem>
<!--
2015-04-13 [81134af] Peter ..: Move pgbench from contrib/ to src/bin/
-->
       <para>
        Move pgbench from <filename>contrib</> to <filename>src/bin</>
        (Peter Eisentraut)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-30 [3c4c5ac] Tatsuo..: Fix incorrect tps number calculation in "exclu..
-->
       <para>
        Fix calculation of TPS number <quote>excluding connections
        establishing</> (Tatsuo Ishii, Fabien Coelho)
       </para>

       <para>
        The overhead for connection establishment was miscalculated whenever
        the number of pgbench threads was less than the number of client
        connections.  Although this is clearly a bug, we won't back-patch it
        into pre-9.5 branches since it makes TPS numbers not comparable to
        previous results.
       </para>
      </listitem>

      <listitem>
<!--
2014-10-13 [98aed6c] Heikki..: Add &#8211;&#8211;latency-limit option to pgbench.
-->
       <para>
        Allow counting of pgbench transactions that take over a specified
        amount of time (Fabien Coelho)
       </para>

       <para>
        This is controlled by a new <option>--latency-limit</> option.
       </para>
      </listitem>

      <listitem>
<!--
2014-07-30 [ed802e7] Robert..: pgbench: Allow \setrandom to generate Gaussian..
-->
       <para>
        Allow pgbench to generate Gaussian/exponential distributions
        using <command>\setrandom</> (Kondo Mitsumasa, Fabien Coelho)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-02 [878fdcb] Robert..: pgbench: Add a real expression syntax to \set
-->
       <para>
        Allow <application>pgbench</>'s <command>\set</> command to handle
        arithmetic expressions containing more than one operator, and add
        <literal>%</> (modulo) to the set of operators it supports
        (Robert Haas, Fabien Coelho)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Source Code</title>

     <itemizedlist>

      <listitem>
<!--
2014-11-20 [2c03216] Heikki..: Revamp the WAL record format.
-->
       <para>
        Simplify <link linkend="wal"><acronym>WAL</></> record format
        (Heikki Linnakangas)
       </para>

       <para>
        This allows external tools to more easily track what blocks
        are modified.
       </para>
      </listitem>

      <listitem>
<!--
2015-03-15 [4f1b890] Andres..: Merge the various forms of transaction commit &..
-->
       <para>
        Improve the representation of transaction commit and abort WAL
        records (Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2014-09-25 [b64d92f] Andres..: Add a basic atomic ops API abstracting away pla..
-->
       <para>
        Add atomic memory operations <acronym>API</> (Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2014-11-07 [0b03e59] Robert..: Introduce custom path and scan providers.
2014-11-20 [a34fa8e] Tom Lane: Initial code review for CustomScan patch.
2014-11-21 [c2ea228] Tom Lane: Simplify API for initially hooking custom-path ..
2014-11-21 [4477704] Tom Lane: Rearrange CustomScan API.
-->
       <para>
        Allow custom path and scan methods (KaiGai Kohei, Tom Lane)
       </para>

       <para>
        This allows extensions greater control over the optimizer and
        executor.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-12 [afb9249] Tom Lane: Add support for doing late row locking in FDWs.
-->
       <para>
        Allow foreign data wrappers to do post-filter locking (Etsuro
        Fujita)
       </para>
      </listitem>

      <listitem>
<!--
2015-05-08 [168d580] Andres..: Add support for INSERT ... ON CONFLICT DO NOTHI..
2015-05-08 [2c8f483] Andres..: Represent columns requiring insert and update p..
-->
       <para>
        Foreign tables can now take part in <command>INSERT ... ON CONFLICT
        DO NOTHING</> queries (Peter Geoghegan, Heikki Linnakangas,
        Andres Freund)
       </para>

       <para>
        Foreign data wrappers must be modified to handle this.
        <command>INSERT ... ON CONFLICT DO UPDATE</> is not supported on
        foreign tables.
       </para>
      </listitem>

      <listitem>
<!--
2014-12-18 [4a14f13] Tom Lane: Improve hash_create's API for selecting simple-..
-->
       <para>
        Improve <function>hash_create()</>'s API for selecting
        simple-binary-key hash functions (Teodor Sigaev, Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-04-30 [924bcf4] Robert..: Create an infrastructure for parallel computati..
2014-10-31 [2bd9e41] Robert..: Support frontend-backend protocol communication..
-->
       <para>
        Improve parallel execution infrastructure (Robert Haas, Amit
        Kapila, Noah Misch, Rushabh Lathia, Jeevan Chalke)
       </para>
      </listitem>

      <listitem>
<!--
2014-06-28 [a6d488c] Andres..: Remove Alpha and Tru64 support.
-->
       <para>
        Remove <productname>Alpha</> (<acronym>CPU</>) and <systemitem
        class="osname">Tru64</> (OS) ports (Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2014-07-06 [4893ccd] Robert..: Remove swpb-based spinlock implementation for A..
-->
       <para>
        Remove swap-byte-based spinlock implementation for
        <acronym>ARM</>v5 and earlier <acronym>CPU</>s (Robert Haas)
       </para>

       <para>
        <acronym>ARM</>v5's weak memory ordering made this locking
        implementation unsafe.  Spinlock support is still possible on
        newer gcc implementations with atomics support.
       </para>
      </listitem>

      <listitem>
<!--
2015-02-24 [23a7835] Peter ..: Error when creating names too long for tar for..
-->
       <para>
        Generate an error when excessively long (100+ character) file
        paths are written to tar files (Peter Eisentraut)
       </para>

       <para>
        Tar does not support such overly-long paths.
       </para>
      </listitem>

      <listitem>
<!--
2015-05-19 [0b28ea7] Tom Lane: Avoid collation dependence in indexes of syste..
-->
       <para>
        Change index operator class for columns <link
        linkend="catalog-pg-seclabel"><structname>pg_seclabel</></>.<structname>provider</>
        and <link
        linkend="catalog-pg-shseclabel"><structname>pg_shseclabel</></>.<structname>provider</>
        to be <literal>text_pattern_ops</> (Tom Lane)
       </para>

       <para>
        This avoids possible problems with these indexes when different
        databases of a cluster have different default collations.
       </para>
      </listitem>

      <listitem>
<!--
2014-09-09 [0709b7e] Robert..: Change the spinlock primitives to function as c..
-->
       <para>
        Change the spinlock primitives to function as compiler barriers
        (Robert Haas)
       </para>
      </listitem>

     </itemizedlist>

    <sect4>
     <title>MS Windows</title>

     <itemizedlist>

      <listitem>
<!--
2014-12-08 [519b075] Simon ..: Use GetSystemTimeAsFileTime directly in win32
2014-12-08 [8001fe6] Simon ..: Windows: use GetSystemTimePreciseAsFileTime if ..
-->
       <para>
        Allow higher-precision time stamp resolution on <systemitem
        class="osname">Windows 8</>, <systemitem class="osname">Windows
        Server 2012</>, and later Windows systems (Craig Ringer)
       </para>
      </listitem>

      <listitem>
<!--
2015-03-18 [f9dead5] Alvaro..: Install shared libraries to bin/ in Windows un..
-->
       <para>
        Install shared libraries to <filename>bin</> in <systemitem
        class="osname">MS Windows</> (Peter Eisentraut, Michael Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2015-04-16 [22d0053] Alvaro..: MSVC: install src/test/modules together with c..
-->
       <para>
        Install <filename>src/test/modules</> together with
        <filename>contrib</> on <productname>MSVC</> builds (Michael
        Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2014-07-12 [8d9a0e8] Magnus..: Support &#8211;&#8211;with-extra-version equivalent functi..
-->
       <para>
        Allow <link linkend="install-procedure">configure</>'s
        <option>--with-extra-version</> option to be honored by the
        <productname>MSVC</> build (Michael Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2014-07-14 [91f03ba] Noah M..: MSVC: Recognize PGFILEDESC in contrib and conv..
-->
       <para>
        Pass <envar>PGFILEDESC</> into <productname>MSVC</> contrib builds
        (Michael Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2014-07-14 [c4a448e] Noah M..: MSVC: Apply icons to all binaries having them ..
-->
       <para>
        Add icons to all <productname>MSVC</>-built binaries and version
        information to all <systemitem class="osname">MS Windows</>
        binaries (Noah Misch)
       </para>

       <para>
        MinGW already had such icons.
       </para>
      </listitem>

      <listitem>
<!--
2014-09-10 [311da16] Andres..: Add support for optional_argument to our own ge..
-->
       <para>
        Add optional-argument support to the internal
        <function>getopt_long()</> implementation (Michael Paquier,
        Andres Freund)
       </para>

       <para>
        This is used by the <productname>MSVC</> build.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Additional Modules</title>

    <itemizedlist>

     <listitem>
<!--
2015-03-27 [717f709] Andrew..: Add stats for min, max, mean, stddev times to p..
-->
      <para>
       Add statistics for minimum, maximum,
       mean, and standard deviation times to <link
       linkend="pgstatstatements-columns"><application>pg_stat_statements</></>
       (Mitsumasa Kondo, Andrew Dunstan)
      </para>
     </listitem>

     <listitem>
<!--
2014-10-01 [32984d8] Heikki..: Add functions for dealing with PGP armor heade..
-->
      <para>
       Add <link linkend="pgcrypto"><application>pgcrypto</></> function
       <function>pgp_armor_headers()</> to extract <productname>PGP</>
       armor headers (Marko Tiikkaja, Heikki Linnakangas)
      </para>
     </listitem>

     <listitem>
<!--
2014-06-30 [97c40ce] Tom Lane: Allow empty replacement strings in contrib/unac..
-->
      <para>
       Allow empty replacement strings in <link
       linkend="unaccent"><application>unaccent</></> (Mohammad Alhashash)
      </para>

      <para>
       This is useful in languages where diacritic signs are represented
       as separate characters.
      </para>
     </listitem>

     <listitem>
<!--
2014-06-30 [1b24887] Tom Lane: Allow multi-character source strings in contrib..
-->
      <para>
       Allow multicharacter source strings in <link
       linkend="unaccent"><application>unaccent</></> (Tom Lane)
      </para>

      <para>
       This could be useful in languages where diacritic signs are
       represented as separate characters.  It also allows more complex
       unaccent dictionaries.
      </para>
     </listitem>

     <listitem>
<!--
2015-05-15 [9689290] Simon ..: TABLESAMPLE system_rows(limit)
2015-05-15 [149f6f1] Simon ..: TABLESAMPLE system_time(limit)
-->
      <para>
       Add <filename>contrib</> modules <link
       linkend="tsm-system-rows"><application>tsm_system_rows</></> and
       <link linkend="tsm-system-time"><application>tsm_system_time</></>
       to allow additional table sampling methods (Petr Jel&iacute;nek)
      </para>
     </listitem>

     <listitem>
<!--
2014-11-21 [3a82bc6] Heikki..: Add pageinspect functions for inspecting GIN in..
-->
      <para>
       Add <link linkend="GIN"><acronym>GIN</></>
       index inspection functions to <link
       linkend="pageinspect"><application>pageinspect</></> (Heikki
       Linnakangas, Peter Geoghegan, Michael Paquier)
      </para>
     </listitem>

     <listitem>
<!--
2014-08-22 [f577919] Andres..: Add pinning_backends column to the pg_buffercac..
-->
      <para>
       Add information about buffer pins to <link
       linkend="pgbuffercache"><application>pg_buffercache</></> display
       (Andres Freund)
      </para>
     </listitem>

     <listitem>
<!--
2015-05-13 [5850b20] Andres..: Add pgstattuple_approx() to the pgstattuple ext..
-->
      <para>
       Allow <link linkend="pgstattuple"><application>pgstattuple</></>
       to report approximate answers with less overhead using
       <function>pgstattuple_approx()</> (Abhijit Menon-Sen)
      </para>
     </listitem>

     <listitem>
<!--
2014-11-29 [22dfd11] Alvaro..: Move test modules from contrib to src/test/modu..
2014-12-01 [df761e3] Alvaro..: Move security_label test
-->
      <para>
       Move <application>dummy_seclabel</>, <application>test_shm_mq</>,
       <application>test_parser</>, and <application>worker_spi</>
       from <filename>contrib</> to <filename>src/test/modules</>
       (&Aacute;lvaro Herrera)
      </para>

      <para>
       These modules are only meant for server testing, so they do not need
       to be built or installed when packaging <productname>PostgreSQL</>.
      </para>
     </listitem>

    </itemizedlist>

   </sect3>

  </sect2>

 </sect1>
