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

 <sect1 id="release-9-6-20">
  <title>Release 9.6.20</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.16,
    see <xref linkend="release-9-6-16">.
   </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 [0038f9438] 2020-08-14 13:26:57 -0400
Branch: REL_13_STABLE Release: REL_13_0 [1c6066fbd] 2020-08-14 13:26:57 -0400
Branch: REL_12_STABLE [42566a250] 2020-08-14 13:26:57 -0400
Branch: REL_11_STABLE [250aaa2de] 2020-08-14 13:26:57 -0400
Branch: REL_10_STABLE [326b5fe0f] 2020-08-14 13:26:57 -0400
Branch: REL9_6_STABLE [b4d8be9f6] 2020-08-14 13:26:57 -0400
-->
     <para>
      During <quote>smart</quote> shutdown, don't terminate background
      processes until all client (foreground) sessions are done (Tom Lane)
     </para>

     <para>
      The previous behavior broke parallel query processing, since the
      postmaster would terminate parallel workers and refuse to launch any
      new ones.  It also caused autovacuum to cease functioning, which
      could have dire long-term effects if the surviving client sessions
      make a lot of data changes.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [9abb2bfc0] 2019-10-13 15:48:26 -0400
Branch: REL_12_STABLE [8b53dbada] 2020-10-15 12:50:57 -0400
Branch: REL_11_STABLE [85834023a] 2020-10-15 12:50:57 -0400
Branch: REL_10_STABLE [4e95733b0] 2020-10-15 12:50:57 -0400
Branch: REL9_6_STABLE [7753ca49d] 2020-10-15 12:50:57 -0400
-->
     <para>
      Avoid recursive consumption of stack space while processing signals
      in the postmaster (Tom Lane)
     </para>

     <para>
      Heavy use of parallel processing has been observed to cause
      postmaster crashes due to too many concurrent signals requesting
      creation of a parallel worker process.
     </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-6-19">
  <title>Release 9.6.19</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.16,
    see <xref linkend="release-9-6-16">.
   </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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [78e73e875] 2020-07-31 11:43:12 -0400
Branch: REL_13_STABLE [11dce63d6] 2020-07-31 11:43:12 -0400
Branch: REL_12_STABLE [70248d8f5] 2020-07-31 11:43:12 -0400
Branch: REL_11_STABLE [da596fb4b] 2020-07-31 11:43:12 -0400
Branch: REL_10_STABLE [5e724125a] 2020-07-31 11:43:12 -0400
Branch: REL9_6_STABLE [8ab00b9fe] 2020-07-31 11:43:13 -0400
-->
     <para>
      Fix slow execution of <function>ts_headline()</function> (Tom Lane)
     </para>

     <para>
      The phrase-search fix added in our previous set of minor releases
      could cause <function>ts_headline()</function> to take unreasonable
      amounts of time for long documents; to make matters worse, the query
      was not cancellable within the troublesome loop.
     </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 [77a3be32f] 2020-06-11 17:38:42 -0400
Branch: REL_13_STABLE [ee788ba99] 2020-06-11 17:38:42 -0400
Branch: REL_12_STABLE [4284e1184] 2020-06-11 17:38:42 -0400
Branch: REL_11_STABLE [49e0a42dd] 2020-06-11 17:38:42 -0400
Branch: REL_10_STABLE [411a4626e] 2020-06-11 17:38:42 -0400
Branch: REL9_6_STABLE [36df06e25] 2020-06-11 17:38:42 -0400
-->
     <para>
      Fix mis-handling of <literal>NaN</literal> inputs during parallel
      aggregation on <type>numeric</type>-type columns (Tom Lane)
     </para>

     <para>
      If some partial aggregation workers found only <literal>NaN</literal>s
      while others found only non-<literal>NaN</literal>s, the results
      were combined incorrectly, possibly leading to the wrong overall
      result (i.e., not <literal>NaN</literal> when it should be).
     </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-6-18">
  <title>Release 9.6.18</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.16,
    see <xref linkend="release-9-6-16">.
   </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 [e81e5741a] 2020-04-27 12:21:04 -0400
Branch: REL_12_STABLE [18f7e856c] 2020-04-27 12:21:04 -0400
Branch: REL_11_STABLE [98a4d6950] 2020-04-27 12:21:04 -0400
Branch: REL_10_STABLE [072a86327] 2020-04-27 12:21:04 -0400
Branch: REL9_6_STABLE [22dcb6c20] 2020-04-27 12:21:04 -0400
-->
     <para>
      Fix full text search to handle NOT above a phrase search correctly
      (Tom Lane)
     </para>

     <para>
      Queries such as <literal>!(foo&lt;-&gt;bar)</literal> failed to find
      matching rows when implemented as a GiST or GIN index search.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [db89f0e3a] 2020-05-07 15:59:51 -0400
Branch: REL_12_STABLE [e1d70ba43] 2020-05-07 15:59:51 -0400
Branch: REL_11_STABLE [5db48808c] 2020-05-07 15:59:52 -0400
Branch: REL_10_STABLE [26cf16a93] 2020-05-07 15:59:52 -0400
Branch: REL9_6_STABLE [7c9d9aa5c] 2020-05-07 15:59:52 -0400
-->
     <para>
      Fix full text search for cases where a phrase search includes an
      item with both prefix matching and a weight restriction (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c9b0c678d] 2020-04-09 13:19:23 -0400
Branch: REL_12_STABLE [841378947] 2020-04-09 13:19:23 -0400
Branch: REL_11_STABLE [91be1d190] 2020-04-09 13:19:23 -0400
Branch: REL_10_STABLE [5f7247b3b] 2020-04-09 13:19:23 -0400
Branch: REL9_6_STABLE [c81de3a82] 2020-04-09 13:19:23 -0400
Branch: master [2e0e409e3] 2020-04-09 15:38:43 -0400
Branch: REL_12_STABLE [07453e9e3] 2020-04-09 15:38:52 -0400
Branch: REL_11_STABLE [d9a3fe4c5] 2020-04-09 15:38:57 -0400
Branch: REL_10_STABLE [9be664d71] 2020-04-09 15:39:02 -0400
Branch: REL9_6_STABLE [c2599b93d] 2020-04-09 15:39:09 -0400
Branch: master [b10f8bb9f] 2020-04-09 12:36:59 -0400
Branch: REL_12_STABLE [1306edeae] 2020-04-09 12:36:59 -0400
Branch: REL_11_STABLE [ff081d6bb] 2020-04-09 12:37:00 -0400
Branch: REL_10_STABLE [afab39986] 2020-04-09 12:37:00 -0400
Branch: REL9_6_STABLE [638519156] 2020-04-09 12:37:00 -0400
-->
     <para>
      Fix <function>ts_headline()</function> to make better headline
      selections when working with phrase queries (Tom Lane)
     </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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f332241a6] 2020-04-18 14:02:44 -0400
Branch: REL_12_STABLE [00ef5d52c] 2020-04-18 14:02:44 -0400
Branch: REL_11_STABLE [b3fa6d016] 2020-04-18 14:02:44 -0400
Branch: REL_10_STABLE [63ecdaf75] 2020-04-18 14:02:44 -0400
Branch: REL9_6_STABLE [c65c1aa82] 2020-04-18 14:02:45 -0400
-->
     <para>
      Fix race conditions in synchronous standby management (Tom Lane)
     </para>

     <para>
      During a change in the <varname>synchronous_standby_names</varname>
      setting, there was a window in which wrong decisions could be made
      about whether it is OK to release transactions that are waiting for
      synchronous commit.  Another hazard for similarly wrong decisions
      existed if a walsender process exited and was immediately replaced
      by another.
     </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: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [b08dee24a] 2020-03-11 16:54:54 -0300
Branch: REL_12_STABLE [f977e6dec] 2020-03-11 16:54:54 -0300
Branch: REL_11_STABLE [e70187c9b] 2020-03-11 16:54:54 -0300
Branch: REL_10_STABLE [d04e342ba] 2020-03-11 16:54:54 -0300
Branch: REL9_6_STABLE [2b9d70159] 2020-03-11 16:54:54 -0300
Branch: master [046001fe3] 2020-03-16 16:27:13 -0300
Branch: REL_12_STABLE [cf72898c6] 2020-03-16 16:27:13 -0300
Branch: REL_11_STABLE [55978e28c] 2020-03-16 16:27:13 -0300
Branch: REL_10_STABLE [c6b75b3f1] 2020-03-16 16:27:13 -0300
Branch: REL9_6_STABLE [7984c7e9f] 2020-03-16 16:27:13 -0300
Branch: master [899a04f5e] 2020-03-11 11:04:59 -0300
Branch: REL_12_STABLE [b7739ebec] 2020-03-11 11:04:59 -0300
Branch: REL_11_STABLE [7c094a11c] 2020-03-11 11:04:59 -0300
Branch: REL_10_STABLE [3dfd2d6cd] 2020-03-11 11:04:59 -0300
Branch: REL9_6_STABLE [73b31e784] 2020-03-11 11:04:59 -0300
-->
     <para>
      Add <application>pg_dump</application> support for <command>ALTER
      ... DEPENDS ON EXTENSION</command> (&Aacute;lvaro Herrera)
     </para>

     <para>
      <application>pg_dump</application> previously ignored dependencies added
      this way, causing them to be forgotten during dump/restore or
      <application>pg_upgrade</application>.
     </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-6-17">
  <title>Release 9.6.17</title>

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

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

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

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

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

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [b048f558d] 2020-02-10 11:47:09 -0300
Branch: REL_12_STABLE [2ad125322] 2020-02-10 11:47:09 -0300
Branch: REL_11_STABLE [bdd19e48a] 2020-02-10 11:47:09 -0300
Branch: REL_10_STABLE [ac1a998ed] 2020-02-10 11:47:09 -0300
Branch: REL9_6_STABLE [e8b8eb937] 2020-02-10 12:06:25 -0300
-->
     <para>
      Add missing permissions checks for <command>ALTER ... DEPENDS ON
      EXTENSION</command> (&Aacute;lvaro Herrera)
     </para>

     <para>
      Marking an object as dependent on an extension did not have any
      privilege check whatsoever.  This oversight allowed any user to mark
      routines, triggers, materialized views, or indexes as droppable by
      anyone able to drop an extension.  Require that the calling user own
      the specified object (and hence have privilege to drop it).
      (CVE-2020-1720)
     </para>
    </listitem>

    <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: Amit Kapila <akapila@postgresql.org>
Branch: master [080313f82] 2019-11-26 08:30:24 +0530
Branch: REL_12_STABLE [1cc3a90c7] 2019-11-26 08:55:06 +0530
Branch: REL_11_STABLE [d0ccfa9d6] 2019-11-26 09:07:35 +0530
Branch: REL_10_STABLE [f7ae68aac] 2019-11-26 09:23:45 +0530
Branch: REL9_6_STABLE [1ad0df67c] 2019-11-26 09:41:41 +0530
-->
     <para>
      Prevent premature shutdown of a Gather or GatherMerge plan node that
      is underneath a Limit node (Amit Kapila)
     </para>

     <para>
      This avoids failure if such a plan node needs to be scanned more
      than once, as for instance if it is on the inside of a nestloop.
     </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 [790026972] 2019-11-24 14:42:59 -0500
Branch: REL_12_STABLE [c47f498c9] 2019-11-24 14:42:59 -0500
Branch: REL_11_STABLE [377d1b95b] 2019-11-24 14:42:59 -0500
Branch: REL_10_STABLE [dbe15524b] 2019-11-24 14:42:59 -0500
Branch: REL9_6_STABLE [111298aa6] 2019-11-24 14:42:59 -0500
-->
     <para>
      Transmit incoming <command>NOTIFY</command> messages to the client
      before sending <literal>ReadyForQuery</literal>, rather than after
      (Tom Lane)
     </para>

     <para>
      This change ensures that, with libpq and other client libraries that
      act similarly to it, any notifications received during a transaction
      will be available by the time the client thinks the transaction is
      complete.  This probably makes no difference in practical
      applications (which would need to cope with asynchronous
      notifications in any case); but it makes it easier to build test
      cases with reproducible behavior.
     </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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [215824f91] 2020-01-26 14:31:08 -0500
Branch: REL_12_STABLE [7294f99a0] 2020-01-26 14:31:08 -0500
Branch: REL_11_STABLE [5220ced0d] 2020-01-26 14:31:08 -0500
Branch: REL_10_STABLE [603e03b4c] 2020-01-26 14:31:08 -0500
Branch: REL9_6_STABLE [43a648f57] 2020-01-26 14:31:08 -0500
-->
     <para>
      Avoid crash in <filename>postgres_fdw</filename> when trying to
      send a command like <literal>UPDATE remote_tab SET (x,y) = (SELECT
      ...)</literal> to the remote server (Tom Lane)
     </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>idle_in_transaction_session_timeout</literal>,
      <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-6-16">
  <title>Release 9.6.16</title>

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

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

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

   <para>
    A dump/restore is not required for those running 9.6.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.6.9,
    see <xref linkend="release-9-6-9">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [736b84eed] 2019-09-25 10:07:23 +0900
Branch: REL_12_STABLE Release: REL_12_0 [707f38e38] 2019-09-25 10:08:26 +0900
Branch: REL_11_STABLE [d01d4f237] 2019-09-25 10:08:30 +0900
Branch: REL_10_STABLE [d48168003] 2019-09-25 10:08:36 +0900
Branch: REL9_6_STABLE [98b5c3785] 2019-09-25 10:08:43 +0900
-->
     <para>
      Fix failure of <command>ALTER TABLE SET</command> with a custom
      relation option (Michael Paquier)
     </para>
    </listitem>

    <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: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [a9056cc63] 2019-11-06 04:13:30 +0000
Branch: REL_12_STABLE [f57c63107] 2019-11-06 04:33:35 +0000
Branch: REL_11_STABLE [be99485b9] 2019-11-06 04:33:42 +0000
Branch: REL_10_STABLE [6da5310e8] 2019-11-06 04:33:49 +0000
Branch: REL9_6_STABLE [747aac88f] 2019-11-06 04:33:55 +0000
-->
     <para>
      Avoid creating unnecessarily-bulky tuple stores for window functions
      (Andrew Gierth)
     </para>

     <para>
      In some cases the tuple storage would include all columns of the
      source table(s), not just the ones that are needed by the query.
     </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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8af1624e3] 2019-11-02 16:45:32 -0400
Branch: REL_12_STABLE [43753c2cf] 2019-11-02 16:45:32 -0400
Branch: REL_11_STABLE [65cdf8bc1] 2019-11-02 16:45:32 -0400
Branch: REL_10_STABLE [680aabd2f] 2019-11-02 16:45:32 -0400
Branch: REL9_6_STABLE [51b9ac558] 2019-11-02 16:45:32 -0400
Branch: master [db27b60f0] 2019-11-03 16:10:23 -0500
Branch: REL_12_STABLE [6dd92138d] 2019-11-03 16:10:38 -0500
Branch: REL_11_STABLE [88d03d73c] 2019-11-03 16:10:45 -0500
Branch: REL_10_STABLE [4077e9ae1] 2019-11-03 16:10:56 -0500
Branch: REL9_6_STABLE [d43bd9dce] 2019-11-03 16:11:05 -0500
-->
     <para>
      Avoid crashes if <literal>ispell</literal> text search dictionaries
      contain wrong affix data (Arthur Zakirov)
     </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-6-15">
  <title>Release 9.6.15</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.9,
    see <xref linkend="release-9-6-9">.
   </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: David Rowley <drowley@postgresql.org>
Branch: master [a5be4062f] 2019-07-03 23:44:54 +1200
Branch: REL_12_STABLE [0cce43a71] 2019-07-03 23:45:25 +1200
Branch: REL_11_STABLE [133f5ae21] 2019-07-03 23:45:42 +1200
Branch: REL_10_STABLE [232019b79] 2019-07-03 23:46:06 +1200
Branch: REL9_6_STABLE [388d05a5e] 2019-07-03 23:46:26 +1200
-->
     <para>
      Don't optimize away <literal>GROUP BY</literal> columns when the
      table involved is an inheritance parent (David Rowley)
     </para>

     <para>
      Normally, if a table's primary key column(s) are included
      in <literal>GROUP BY</literal>, it's safe to drop any other grouping
      columns, since the primary key columns are enough to make the groups
      unique.  This rule does not work if the query is also reading
      inheritance child tables, though; the parent's uniqueness does not
      extend to the children.
     </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: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master Release: REL_12_BR [8b21b416e] 2019-06-18 18:23:16 -0400
Branch: REL_11_STABLE [5246d3e79] 2019-06-18 18:23:16 -0400
Branch: REL_10_STABLE [0772d8a00] 2019-06-18 18:23:16 -0400
Branch: REL9_6_STABLE [0ba35c7c9] 2019-06-18 18:23:16 -0400
-->
     <para>
      Avoid spurious deadlock errors when upgrading a tuple lock
      (Oleksii Kliukin)
     </para>

     <para>
      When two or more transactions are waiting for a transaction T1 to
      release a tuple-level lock, and T1 upgrades its lock to a higher
      level, a spurious deadlock among the waiting transactions could be
      reported when T1 finishes.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3420851a2] 2019-07-29 18:49:04 -0400
Branch: REL_12_STABLE [d933816c0] 2019-07-29 18:49:04 -0400
Branch: REL_11_STABLE [0dcb1c6c4] 2019-07-29 18:49:04 -0400
Branch: REL_10_STABLE [af41ab50f] 2019-07-29 18:49:04 -0400
Branch: REL9_6_STABLE [c3b613e1b] 2019-07-29 18:49:04 -0400
-->
     <para>
      Fix failure to resolve deadlocks involving multiple parallel worker
      processes (Rui Hai Jiang)
     </para>

     <para>
      It is not clear whether this bug is reachable with non-artificial
      queries, but if it did happen, the queries involved in an
      otherwise-resolvable deadlock would block until canceled.
     </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 [0ec3e13c6] 2019-07-02 13:35:14 -0400
Branch: REL_12_STABLE [4f3648de2] 2019-07-02 13:35:14 -0400
Branch: REL_11_STABLE [074add6ed] 2019-07-02 13:35:14 -0400
Branch: REL_10_STABLE [90434e6f2] 2019-07-02 13:35:14 -0400
Branch: REL9_6_STABLE [47fe7a753] 2019-07-02 13:35:14 -0400
-->
     <para>
      In <application>psql</application>, avoid offering incorrect tab
      completion options
      after <literal>SET <replaceable>variable</replaceable> =</literal>
      (Tom Lane)
     </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: Michael Paquier <michael@paquier.xyz>
Branch: master [7d81bdc8c] 2019-07-24 10:53:39 +0900
Branch: REL_12_STABLE [0ceb28da0] 2019-07-24 10:54:20 +0900
Branch: REL_11_STABLE [ca553394b] 2019-07-24 10:54:26 +0900
Branch: REL_10_STABLE [46fb7ff65] 2019-07-24 10:54:32 +0900
Branch: REL9_6_STABLE [c6f961bbb] 2019-07-24 10:54:39 +0900
-->
     <para>
      Improve stability of <filename>src/test/recovery</filename>
      regression tests (Michael Paquier)
     </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: Noah Misch <noah@leadboat.com>
Branch: master Release: REL_12_BR [660a2b190] 2019-06-21 20:34:23 -0700
Branch: REL_11_STABLE [a40dca815] 2019-06-21 20:47:34 -0700
Branch: REL_10_STABLE [6121ba9d1] 2019-06-21 20:58:42 -0700
Branch: REL9_6_STABLE [186113b04] 2019-06-21 20:59:38 -0700
-->
     <para>
      Fix TAP tests to work with msys Perl, in cases where the build
      directory is on a non-root msys mount point (Noah Misch)
     </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-6-14">
  <title>Release 9.6.14</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.9,
    see <xref linkend="release-9-6-9">.
   </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 [24c19e9f6] 2019-05-09 16:53:05 -0400
Branch: REL_11_STABLE [e7eed0baa] 2019-05-09 16:52:49 -0400
Branch: REL_10_STABLE [946cdf9ff] 2019-05-09 16:52:49 -0400
Branch: REL9_6_STABLE [3203714c3] 2019-05-09 16:52:49 -0400
-->
     <para>
      Fix faulty generation of merge-append plans (Tom Lane)
     </para>

     <para>
      This mistake could lead to <quote>could not find pathkey item to
      sort</quote> errors.
     </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 [b8c6014a6] 2019-05-22 14:48:00 +0900
Branch: REL_11_STABLE [8357a413f] 2019-05-22 14:48:14 +0900
Branch: REL_10_STABLE [0c2a5a862] 2019-05-22 14:48:30 +0900
Branch: REL9_6_STABLE [a21fb12e7] 2019-05-22 14:48:39 +0900
Branch: master [156c0c2df] 2019-05-23 10:48:17 +0900
Branch: REL_11_STABLE [a7b2fca15] 2019-05-23 10:48:24 +0900
Branch: REL_10_STABLE [2ccebcd23] 2019-05-23 10:48:29 +0900
Branch: REL9_6_STABLE [c82e8ba00] 2019-05-23 10:48:35 +0900
-->
     <para>
      Fix ordering of <command>GRANT</command> commands emitted
      by <application>pg_dump</application>
      and <application>pg_dumpall</application> for databases and
      tablespaces (Nathan Bossart, Michael Paquier)
     </para>

     <para>
      If cascading grants had been issued, restore might fail due to
      the <command>GRANT</command> commands being given in an order that
      didn't respect their interdependencies.
     </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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2cd4e8357] 2019-06-03 18:06:04 -0400
Branch: REL_11_STABLE [57e85fa2c] 2019-06-03 18:06:04 -0400
Branch: REL_10_STABLE [ba38967d7] 2019-06-03 18:06:04 -0400
Branch: REL9_6_STABLE [efa121ae6] 2019-06-03 18:06:04 -0400
-->
     <para>
      Fix <filename>contrib/auto_explain</filename> to not cause problems
      in parallel queries (Tom Lane)
     </para>

     <para>
      Previously, a parallel worker might try to log its query even if the
      parent query were not being logged
      by <filename>auto_explain</filename>.  This would work sometimes, but
      it's confusing, and in some cases it resulted in failures
      like <quote>could not find key N in shm TOC</quote>.
     </para>

     <para>
      Also, fix an off-by-one error that resulted in not necessarily
      logging every query even when the sampling rate is set to 1.0.
     </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-6-13">
  <title>Release 9.6.13</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.9,
    see <xref linkend="release-9-6-9">.
   </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>
      Avoid counting parallel workers' transactions as separate
      transactions (Haribabu Kommi)
     </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>
      Speed up planning when there are many equality conditions and many
      potentially-relevant foreign key constraints (David Rowley)
     </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-6-12">
  <title>Release 9.6.12</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.9,
    see <xref linkend="release-9-6-9">.
   </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 [1db5667ba] 2019-01-11 15:54:06 -0500
Branch: REL_11_STABLE [05eb923ea] 2019-01-11 15:54:08 -0500
Branch: REL_10_STABLE [2977a312d] 2019-01-11 15:54:09 -0500
Branch: REL9_6_STABLE [4f8097499] 2019-01-11 15:53:34 -0500
-->
     <para>
      Fix incorrect planning of queries involving nested loops both above
      and below a Gather plan node (Tom Lane)
     </para>

     <para>
      If both levels of nestloop needed to pass the same variable into
      their right-hand sides, an incorrect plan would be generated.
     </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: Greg Stark <stark@mit.edu>
Branch: master [1075dfdaf] 2018-12-19 19:38:31 -0500
Branch: REL_11_STABLE [128ce8e1a] 2018-12-19 19:40:25 -0500
Branch: REL_10_STABLE [9e6cd794c] 2018-12-19 19:41:06 -0500
Branch: REL9_6_STABLE [5668afeb6] 2018-12-19 19:41:18 -0500
-->
     <para>
      Process <command>ALTER TABLE ONLY ADD COLUMN IF NOT EXISTS</command>
      correctly (Greg Stark)
     </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: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [175544093] 2019-01-21 19:34:11 -0300
Branch: REL_11_STABLE [a7474308c] 2019-01-21 19:34:11 -0300
Branch: REL_10_STABLE [3037b28b8] 2019-01-21 19:34:11 -0300
Branch: REL9_6_STABLE [4aead13a7] 2019-01-21 19:34:11 -0300
-->
     <para>
      Ensure relation caches are updated properly after adding or removing
      foreign key constraints (&Aacute;lvaro Herrera)
     </para>

     <para>
      This oversight could result in existing sessions failing to enforce
      a newly-created constraint, or continuing to enforce a dropped one.
     </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 [c952eae52] 2018-12-21 02:37:37 +0300
Branch: REL_11_STABLE [8193d6407] 2018-12-21 02:37:31 +0300
Branch: REL_10_STABLE [e36e25275] 2018-12-21 02:33:48 +0300
Branch: REL9_6_STABLE [1b0280745] 2018-12-21 02:33:37 +0300
-->
     <para>
      Fix replay of GiST index micro-vacuum operations so that concurrent
      hot-standby queries do not see inconsistent state (Alexander
      Korotkov)
     </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: Thomas Munro <tmunro@postgresql.org>
Branch: master [0f9cdd7dc] 2018-11-28 14:12:30 +1300
Branch: REL_11_STABLE [0640d9517] 2018-11-28 14:14:40 +1300
Branch: REL_10_STABLE [96ed0b870] 2018-11-28 14:15:00 +1300
Branch: REL9_6_STABLE [63d835066] 2018-11-28 14:20:07 +1300
-->
     <para>
      When making a PAM authentication request, don't set
      the <varname>PAM_RHOST</varname> variable if the connection is via
      a Unix socket (Thomas Munro)
     </para>

     <para>
      Previously that variable would be set to <literal>[local]</literal>,
      which is at best unhelpful, since it's supposed to be a host name.
     </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: 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 [640158386] 2019-02-09 11:41:09 -0500
Branch: REL_11_STABLE [027b5a300] 2019-02-09 11:41:09 -0500
Branch: REL_10_STABLE [dc0eb137f] 2019-02-09 11:41:09 -0500
Branch: REL9_6_STABLE [6257f525a] 2019-02-09 11:41:09 -0500
-->
     <para>
      Relocate call of <literal>set_rel_pathlist_hook</literal> so that
      extensions can use it to supply partial paths for parallel queries
      (KaiGai Kohei)
     </para>

     <para>
      This is not expected to affect existing use-cases.
     </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-6-11">
  <title>Release 9.6.11</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.9,
    see <xref linkend="release-9-6-9">.
   </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>
      Disallow pushing sub-<literal>SELECT</literal>s containing window
      functions, <literal>LIMIT</literal>, or <literal>OFFSET</literal> to
      parallel workers (Amit Kapila)
     </para>

     <para>
      Such cases could result in inconsistent behavior due to different
      workers getting different answers, as a result of indeterminacy
      due to row-ordering variations.
     </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 transfer of expanded datums to parallel workers so that alignment
      is preserved, preventing crashes on alignment-picky platforms
      (Tom Lane, Amit Kapila)
     </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>
      Avoid failure in a parallel worker when loading an extension that
      tries to access system caches within its init function (Thomas Munro)
     </para>

     <para>
      We don't consider that to be good extension coding practice, but it
      mostly worked before parallel query, so continue to support it for
      now.
     </para>
    </listitem>

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

    <listitem>
     <para>
      Fix possible crash due to double <function>free()</function> during
      SP-GiST rescan (Andrew Gierth)
     </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>
      Update the free space map during WAL replay of page all-visible/frozen
      flag changes (&Aacute;lvaro Herrera)
     </para>

     <para>
      Previously we were not careful about this, reasoning that the FSM is
      not critical data anyway.  However, if it's sufficiently out of date,
      that can result in significant performance degradation after a standby
      has been promoted to primary.  The FSM will eventually be healed by
      updates, but we'd like it to be good sooner, so work harder at
      maintaining it during WAL replay.
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid premature release of parallel-query resources when query end or
      tuple count limit is reached (Amit Kapila)
     </para>

     <para>
      It's only okay to shut down the executor at this point if the caller
      cannot demand backwards scan afterwards.
     </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>
      In <filename>contrib/postgres_fdw</filename>, don't try to ship a
      variable-free <literal>ORDER BY</literal> clause to the remote server
      (Andrew Gierth)
     </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>
     <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>
     <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-6-10">
  <title>Release 9.6.10</title>

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

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

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

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

   <para>
    However, if you are upgrading from a version earlier than 9.6.9,
    see <xref linkend="release-9-6-9">.
   </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 planner to avoid <quote>ORDER/GROUP BY expression not found in
      targetlist</quote> errors in some queries with set-returning functions
      (Tom Lane)
     </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 <command>EXPLAIN</command>'s accounting for resource usage,
      particularly buffer accesses, in parallel workers
      (Amit Kapila, Robert Haas)
     </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>
      Fix <command>CREATE AGGREGATE</command> type checking so that
      parallelism support functions can be attached to variadic aggregates
      (Alexey Bashtanov)
     </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-6-9">
  <title>Release 9.6.9</title>

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

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

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

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

   <para>
    However, if you use the <filename>adminpack</filename> extension,
    you should update it as per the first changelog entry below.
   </para>

   <para>
    Also, if the function marking mistakes mentioned in the second and
    third changelog entries 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.6.8,
    see <xref linkend="release-9-6-8">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
     <para>
      Remove public execute privilege
      from <filename>contrib/adminpack</filename>'s
      <function>pg_logfile_rotate()</function> function (Stephen Frost)
     </para>

     <para>
      <function>pg_logfile_rotate()</function> is a deprecated wrapper
      for the core function <function>pg_rotate_logfile()</function>.
      When that function was changed to rely on SQL privileges for access
      control rather than a hard-coded superuser
      check, <function>pg_logfile_rotate()</function> should have been
      updated as well, but the need for this was missed.  Hence,
      if <filename>adminpack</filename> is installed, any user could
      request a logfile rotation, creating a minor security issue.
     </para>

     <para>
      After installing this update, administrators should
      update <filename>adminpack</filename> by performing
      <literal>ALTER EXTENSION adminpack UPDATE</literal> in each
      database in which <filename>adminpack</filename> is installed.
      (CVE-2018-1115)
     </para>
    </listitem>

    <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>
      Fix incorrect parallel-safety markings on a few built-in functions
      (Thomas Munro, Tom Lane)
     </para>

     <para>
      The functions
      <function>brin_summarize_new_values</function>,
      <function>gin_clean_pending_list</function>,
      <function>cursor_to_xml</function>,
      <function>cursor_to_xmlschema</function>,
      <function>ts_rewrite</function>,
      <function>ts_stat</function>, and
      <function>binary_upgrade_create_empty_extension</function>
      should be marked parallel-unsafe; some because they perform database
      modifications directly, and others because they execute user-supplied
      queries that might do so.  They were marked parallel-restricted
      instead, leading to a risk of unexpected query errors.  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 unless <varname>force_parallel_mode</varname> is turned
      on.  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.brin_summarize_new_values(regclass)
      PARALLEL UNSAFE</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 possible leak or double free of visibility map buffer pins
      (Amit Kapila)
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid spuriously marking pages as all-visible (Dan Wood,
      Pavan Deolasee, &Aacute;lvaro Herrera)
     </para>

     <para>
      This could happen if some tuples were locked (but not deleted).  While
      queries would still function correctly, vacuum would normally ignore
      such pages, with the long-term effect that the tuples were never
      frozen.  In recent releases this would eventually result in errors
      such as <quote>found multixact <replaceable>nnnnn</replaceable> from
      before relminmxid <replaceable>nnnnn</replaceable></quote>.
     </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>
      Prevent query-lifespan memory leakage with SP-GiST operator classes
      that use traversal values (Anton Dign&ouml;s)
     </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>
     <para>
      Fix errors in initial build of <filename>contrib/bloom</filename>
      indexes (Tomas Vondra, Tom Lane)
     </para>

     <para>
      Fix possible omission of the table's last tuple from the index.
      Count the number of index tuples correctly, in case it is a partial
      index.
     </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-6-8">
  <title>Release 9.6.8</title>

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

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

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

   <para>
    A dump/restore is not required for those running 9.6.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.6.7,
    see <xref linkend="release-9-6-7">.
   </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>

    <listitem>
     <para>
      Mark assorted GUC variables as <literal>PGDLLIMPORT</literal>, to
      ease porting extension modules to Windows (Metin Doslu)
     </para>
    </listitem>

   </itemizedlist>

  </sect2>
 </sect1>

 <sect1 id="release-9-6-7">
  <title>Release 9.6.7</title>

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

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

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

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

   <para>
    However,
    if you use <filename>contrib/cube</filename>'s <literal>~&gt;</literal>
    operator, see the entry below about that.
   </para>

   <para>
    Also, if you are upgrading from a version earlier than 9.6.6,
    see <xref linkend="release-9-6-6">.
   </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>
      Ensure that vacuum will always clean up the pending-insertions list of
      a GIN index (Masahiko Sawada)
     </para>

     <para>
      This is necessary to ensure that dead index entries get removed.
      The old code got it backwards, allowing vacuum to skip the cleanup if
      some other process were running cleanup concurrently, thus risking
      invalid entries being left behind in the index.
     </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>
      Fix collection of <command>EXPLAIN</command> statistics from parallel
      workers (Amit Kapila, Thomas Munro)
     </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>
      Change the behavior of <filename>contrib/cube</filename>'s
      <type>cube</type> <literal>~&gt;</literal> <type>int</type>
      operator to make it compatible with KNN search (Alexander Korotkov)
     </para>

     <para>
      The meaning of the second argument (the dimension selector) has been
      changed to make it predictable which value is selected even when
      dealing with cubes of varying dimensionalities.
     </para>

     <para>
      This is an incompatible change, but since the point of the operator
      was to be used in KNN searches, it seems rather useless as-is.
      After installing this update, any expression indexes or materialized
      views using this operator will need to be reindexed/refreshed.
     </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>
      Fix incorrect display of tuples' null bitmaps
      in <filename>contrib/pageinspect</filename> (Maksim Milyutin)
     </para>
    </listitem>

    <listitem>
     <para>
      In <filename>contrib/postgres_fdw</filename>, avoid
      <quote>outer pathkeys do not match mergeclauses</quote>
      planner error when constructing a plan involving a remote join
      (Robert Haas)
     </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-6-6">
  <title>Release 9.6.6</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-11-09</para>
  </formalpara>

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

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

   <para>
    A dump/restore is not required for those running 9.6.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.6.4,
    see <xref linkend="release-9-6-4">.
   </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 incorrect query results when multiple <literal>GROUPING
      SETS</literal> columns contain the same simple variable (Tom Lane)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix incorrect parallelization decisions for nested queries
      (Amit Kapila, Kuntal Ghosh)
     </para>
    </listitem>

    <listitem>
     <para>
      Fix parallel query handling to not fail when a recently-used role is
      dropped (Amit Kapila)
     </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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7769fc000] 2017-09-27 17:05:53 -0400
Branch: REL_10_STABLE Release: REL_10_0 [07ea925e2] 2017-09-27 17:05:53 -0400
Branch: REL9_6_STABLE [def03e4bf] 2017-09-27 17:05:53 -0400
Branch: REL9_5_STABLE [ad56dbd6c] 2017-09-27 17:05:53 -0400
Branch: REL9_4_STABLE [c38575edc] 2017-09-27 17:05:53 -0400
Branch: REL9_3_STABLE [2e82fba0e] 2017-09-27 17:05:54 -0400
Branch: REL9_2_STABLE [72d4fd08e] 2017-09-27 17:05:54 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6f44fe7f1] 2017-09-17 15:28:51 -0400
Branch: REL_10_STABLE Release: REL_10_0 [244b4a37e] 2017-09-17 15:28:51 -0400
Branch: REL9_6_STABLE [86e4ebb9a] 2017-09-17 15:28:51 -0400
Branch: REL9_5_STABLE [eeff68396] 2017-09-17 15:28:51 -0400
-->
     <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>
      Prevent sharing transition states between ordered-set aggregates
      (David Rowley)
     </para>

     <para>
      This causes a crash with the built-in ordered-set aggregates, and
      probably with user-written ones as well.  v11 and later will include
      provisions for dealing with such cases safely, but in released
      branches, just disable the optimization.
     </para>
    </listitem>

    <listitem>
     <para>
      Prevent <varname>idle_in_transaction_session_timeout</varname> from
      being ignored when a <varname>statement_timeout</varname> occurred
      earlier (Lukas Fittl)
     </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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [899bd785c] 2017-09-25 16:09:19 -0400
Branch: REL_10_STABLE Release: REL_10_0 [4621c7f7a] 2017-09-25 16:09:19 -0400
Branch: REL9_6_STABLE [175061222] 2017-09-25 16:09:20 -0400
Branch: REL9_5_STABLE [05297416f] 2017-09-25 16:09:20 -0400
Branch: REL9_4_STABLE [3a07a6f3e] 2017-09-25 16:09:20 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5ea96efaa] 2017-09-26 13:42:53 -0400
Branch: REL_10_STABLE Release: REL_10_0 [d29f30d8c] 2017-09-26 13:43:00 -0400
Branch: REL9_6_STABLE [12ac252f9] 2017-09-26 13:43:07 -0400
Branch: REL9_5_STABLE [06852f215] 2017-09-26 13:43:12 -0400
Branch: REL9_4_STABLE [e5c058e2e] 2017-09-26 13:43:17 -0400
-->
     <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>
      Reduce the frequency of data flush requests during bulk file copies to
      avoid performance problems on macOS, particularly with its new APFS
      file system (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [27c6619e9] 2017-09-17 14:50:01 -0400
Branch: REL_10_STABLE Release: REL_10_0 [66fe509be] 2017-09-17 14:50:01 -0400
Branch: REL9_6_STABLE [c0d21bdb8] 2017-09-17 14:50:01 -0400
Branch: REL9_5_STABLE [825fac5d3] 2017-09-17 14:50:01 -0400
Branch: REL9_4_STABLE [bc0974703] 2017-09-17 14:50:01 -0400
Branch: REL9_3_STABLE [b1be33593] 2017-09-17 14:50:01 -0400
Branch: REL9_2_STABLE [4cd6cd21d] 2017-09-17 14:50:01 -0400
-->
     <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>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [aa6b7b72d] 2017-09-22 17:10:36 -0400
Branch: REL_10_STABLE Release: REL_10_0 [3d7f11a0f] 2017-09-23 10:03:05 -0400
Branch: REL9_6_STABLE [a1f30ecc5] 2017-09-23 10:03:36 -0400
Branch: REL9_5_STABLE [acae13faa] 2017-09-23 10:04:55 -0400
Branch: REL9_4_STABLE [9bf049946] 2017-09-23 10:05:28 -0400
Branch: REL9_3_STABLE [e0f5710c5] 2017-09-23 10:05:40 -0400
Branch: REL9_2_STABLE [2eb84e54a] 2017-09-23 10:14:30 -0400
-->
     <para>
      Correctly restore the umask setting when file creation fails
      in <command>COPY</command> or <function>lo_export()</function>
      (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [714805010] 2017-09-21 18:13:11 -0400
Branch: REL_10_STABLE Release: REL_10_0 [a2b1eb234] 2017-09-21 18:13:11 -0400
Branch: REL9_6_STABLE [ea31541f5] 2017-09-21 18:13:11 -0400
Branch: REL9_5_STABLE [122289a66] 2017-09-21 18:13:11 -0400
Branch: REL9_4_STABLE [b572b435c] 2017-09-21 18:13:11 -0400
Branch: REL9_3_STABLE [a09d8be7d] 2017-09-21 18:13:11 -0400
Branch: REL9_2_STABLE [e56facd8b] 2017-09-21 18:13:11 -0400
-->
     <para>
      Give a better error message for duplicate column names
      in <command>ANALYZE</command> (Nathan Bossart)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [81276fdd3] 2017-09-14 17:19:04 -0400
Branch: REL_10_STABLE Release: REL_10_0 [a2a61f633] 2017-09-14 16:44:01 -0400
Branch: REL9_6_STABLE [353328ad1] 2017-09-14 16:47:11 -0400
-->
     <para>
      Add missing cases in <function>GetCommandLogLevel()</function>,
      preventing errors when certain SQL commands are used while
      <varname>log_statement</varname> is set to <literal>ddl</literal>
      (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_6_STABLE [2ac598874] 2017-10-17 12:15:08 -0400
Branch: REL9_5_STABLE [9e20276e1] 2017-10-17 12:15:08 -0400
Branch: REL9_4_STABLE [38f17e8ee] 2017-10-17 12:15:08 -0400
Branch: REL9_3_STABLE [06b2a73ed] 2017-10-17 12:15:08 -0400
-->
     <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 <function>AggGetAggref()</function> to return the
      correct <structname>Aggref</structname> nodes to aggregate final
      functions whose transition calculations have been merged (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [d2e40b310] 2017-09-13 20:02:09 -0400
Branch: REL_10_STABLE Release: REL_10_0 [68a7c24fd] 2017-09-13 20:04:43 -0400
Branch: REL9_6_STABLE [caae416aa] 2017-09-13 20:02:27 -0400
-->
     <para>
      Fix <application>pg_dump</application> to ensure that it
      emits <command>GRANT</command> commands in a valid order
      (Stephen Frost)
     </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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2e70d6b5e] 2017-08-29 15:18:01 -0400
Branch: REL_10_STABLE Release: REL_10_0 [b481b39b8] 2017-08-29 15:18:01 -0400
Branch: REL9_6_STABLE [bc95e5874] 2017-08-29 15:18:01 -0400
Branch: REL9_5_STABLE [dfd1042c6] 2017-08-29 15:18:01 -0400
Branch: REL9_4_STABLE [1c53722ff] 2017-08-29 15:18:01 -0400
Branch: REL9_3_STABLE [d391fb6c3] 2017-08-29 15:18:01 -0400
Branch: REL9_2_STABLE [a07058a6d] 2017-08-29 15:18:01 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9d6b160d7] 2017-09-01 15:14:46 -0400
Branch: REL_10_STABLE Release: REL_10_0 [f2fe1cbef] 2017-09-01 15:14:18 -0400
Branch: REL9_6_STABLE [3a0f8e7d3] 2017-09-01 15:14:18 -0400
Branch: REL9_5_STABLE [1305186de] 2017-09-01 15:14:18 -0400
Branch: REL9_4_STABLE [53863ebeb] 2017-09-01 15:14:18 -0400
Branch: REL9_3_STABLE [dd344de67] 2017-09-01 15:14:18 -0400
Branch: REL9_2_STABLE [f60a236ba] 2017-09-01 15:14:18 -0400
-->
     <para>
      Fix <application>libpq</application> to guard against integer
      overflow in the row count of a <structname>PGresult</structname>
      (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [35e156882] 2017-09-12 04:53:36 +0200
Branch: REL_10_STABLE Release: REL_10_0 [75fbf8ad1] 2017-09-18 23:07:18 +0200
Branch: REL9_6_STABLE [59b5a3e5c] 2017-09-18 23:07:34 +0200
Branch: REL9_5_STABLE [3a5aa7de3] 2017-09-18 23:07:44 +0200
Branch: REL9_4_STABLE [e5b8b771e] 2017-09-18 23:08:17 +0200
Branch: REL9_3_STABLE [149cfdb3a] 2017-09-18 23:08:24 +0200
-->
     <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>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [a772624b1] 2017-08-26 12:57:21 +0200
Branch: REL_10_STABLE Release: REL_10_0 [38d7cb67f] 2017-09-14 00:47:03 +0200
Branch: REL9_6_STABLE [839ee1811] 2017-09-14 01:17:03 +0200
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [04fbe0e45] 2017-08-26 19:11:58 +0200
Branch: REL_10_STABLE Release: REL_10_0 [eaf7001eb] 2017-09-14 00:47:08 +0200
Branch: REL9_6_STABLE [407e66078] 2017-09-14 01:17:15 +0200
-->
     <para>
      Fix <application>ecpg</application>'s regression tests to work reliably
      on Windows (Christian Ullrich, 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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [47f849a3c] 2017-09-22 00:04:29 -0400
Branch: REL_10_STABLE Release: REL_10_0 [3876b16ce] 2017-09-22 00:04:21 -0400
Branch: REL9_6_STABLE [e25f4401d] 2017-09-22 00:04:21 -0400
Branch: REL9_5_STABLE [89f02e17a] 2017-09-22 00:04:21 -0400
Branch: REL9_4_STABLE [dbd6099fb] 2017-09-22 00:04:21 -0400
Branch: REL9_3_STABLE [2020f90bf] 2017-09-22 00:04:21 -0400
Branch: REL9_2_STABLE [a07105afa] 2017-09-22 00:04:21 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [24a1897ab] 2017-10-23 17:54:09 -0400
Branch: REL_10_STABLE [dffe7fbc2] 2017-10-23 17:54:09 -0400
Branch: REL9_6_STABLE [173b7a4a7] 2017-10-23 17:54:09 -0400
Branch: REL9_5_STABLE [4b433a8b0] 2017-10-23 17:54:09 -0400
Branch: REL9_4_STABLE [876e076eb] 2017-10-23 17:54:09 -0400
Branch: REL9_3_STABLE [9c74dd2d5] 2017-10-23 17:54:09 -0400
Branch: REL9_2_STABLE [1317d1301] 2017-10-23 17:54:09 -0400
-->
     <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-6-5">
  <title>Release 9.6.5</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-08-31</para>
  </formalpara>

  <para>
   This release contains a small number of fixes from 9.6.4.
   For information about new features in the 9.6 major release, see
   <xref linkend="release-9-6">.
  </para>

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

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

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

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [0659465ca] 2017-08-15 19:27:22 -0400
Branch: REL_10_STABLE [3ea58216d] 2017-08-15 19:30:35 -0400
Branch: REL9_6_STABLE [dce90c7c8] 2017-08-15 19:31:06 -0400
Branch: REL9_5_STABLE [dbeefe64f] 2017-08-15 19:32:00 -0400
Branch: REL9_4_STABLE [52427015a] 2017-08-15 19:32:41 -0400
Branch: REL9_3_STABLE [9f0f4efc2] 2017-08-15 19:32:52 -0400
Branch: REL9_2_STABLE [98e6784aa] 2017-08-15 19:33:04 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_10_STABLE [5b6289c1e] 2017-08-14 15:43:20 -0400
Branch: REL9_6_STABLE [624b6f328] 2017-08-14 15:43:20 -0400
Branch: REL9_5_STABLE [51684bad9] 2017-08-14 15:43:20 -0400
Branch: REL9_4_STABLE [daafb11ff] 2017-08-14 15:43:20 -0400
Branch: REL9_3_STABLE [cd184273b] 2017-08-14 15:43:20 -0400
Branch: REL9_2_STABLE [8ae41ceae] 2017-08-14 15:43:20 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_10_STABLE [004a9702e] 2017-08-13 16:15:14 -0400
Branch: REL9_6_STABLE [a64b5a992] 2017-08-13 16:15:14 -0400
Branch: REL9_5_STABLE [425be3ac9] 2017-08-13 16:15:14 -0400
Branch: REL9_4_STABLE [5a3688dc8] 2017-08-13 16:15:14 -0400
Branch: REL9_3_STABLE [bb11ff2bc] 2017-08-13 16:15:14 -0400
Branch: REL9_2_STABLE [5069017fe] 2017-08-13 16:15:14 -0400
-->
     <para>
      Remove assertion that could trigger during a fatal exit (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_10_STABLE [749c7c417] 2017-08-09 17:03:09 -0400
Branch: REL9_6_STABLE [e2e398473] 2017-08-09 17:03:09 -0400
Branch: REL9_5_STABLE [d1c1d90e1] 2017-08-09 17:03:09 -0400
Branch: REL9_4_STABLE [95a0a8d2a] 2017-08-09 17:03:09 -0400
Branch: REL9_3_STABLE [06931a9c0] 2017-08-09 17:03:10 -0400
Branch: REL9_2_STABLE [4e704aac1] 2017-08-09 17:03:10 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_10_STABLE [9bf4068cc] 2017-08-08 19:18:22 -0400
Branch: REL9_6_STABLE [fe578cbd4] 2017-08-08 19:18:23 -0400
-->
     <para>
      Prevent crash when passing fixed-length pass-by-reference data types
      to parallel worker processes (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b1c2d76a2] 2017-08-19 13:39:51 -0400
Branch: REL_10_STABLE [1c3869c0b] 2017-08-19 13:39:52 -0400
Branch: REL9_6_STABLE [41803d55a] 2017-08-19 13:39:38 -0400
Branch: REL9_5_STABLE [258aac0b2] 2017-08-19 13:39:38 -0400
Branch: REL9_4_STABLE [59dde9fed] 2017-08-19 13:39:38 -0400
Branch: REL9_3_STABLE [ece4bd901] 2017-08-19 13:39:38 -0400
-->
     <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>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master Release: REL_10_STABLE [ea0ca75d5] 2017-08-14 11:29:34 +0200
Branch: REL9_6_STABLE [3d7a1e2b9] 2017-08-16 13:28:14 +0200
Branch: REL9_5_STABLE [f2ed2d0a1] 2017-08-16 13:28:37 +0200
Branch: REL9_4_STABLE [bd502753a] 2017-08-16 13:29:00 +0200
Branch: REL9_3_STABLE [f8bc6b2f6] 2017-08-16 13:30:09 +0200
Branch: REL9_2_STABLE [60b135c82] 2017-08-16 13:30:20 +0200
-->
     <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>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [a4619b26a] 2017-08-15 17:14:52 +0200
Branch: REL_10_STABLE [a6b174f55] 2017-08-16 13:27:21 +0200
Branch: REL9_6_STABLE [954490fec] 2017-08-16 13:28:10 +0200
-->
     <para>
      Change <application>ecpg</>'s parser to recognize backslash
      continuation of C preprocessor command lines (Michael Meskes)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_10_STABLE [5a5c2feca] 2017-08-14 11:48:59 -0400
Branch: REL9_6_STABLE [3883be3ea] 2017-08-14 11:48:59 -0400
Branch: REL9_5_STABLE [1621a7553] 2017-08-14 11:48:59 -0400
Branch: REL9_4_STABLE [01de7ea85] 2017-08-14 11:48:59 -0400
Branch: REL9_3_STABLE [25169b948] 2017-08-14 11:48:59 -0400
Branch: REL9_2_STABLE [e3335ec0b] 2017-08-14 11:48:59 -0400
Branch: master [b5178c5d0] 2017-08-17 13:13:47 -0400
Branch: REL_10_STABLE [1d7a479d2] 2017-08-17 13:13:56 -0400
Branch: REL9_6_STABLE [c34331488] 2017-08-17 13:14:06 -0400
Branch: REL9_5_STABLE [bff216d87] 2017-08-17 13:14:11 -0400
Branch: REL9_4_STABLE [4f862351d] 2017-08-17 13:15:15 -0400
Branch: REL9_3_STABLE [bc4404405] 2017-08-17 13:15:36 -0400
Branch: REL9_2_STABLE [f7e4783dd] 2017-08-17 13:15:46 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_10_STABLE [a76200de8] 2017-08-09 12:05:53 -0400
Branch: REL9_6_STABLE [fc2aafe4a] 2017-08-09 12:06:08 -0400
Branch: REL9_5_STABLE [a784d5f21] 2017-08-09 12:06:14 -0400
-->
     <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-6-4">
  <title>Release 9.6.4</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-08-10</para>
  </formalpara>

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

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

   <para>
    A dump/restore is not required for those running 9.6.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.6.3,
    see <xref linkend="release-9-6-3">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [e568e1eee] 2017-08-07 07:09:28 -0700
Branch: REL9_6_STABLE [156099630] 2017-08-07 07:09:31 -0700
Branch: REL9_5_STABLE [36f9f6095] 2017-08-07 07:09:31 -0700
Branch: REL9_4_STABLE [b6e39ca92] 2017-08-07 07:09:31 -0700
Branch: REL9_3_STABLE [5e8e00914] 2017-08-07 07:09:31 -0700
Branch: REL9_2_STABLE [e255e97a2] 2017-08-07 07:09:32 -0700
-->
     <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>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [bf6b9e944] 2017-08-07 17:03:42 +0300
Branch: REL9_6_STABLE [f6fc72cb6] 2017-08-07 17:03:49 +0300
Branch: REL9_5_STABLE [127835ddf] 2017-08-07 17:04:00 +0300
Branch: REL9_4_STABLE [d5d46d99b] 2017-08-07 17:04:07 +0300
Branch: REL9_3_STABLE [b2f833ea7] 2017-08-07 17:04:12 +0300
Branch: REL9_2_STABLE [06651648a] 2017-08-07 17:04:17 +0300
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8d9881911] 2017-08-07 10:19:19 -0400
Branch: REL9_6_STABLE [52a414387] 2017-08-07 10:19:20 -0400
Branch: REL9_5_STABLE [873741c68] 2017-08-07 10:19:21 -0400
Branch: REL9_4_STABLE [f1cda6d6c] 2017-08-07 10:19:22 -0400
-->
     <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>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [0f33a719f] 2017-06-15 12:30:02 -0400
Branch: REL9_6_STABLE [a0873fbab] 2017-06-15 12:30:02 -0400
Branch: REL9_5_STABLE [fd376afc9] 2017-06-15 12:30:02 -0400
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [459c64d32] 2017-07-26 17:24:16 -0400
Branch: REL9_6_STABLE [8c348765f] 2017-07-26 17:24:16 -0400
Branch: REL9_5_STABLE [0d4604ad6] 2017-07-26 17:24:16 -0400
Branch: REL9_4_STABLE [dfd091985] 2017-07-26 17:25:46 -0400
Branch: REL9_3_STABLE [2efbfb94b] 2017-07-26 17:24:16 -0400
-->
     <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>
<!--
Author: Teodor Sigaev <teodor@sigaev.ru>
Branch: master [31b8db8e6] 2017-07-06 17:18:55 +0300
Branch: REL9_6_STABLE [42f62e4c9] 2017-07-06 17:19:44 +0300
Branch: REL9_5_STABLE [fb2d385e6] 2017-07-06 17:20:17 +0300
Branch: REL9_4_STABLE [b90e4ca3e] 2017-07-06 17:20:37 +0300
Branch: REL9_3_STABLE [f371cc9e9] 2017-07-06 17:20:56 +0300
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [512f67c8d] 2017-07-12 13:24:16 -0400
Branch: REL9_6_STABLE [09c598898] 2017-07-12 13:24:16 -0400
Branch: REL9_5_STABLE [e7213fe2b] 2017-07-12 13:24:16 -0400
Branch: REL9_4_STABLE [e439bbe99] 2017-07-12 13:24:17 -0400
-->
     <para>
      Avoid integer overflow and ensuing crash when sorting more than one
      billion tuples in-memory (Sergey Koposov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [45e004fb4] 2017-07-10 11:00:09 -0400
Branch: REL9_6_STABLE [c0077f738] 2017-07-10 11:00:09 -0400
Branch: REL9_5_STABLE [afd1415a4] 2017-07-10 11:00:09 -0400
Branch: REL9_4_STABLE [bc0f76e7a] 2017-07-10 11:00:09 -0400
Branch: REL9_3_STABLE [59892b120] 2017-07-10 11:00:09 -0400
Branch: REL9_2_STABLE [a4a590ee7] 2017-07-10 11:00:09 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e2c8100e6] 2017-07-24 16:45:58 -0400
Branch: REL9_6_STABLE [51865a0a0] 2017-07-24 16:46:00 -0400
Branch: REL9_5_STABLE [5146ca352] 2017-07-24 16:45:46 -0400
Branch: REL9_4_STABLE [8ad35c7fa] 2017-07-24 16:45:46 -0400
Branch: REL9_3_STABLE [4ecee1192] 2017-07-24 16:45:47 -0400
Branch: REL9_2_STABLE [05a562d9c] 2017-07-24 16:45:47 -0400
-->
     <para>
      Fix low-probability corruption of shared predicate-lock hash table
      in Windows builds (Thomas Munro, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [b93827c74] 2017-07-03 14:51:51 +0300
Branch: REL9_6_STABLE [f73382877] 2017-07-03 14:53:01 +0300
Branch: REL9_5_STABLE [90630a6ad] 2017-07-03 14:53:06 +0300
Branch: REL9_4_STABLE [fb63a0aa3] 2017-07-03 14:53:08 +0300
Branch: REL9_3_STABLE [543e00bc1] 2017-07-03 14:53:10 +0300
Branch: REL9_2_STABLE [fb1110085] 2017-07-03 14:53:12 +0300
-->
     <para>
      Avoid logging clean closure of an SSL connection as though
      it were a connection reset (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [97d3a0b09] 2017-08-04 11:07:10 -0400
Branch: REL9_6_STABLE [b798ea88a] 2017-08-04 11:07:10 -0400
Branch: REL9_5_STABLE [bebee333c] 2017-08-04 11:07:10 -0400
Branch: REL9_4_STABLE [8d05db3d8] 2017-08-04 11:07:10 -0400
Branch: REL9_3_STABLE [dda04b9dd] 2017-08-04 11:07:10 -0400
Branch: REL9_2_STABLE [c180d2eb7] 2017-08-04 11:07:11 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f0256c774] 2017-06-27 18:47:57 -0400
Branch: REL9_6_STABLE [55968ed89] 2017-06-27 18:47:57 -0400
Branch: REL9_5_STABLE [d16e96fb2] 2017-06-27 18:47:57 -0400
Branch: REL9_4_STABLE [c2cb606a2] 2017-06-27 18:47:57 -0400
Branch: REL9_3_STABLE [9ce7f3919] 2017-06-27 18:47:57 -0400
Branch: REL9_2_STABLE [6ccab9242] 2017-06-27 18:47:57 -0400
Branch: master [99255d73c] 2017-06-28 12:30:16 -0400
Branch: REL9_6_STABLE [43c67e32f] 2017-06-28 12:30:16 -0400
Branch: REL9_5_STABLE [63f5db8ab] 2017-06-28 12:30:16 -0400
Branch: REL9_4_STABLE [e97b7372b] 2017-06-28 12:30:16 -0400
Branch: REL9_3_STABLE [cc154d9a0] 2017-06-28 12:30:16 -0400
Branch: REL9_2_STABLE [5e7447132] 2017-06-28 12:30:16 -0400
-->
     <para>
      Fix code for setting <xref linkend="guc-tcp-keepalives-idle"> on
      Solaris (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ad1b5c842] 2017-06-26 16:17:05 -0400
Branch: REL9_6_STABLE [f6af9c749] 2017-06-26 16:17:05 -0400
Branch: REL9_5_STABLE [5a6b95cdf] 2017-06-26 16:17:06 -0400
Branch: REL9_4_STABLE [fc4da1fde] 2017-06-26 16:17:06 -0400
Branch: REL9_3_STABLE [456bf261d] 2017-06-26 16:17:06 -0400
Branch: REL9_2_STABLE [439b6363d] 2017-06-26 16:17:06 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8b0b6303e] 2017-05-16 15:24:52 -0400
Branch: REL9_6_STABLE [34782a348] 2017-05-29 20:27:45 -0400
Branch: REL9_5_STABLE [82f8c21e0] 2017-05-29 20:27:45 -0400
Branch: REL9_4_STABLE [54676c72c] 2017-05-29 20:27:45 -0400
Branch: REL9_3_STABLE [4a3bb96ce] 2017-05-29 20:27:45 -0400
Branch: REL9_2_STABLE [364100e0b] 2017-05-29 20:27:45 -0400
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [fb886c153] 2017-06-21 14:14:45 -0700
Branch: REL9_6_STABLE [39e30cbc1] 2017-06-21 14:14:38 -0700
Branch: REL9_5_STABLE [7775ebaf0] 2017-06-21 14:14:29 -0700
Branch: REL9_4_STABLE [823a51ed3] 2017-06-21 14:14:21 -0700
Branch: REL9_3_STABLE [511d803ca] 2017-06-21 14:14:12 -0700
Branch: REL9_2_STABLE [81bf7b5b1] 2017-06-21 14:13:58 -0700
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fca85f8ef] 2017-06-30 12:00:15 -0400
Branch: REL9_6_STABLE [e9d4aa594] 2017-06-30 12:00:03 -0400
Branch: REL9_5_STABLE [446914f6b] 2017-06-30 12:00:03 -0400
Branch: REL9_4_STABLE [5aa8db014] 2017-06-30 12:00:03 -0400
-->
     <para>
      Fix <application>walsender</> to exit promptly when client requests
      shutdown (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [47fd420fb] 2017-06-05 19:18:15 -0700
Branch: REL9_6_STABLE [b3d5b6833] 2017-06-05 19:18:16 -0700
Branch: REL9_5_STABLE [e1319f64e] 2017-06-05 19:18:16 -0700
Branch: REL9_4_STABLE [f4e484dd0] 2017-06-05 19:18:16 -0700
Branch: master [6e1dd2773] 2017-06-05 19:18:16 -0700
Branch: REL9_6_STABLE [b8bd32a51] 2017-06-05 19:18:16 -0700
Branch: REL9_5_STABLE [641a60b02] 2017-06-05 19:18:16 -0700
Branch: REL9_4_STABLE [55d7027d5] 2017-06-05 19:18:16 -0700
Branch: REL9_3_STABLE [45d067d50] 2017-06-05 19:18:16 -0700
Branch: REL9_2_STABLE [133b1920c] 2017-06-05 19:18:16 -0700
-->
     <para>
      Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in
      walsender processes (Petr Jelinek, Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [c6c333436] 2017-06-05 19:18:15 -0700
Branch: REL9_6_STABLE [862204aac] 2017-06-05 19:18:16 -0700
Branch: REL9_5_STABLE [50581f2e7] 2017-06-05 19:18:16 -0700
Branch: REL9_4_STABLE [1cdc0ab9c] 2017-06-05 19:18:16 -0700
-->
     <para>
      Prevent walsender-triggered panics during shutdown checkpoints
      (Andres Freund, Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e5d494d78] 2017-06-26 17:31:56 -0400
Branch: REL9_6_STABLE [a4d1ce095] 2017-06-26 17:31:56 -0400
Branch: REL9_5_STABLE [dc311b5bd] 2017-06-26 17:31:56 -0400
Branch: REL9_4_STABLE [47fec424c] 2017-06-26 17:31:56 -0400
Branch: REL9_3_STABLE [cb59949f6] 2017-06-26 17:31:56 -0400
Branch: REL9_2_STABLE [e96adaacd] 2017-06-26 17:31:56 -0400
-->
     <para>
      Fix unnecessarily slow restarts of <application>walreceiver</>
      processes due to race condition in postmaster (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [3bdea167e] 2017-06-18 19:12:56 -0700
Branch: REL9_6_STABLE [810344436] 2017-06-18 19:13:15 -0700
Branch: REL9_5_STABLE [1ba1adf77] 2017-06-18 19:13:50 -0700
Branch: REL9_4_STABLE [a27c566c7] 2017-06-18 19:14:09 -0700
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [524dbc143] 2017-05-13 15:06:40 -0700
Branch: REL9_6_STABLE [bd619fcfe] 2017-05-13 15:06:40 -0700
Branch: REL9_5_STABLE [fa9207c74] 2017-05-13 15:06:40 -0700
Branch: REL9_4_STABLE [2dca50b76] 2017-05-13 15:06:40 -0700
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [955a684e0] 2017-05-13 14:21:00 -0700
Branch: REL9_6_STABLE [75784859c] 2017-05-13 14:21:00 -0700
Branch: REL9_5_STABLE [b64a68e36] 2017-05-13 14:21:00 -0700
Branch: REL9_4_STABLE [79abd23db] 2017-05-13 14:21:00 -0700
-->
     <para>
      Fix race condition that could indefinitely delay creation of
      logical-decoding slots (Andres Freund, Petr Jelinek)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [50ee1c746] 2017-05-12 18:17:29 -0400
Branch: REL9_6_STABLE [b7a98b14c] 2017-05-12 18:17:29 -0400
Branch: REL9_5_STABLE [3569a9a73] 2017-05-12 18:17:29 -0400
Branch: REL9_4_STABLE [64417f8d3] 2017-05-12 18:17:29 -0400
Branch: master [8085a4f75] 2017-05-12 18:30:17 -0400
Branch: REL9_6_STABLE [f7d0a31ce] 2017-05-12 18:30:02 -0400
Branch: REL9_5_STABLE [8a7506e04] 2017-05-12 18:30:02 -0400
Branch: REL9_4_STABLE [ef7a6b3c9] 2017-05-12 18:30:02 -0400
Branch: master [2df5d4655] 2017-05-12 19:05:27 -0400
Branch: REL9_6_STABLE [d0755dc32] 2017-05-12 19:05:28 -0400
Branch: REL9_5_STABLE [e7955ac64] 2017-05-12 19:05:29 -0400
Branch: REL9_4_STABLE [32900700f] 2017-05-12 19:05:30 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d8e6b84bd] 2017-06-19 15:33:41 -0400
Branch: REL9_6_STABLE [1f184426b] 2017-06-19 15:33:41 -0400
-->
     <para>
      Remove incorrect heuristic used in some cases to estimate join
      selectivity based on the presence of foreign-key constraints
      (David Rowley)
     </para>

     <para>
      In some cases where a multi-column foreign key constraint existed but
      did not exactly match a query's join structure, the planner used an
      estimation heuristic that turns out not to work well at all.  Revert
      such cases to the way they were estimated before 9.6.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b1cb32fb6] 2017-07-11 16:48:59 -0400
Branch: REL9_6_STABLE [123368061] 2017-07-11 16:48:59 -0400
Branch: REL9_5_STABLE [56076b88d] 2017-07-11 16:48:59 -0400
Branch: REL9_4_STABLE [a8358559e] 2017-07-11 16:48:59 -0400
Branch: REL9_3_STABLE [521fede16] 2017-07-11 16:48:59 -0400
Branch: REL9_2_STABLE [55204850a] 2017-07-11 16:48:59 -0400
Branch: master [bc2d716ad] 2017-07-12 18:00:04 -0400
Branch: REL9_6_STABLE [ff2d53722] 2017-07-12 18:00:04 -0400
Branch: REL9_5_STABLE [2346f1c10] 2017-07-12 18:00:04 -0400
Branch: REL9_4_STABLE [a2320b337] 2017-07-12 18:00:04 -0400
Branch: REL9_3_STABLE [aea1a3f0e] 2017-07-12 18:00:04 -0400
Branch: REL9_2_STABLE [75670ec37] 2017-07-12 18:00:04 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9c7dc8928] 2017-06-27 17:51:11 -0400
Branch: REL9_6_STABLE [3a7bd59c4] 2017-06-27 17:51:11 -0400
Branch: REL9_5_STABLE [9a2706572] 2017-06-27 17:51:11 -0400
Branch: REL9_4_STABLE [dc777f9db] 2017-06-27 17:51:11 -0400
Branch: REL9_3_STABLE [66dee28b4] 2017-06-27 17:51:11 -0400
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [7086be6e3] 2017-07-24 15:57:24 -0400
Branch: REL9_6_STABLE [971faefc2] 2017-07-24 16:24:42 -0400
-->
     <para>
      Ensure that a view's <literal>CHECK OPTIONS</> clause is enforced
      properly when the underlying table is a foreign table (Etsuro Fujita)
     </para>

     <para>
      Previously, the update might get pushed entirely to the foreign
      server, but the need to verify the view conditions was missed if so.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [94aced8cd] 2017-05-26 15:16:59 -0400
Branch: REL9_6_STABLE [acab87ece] 2017-05-26 15:16:59 -0400
Branch: REL9_5_STABLE [9ded51719] 2017-05-26 15:16:59 -0400
Branch: REL9_4_STABLE [8f62b388b] 2017-05-26 15:16:59 -0400
Branch: REL9_3_STABLE [525780c62] 2017-05-26 15:16:59 -0400
Branch: REL9_2_STABLE [da9165686] 2017-05-26 15:16:59 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [12590c5d3] 2017-05-15 11:33:44 -0400
Branch: REL9_6_STABLE [b35cce914] 2017-05-15 11:33:44 -0400
Branch: REL9_5_STABLE [53a1aa9f9] 2017-05-15 11:33:45 -0400
-->
     <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>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [b37448122] 2017-08-03 20:34:45 -0400
Branch: REL9_6_STABLE [df04db041] 2017-08-03 20:49:07 -0400
Branch: REL9_5_STABLE [f2878a608] 2017-08-03 20:55:44 -0400
Branch: REL9_4_STABLE [e0446d06e] 2017-08-03 21:08:39 -0400
Branch: REL9_3_STABLE [b7d1bc820] 2017-08-03 21:29:36 -0400
Branch: REL9_2_STABLE [22eb38caa] 2017-08-03 21:42:46 -0400
-->
     <para>
      Ensure that <command>ALTER USER ... SET</> accepts all the syntax
      variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [86705aa8c] 2017-08-03 13:24:48 -0400
Branch: REL9_6_STABLE [1f220c390] 2017-08-03 13:25:32 -0400
-->
     <para>
      Allow a foreign table's <literal>CHECK</> constraints to be
      initially <literal>NOT VALID</> (Amit Langote)
     </para>

     <para>
      <command>CREATE TABLE</> silently drops <literal>NOT VALID</>
      specifiers for <literal>CHECK</> constraints, reasoning that the
      table must be empty so the constraint can be validated immediately.
      But this is wrong for <command>CREATE FOREIGN TABLE</>, where there's
      no reason to suppose that the underlying table is empty, and even if
      it is it's no business of ours to decide that the constraint can be
      treated as valid going forward.  Skip this <quote>optimization</> for
      foreign tables.
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [30681c830] 2017-06-16 11:33:12 +0300
Branch: REL9_6_STABLE [a9a5eb32b] 2017-06-16 11:39:45 +0300
Branch: REL9_5_STABLE [501e6f8b7] 2017-06-16 11:44:00 +0300
Branch: REL9_4_STABLE [6338b50b9] 2017-06-16 11:46:15 +0300
Branch: REL9_3_STABLE [b47e2f7a9] 2017-06-16 11:46:11 +0300
Branch: REL9_2_STABLE [ac93a78b0] 2017-06-16 11:46:26 +0300
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [34aebcf42] 2017-06-02 19:11:15 -0700
Branch: REL9_6_STABLE [8a7cd781e] 2017-06-02 19:11:23 -0700
-->
     <para>
      Allow parallelism in the query plan when <command>COPY</> copies from
      a query's result (Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [da11977de] 2017-07-12 22:06:13 +0300
Branch: REL9_6_STABLE [bbeec3c74] 2017-07-12 22:06:10 +0300
Branch: REL9_5_STABLE [209970ded] 2017-07-12 22:03:58 +0300
Branch: REL9_4_STABLE [852902822] 2017-07-12 22:04:03 +0300
Branch: REL9_3_STABLE [11854dee0] 2017-07-12 22:04:08 +0300
Branch: REL9_2_STABLE [40ba61b44] 2017-07-12 22:04:15 +0300
-->
     <para>
      Reduce memory usage when <command>ANALYZE</> processes
      a <type>tsvector</> column (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d761fe218] 2017-05-21 13:05:16 -0400
Branch: REL9_6_STABLE [c101d83a3] 2017-05-21 13:05:17 -0400
Branch: REL9_5_STABLE [5032f704e] 2017-05-21 13:05:17 -0400
Branch: REL9_4_STABLE [83f4e8f71] 2017-05-21 13:05:17 -0400
Branch: REL9_3_STABLE [b3c536bce] 2017-05-21 13:05:17 -0400
Branch: REL9_2_STABLE [798d2321e] 2017-05-21 13:05:17 -0400
-->
     <para>
      Fix unnecessary precision loss and sloppy rounding when multiplying
      or dividing <type>money</> values by integers or floats (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9ae2661fe] 2017-05-24 15:28:34 -0400
Branch: REL9_6_STABLE [8527132e5] 2017-05-24 15:28:34 -0400
Branch: REL9_5_STABLE [2c5e3fab3] 2017-05-24 15:28:35 -0400
Branch: REL9_4_STABLE [a3043d363] 2017-05-24 15:28:35 -0400
Branch: REL9_3_STABLE [971a158e6] 2017-05-24 15:28:35 -0400
Branch: REL9_2_STABLE [a047270d5] 2017-05-24 15:28:35 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bebe174bb] 2017-07-28 12:25:43 -0400
Branch: REL9_6_STABLE [30a5c8bfb] 2017-07-31 12:10:36 -0400
Branch: REL9_5_STABLE [99eea89db] 2017-07-31 12:10:36 -0400
Branch: REL9_4_STABLE [d48180ec8] 2017-07-31 12:10:36 -0400
Branch: REL9_3_STABLE [b92f17277] 2017-07-31 12:10:36 -0400
Branch: REL9_2_STABLE [b4b958251] 2017-07-31 12:10:36 -0400
Branch: master [3c163a7fc] 2017-07-28 14:25:28 -0400
Branch: REL9_6_STABLE [1e58c503e] 2017-07-31 12:38:35 -0400
Branch: REL9_5_STABLE [df52739ce] 2017-07-31 12:38:35 -0400
Branch: REL9_4_STABLE [9cbdc6894] 2017-07-31 12:38:35 -0400
Branch: REL9_3_STABLE [0d8f015e7] 2017-07-31 12:38:35 -0400
Branch: REL9_2_STABLE [456c7dff2] 2017-07-31 12:38:35 -0400
-->
     <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>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [e6c33d594] 2017-06-07 14:01:46 +0300
Branch: REL9_6_STABLE [f44c609ea] 2017-06-07 14:04:54 +0300
Branch: REL9_5_STABLE [739cb7f8b] 2017-06-07 14:03:27 +0300
Branch: REL9_4_STABLE [1fe1fc449] 2017-06-07 14:04:49 +0300
Branch: REL9_3_STABLE [f2fa0c651] 2017-06-07 14:04:44 +0300
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9485516ea] 2017-05-17 12:24:19 -0400
Branch: REL9_6_STABLE [bee9e8698] 2017-05-17 12:24:19 -0400
Branch: REL9_5_STABLE [49dfbb53c] 2017-05-17 12:24:19 -0400
Branch: REL9_4_STABLE [ff0e30512] 2017-05-17 12:24:19 -0400
Branch: REL9_3_STABLE [6bc710f6d] 2017-05-17 12:24:19 -0400
Branch: REL9_2_STABLE [07477130e] 2017-05-17 12:24:19 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3eb9a5e7c] 2017-08-03 17:36:39 -0400
Branch: REL9_6_STABLE [3d7632829] 2017-08-03 17:36:41 -0400
Branch: REL9_5_STABLE [65048cf23] 2017-08-03 17:36:42 -0400
Branch: REL9_4_STABLE [b93217653] 2017-08-03 17:36:43 -0400
Branch: REL9_3_STABLE [035bb8222] 2017-08-03 17:36:23 -0400
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [4d57e8381] 2017-08-02 18:26:59 -0400
Branch: REL9_6_STABLE [060393f2a] 2017-08-02 18:26:58 -0400
Branch: REL9_5_STABLE [f3142c027] 2017-08-02 18:26:58 -0400
Branch: REL9_4_STABLE [330e68734] 2017-08-02 18:26:57 -0400
Branch: master [9a3b5d3ad] 2017-08-03 14:54:28 -0400
Branch: REL9_6_STABLE [611840074] 2017-08-03 14:55:18 -0400
Branch: REL9_5_STABLE [12f1e523a] 2017-08-03 14:55:17 -0400
Branch: REL9_4_STABLE [69ad12b58] 2017-08-03 14:55:17 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [93f039b49] 2017-07-22 20:20:09 -0400
Branch: REL9_6_STABLE [82ebda7ff] 2017-07-22 20:20:09 -0400
Branch: REL9_5_STABLE [7debd9f79] 2017-07-22 20:20:09 -0400
Branch: REL9_4_STABLE [502ead3d6] 2017-07-22 20:20:10 -0400
Branch: REL9_3_STABLE [68a22bc69] 2017-07-22 20:20:10 -0400
-->
     <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>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [4500edc7e] 2017-06-28 10:33:57 -0400
Branch: REL9_6_STABLE [a2de017b3] 2017-06-28 10:34:01 -0400
-->
     <para>
      Fix <application>pg_dump</> with the <option>--clean</> option to not
      fail when the <literal>public</> schema doesn't exist (Stephen Frost)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0461b66e3] 2017-05-26 12:51:05 -0400
Branch: REL9_6_STABLE [5886c7d58] 2017-05-26 12:51:05 -0400
Branch: REL9_5_STABLE [41c4eb5ec] 2017-05-26 12:51:05 -0400
Branch: REL9_4_STABLE [1cfc9dc75] 2017-05-26 12:51:05 -0400
Branch: REL9_3_STABLE [a561254e4] 2017-05-26 12:51:05 -0400
Branch: REL9_2_STABLE [f62e1eff5] 2017-05-26 12:51:06 -0400
-->
     <para>
      Fix <application>pg_dump</> to not emit invalid SQL for an empty
      operator class (Daniel Gustafsson)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bd61d5a19] 2017-06-19 11:02:45 -0400
Branch: REL9_6_STABLE [3ef40dcec] 2017-06-19 11:03:02 -0400
Branch: REL9_5_STABLE [4fc274dd8] 2017-06-19 11:03:07 -0400
Branch: REL9_4_STABLE [d063f972d] 2017-06-19 11:03:11 -0400
Branch: REL9_3_STABLE [2943c04f7] 2017-06-19 11:03:16 -0400
Branch: REL9_2_STABLE [c10cbf77a] 2017-06-19 11:03:21 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b4af9e3f3] 2017-07-24 15:16:31 -0400
Branch: REL9_6_STABLE [3a07ba128] 2017-07-24 15:16:31 -0400
Branch: REL9_5_STABLE [f579580be] 2017-07-24 15:16:31 -0400
Branch: REL9_4_STABLE [f0f255a34] 2017-07-24 15:16:31 -0400
Branch: REL9_3_STABLE [b6d640047] 2017-07-24 15:16:31 -0400
Branch: REL9_2_STABLE [d9874fde8] 2017-07-24 15:16:31 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [eb145fdfe] 2017-07-20 11:29:36 -0400
Branch: REL9_6_STABLE [41ada8377] 2017-07-20 11:29:36 -0400
Branch: REL9_5_STABLE [c2bbec9f2] 2017-07-20 11:29:36 -0400
Branch: REL9_4_STABLE [6ab4a1136] 2017-07-20 11:29:36 -0400
Branch: REL9_3_STABLE [e947838ae] 2017-07-20 11:29:36 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a3ca72ae9] 2017-07-13 19:25:03 -0400
Branch: REL9_6_STABLE [3b0c2dbed] 2017-07-13 19:24:44 -0400
Branch: REL9_5_STABLE [3fbebd781] 2017-07-13 19:24:44 -0400
Branch: REL9_4_STABLE [26d867875] 2017-07-13 19:24:44 -0400
Branch: REL9_3_STABLE [0ecc407d9] 2017-07-13 19:24:44 -0400
Branch: REL9_2_STABLE [bccfb1776] 2017-07-13 19:24:44 -0400
-->
     <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>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [8046465c2] 2017-07-14 16:02:53 +0300
Branch: REL9_6_STABLE [cedd25ae8] 2017-07-14 16:03:05 +0300
Branch: REL9_5_STABLE [f20d58a6f] 2017-07-14 16:03:12 +0300
Branch: REL9_4_STABLE [240299806] 2017-07-14 16:03:16 +0300
Branch: REL9_3_STABLE [f3633689f] 2017-07-14 16:03:23 +0300
Branch: REL9_2_STABLE [4b994a96c] 2017-07-14 16:03:27 +0300
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [a46fe6e8b] 2017-07-21 14:25:36 -0400
Branch: REL9_6_STABLE [73fbf3d3d] 2017-07-21 22:04:55 -0400
Branch: REL9_5_STABLE [ed367be64] 2017-07-21 22:05:07 -0400
-->
     <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>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [b710248dd] 2017-06-20 13:20:10 -0400
Branch: REL9_6_STABLE [0efdbd323] 2017-06-20 13:20:02 -0400
Branch: REL9_5_STABLE [f4f867bda] 2017-06-20 13:20:02 -0400
Branch: REL9_4_STABLE [a0e854881] 2017-06-20 13:20:02 -0400
Branch: REL9_3_STABLE [5c890645d] 2017-06-20 13:20:02 -0400
Branch: REL9_2_STABLE [65beccae5] 2017-06-20 13:20:02 -0400
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [c25ed2006] 2017-06-05 16:10:07 -0700
Branch: REL9_6_STABLE [d3ca4b4b4] 2017-06-05 16:10:07 -0700
Branch: REL9_5_STABLE [25653c171] 2017-06-05 16:10:07 -0700
-->
     <para>
      Fix <application>pg_xlogdump</>'s computation of WAL record length
      (Andres Freund)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8bf58c0d9] 2017-07-21 12:51:38 -0400
Branch: REL9_6_STABLE [d86a2b7b5] 2017-07-21 12:51:38 -0400
Branch: REL9_5_STABLE [72318eaed] 2017-07-21 12:51:38 -0400
Branch: REL9_4_STABLE [cb2b1cac0] 2017-07-21 12:51:38 -0400
Branch: REL9_3_STABLE [69711415e] 2017-07-21 12:51:38 -0400
Branch: master [88f48b57f] 2017-07-21 14:20:43 -0400
Branch: REL9_6_STABLE [0d503dd1f] 2017-07-21 14:20:43 -0400
Branch: REL9_5_STABLE [90877d28e] 2017-07-21 14:20:43 -0400
Branch: REL9_4_STABLE [a648fc70a] 2017-07-21 14:20:43 -0400
Branch: REL9_3_STABLE [6d9de660d] 2017-07-21 14:20:43 -0400
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [ae9bfc5d6] 2017-06-07 15:14:55 -0400
Branch: REL9_6_STABLE [fd849956c] 2017-06-07 15:24:22 -0400
Branch: REL9_5_STABLE [b7665f079] 2017-06-07 15:33:32 -0400
Branch: REL9_4_STABLE [c02c450cf] 2017-06-07 15:40:35 -0400
Branch: REL9_3_STABLE [fc267a0c3] 2017-06-07 15:41:05 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [596a7c8df] 2017-05-11 14:51:21 -0400
Branch: REL9_6_STABLE [128e133cc] 2017-05-11 14:51:33 -0400
Branch: REL9_5_STABLE [6f2fe2468] 2017-05-11 14:51:38 -0400
Branch: REL9_4_STABLE [5c633f76b] 2017-05-11 14:51:46 -0400
-->
     <para>
      Increase <literal>MAX_SYSCACHE_CALLBACKS</> to provide more room for
      extensions (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e9a3c047a] 2017-06-01 13:32:55 -0400
Branch: REL9_6_STABLE [8d9b4fe01] 2017-06-01 13:32:56 -0400
Branch: REL9_5_STABLE [68938ab8e] 2017-06-01 13:32:56 -0400
Branch: REL9_4_STABLE [894ce0e97] 2017-06-01 13:32:56 -0400
Branch: REL9_3_STABLE [cee7238de] 2017-06-01 13:32:56 -0400
Branch: REL9_2_STABLE [a378b9bc2] 2017-06-01 13:32:56 -0400
-->
     <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: Andrew Dunstan <andrew@dunslane.net>
Branch: master [614350a3a] 2017-06-05 14:24:42 -0400
Branch: REL9_6_STABLE [b64ff9c5a] 2017-06-05 14:27:59 -0400
Branch: REL9_5_STABLE [0fde390f6] 2017-06-05 14:28:13 -0400
Branch: REL9_4_STABLE [307fc49d5] 2017-06-05 14:28:26 -0400
Branch: REL9_3_STABLE [fe39a086d] 2017-06-05 14:28:44 -0400
Branch: REL9_2_STABLE [545dc4d21] 2017-06-05 14:29:00 -0400
Branch: master [2e02136fe] 2017-06-05 20:38:46 -0400
Branch: REL9_6_STABLE [ec504aff7] 2017-06-05 20:39:53 -0400
Branch: REL9_5_STABLE [b2482ab83] 2017-06-05 20:40:11 -0400
Branch: REL9_4_STABLE [6da999635] 2017-06-05 20:40:27 -0400
Branch: REL9_3_STABLE [da30fa603] 2017-06-05 20:40:47 -0400
Branch: REL9_2_STABLE [f964a7c5a] 2017-06-05 20:41:01 -0400
-->
     <para>
      In MSVC builds, handle the case where the <application>openssl</>
      library is not within a <filename>VC</> subdirectory (Andrew Dunstan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [b757e01f6] 2017-05-12 10:21:13 -0400
Branch: REL9_6_STABLE [69ce3ead1] 2017-05-12 10:22:20 -0400
Branch: REL9_5_STABLE [8ec82ee6a] 2017-05-12 10:23:39 -0400
Branch: REL9_4_STABLE [616dd9978] 2017-05-12 10:24:00 -0400
Branch: REL9_3_STABLE [2c7d2114b] 2017-05-12 10:24:16 -0400
Branch: REL9_2_STABLE [614f83c12] 2017-05-12 10:24:36 -0400
-->
     <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>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [71ad8000d] 2017-07-23 23:53:27 -0700
Branch: REL9_6_STABLE [bcc2c3b45] 2017-07-23 23:53:37 -0700
Branch: REL9_5_STABLE [bef96e57e] 2017-07-23 23:53:41 -0700
Branch: REL9_4_STABLE [0328bd1ef] 2017-07-23 23:53:46 -0700
Branch: REL9_3_STABLE [9842c1b55] 2017-07-23 23:53:51 -0700
Branch: REL9_2_STABLE [4885e5c88] 2017-07-23 23:53:55 -0700
-->
     <para>
      In MSVC builds, recognize a Tcl library that is
      named <filename>tcl86.lib</> (Noah Misch)
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [56b6ef893] 2017-05-12 11:11:49 -0400
Branch: REL9_6_STABLE [cb701af78] 2017-05-12 11:21:20 -0400
Branch: REL9_5_STABLE [054a897c4] 2017-05-12 11:26:40 -0400
Branch: REL9_4_STABLE [d39d968f5] 2017-05-12 11:27:56 -0400
Branch: master [93b7d9731] 2017-06-10 10:19:06 -0400
Branch: REL9_6_STABLE [3c017a545] 2017-06-10 10:22:14 -0400
Branch: REL9_5_STABLE [11aa362c8] 2017-06-10 10:23:21 -0400
Branch: REL9_4_STABLE [6b2a0b475] 2017-06-10 10:23:43 -0400
Branch: master [fd2487e49] 2017-07-16 11:24:29 -0400
Branch: REL9_6_STABLE [b4a1d69ed] 2017-07-16 11:27:00 -0400
Branch: REL9_5_STABLE [7eb4124da] 2017-07-16 11:27:07 -0400
Branch: REL9_4_STABLE [9c3f502b4] 2017-07-16 11:27:15 -0400
-->
     <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-6-3">
  <title>Release 9.6.3</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-05-11</para>
  </formalpara>

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

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

   <para>
    A dump/restore is not required for those running 9.6.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.6.2,
    see <xref linkend="release-9-6-2">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [3eefc5105] 2017-05-08 07:24:24 -0700
Branch: REL9_6_STABLE [c928addfc] 2017-05-08 07:24:27 -0700
Branch: REL9_5_STABLE [db2158108] 2017-05-08 07:24:27 -0700
Branch: REL9_4_STABLE [b2423f0fa] 2017-05-08 07:24:27 -0700
Branch: REL9_3_STABLE [b5b124046] 2017-05-08 07:24:28 -0700
Branch: REL9_2_STABLE [99cbb0bd9] 2017-05-08 07:24:28 -0700
-->
     <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-6-4">.
     </para>
    </listitem>

    <listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [e2d4ef8de] 2017-05-08 09:26:32 -0400
Branch: REL9_6_STABLE [c33c42362] 2017-05-08 09:18:57 -0400
Branch: REL9_5_STABLE [d45cd7c0e] 2017-05-08 09:19:07 -0400
Branch: REL9_4_STABLE [3e5ea1f9b] 2017-05-08 09:19:15 -0400
Branch: REL9_3_STABLE [4f1b2089a] 2017-05-08 09:19:23 -0400
Branch: REL9_2_STABLE [d035c1b97] 2017-05-08 09:19:42 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b6576e591] 2017-05-08 11:18:40 -0400
Branch: REL9_6_STABLE [cad159432] 2017-05-08 11:18:54 -0400
Branch: REL9_5_STABLE [a199582ef] 2017-05-08 11:19:00 -0400
Branch: REL9_4_STABLE [d3f3f9568] 2017-05-08 11:19:04 -0400
Branch: REL9_3_STABLE [703da1795] 2017-05-08 11:19:08 -0400
-->
     <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>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [0170b10df] 2017-05-08 07:24:24 -0700
Branch: REL9_6_STABLE [aafbd1df9] 2017-05-08 07:24:27 -0700
Branch: REL9_5_STABLE [96d745492] 2017-05-08 07:24:27 -0700
Branch: REL9_4_STABLE [ed36c1fe1] 2017-05-08 07:24:27 -0700
Branch: REL9_3_STABLE [3eab81127] 2017-05-08 07:24:28 -0700
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [2bef06d51] 2017-04-27 13:13:36 -0700
Branch: REL9_6_STABLE [28afff347] 2017-04-27 13:13:36 -0700
Branch: REL9_5_STABLE [47f896b5c] 2017-04-27 13:13:37 -0700
Branch: REL9_4_STABLE [5da646138] 2017-04-27 13:13:37 -0700
Branch: master [56e19d938] 2017-04-27 15:29:15 -0700
Branch: REL9_6_STABLE [29e8c881d] 2017-04-27 15:29:33 -0700
Branch: REL9_5_STABLE [54270d7eb] 2017-04-27 15:29:43 -0700
Branch: REL9_4_STABLE [b6ecf26cc] 2017-04-27 15:29:52 -0700
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [87f998203] 2017-03-14 11:51:11 -0400
Branch: REL9_6_STABLE [36fcb36b8] 2017-03-14 11:52:27 -0400
Branch: REL9_5_STABLE [c17a3f57e] 2017-03-14 12:03:29 -0400
Branch: REL9_4_STABLE [bbd5e600f] 2017-03-14 12:06:36 -0400
Branch: REL9_3_STABLE [6bd7816e7] 2017-03-14 12:08:14 -0400
Branch: REL9_2_STABLE [b2ae1d6c4] 2017-03-14 12:10:36 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0874d4f3e] 2017-04-23 13:11:06 -0400
Branch: REL9_6_STABLE [f5885488d] 2017-04-23 13:11:08 -0400
Branch: REL9_5_STABLE [a66e01bbc] 2017-04-23 13:10:57 -0400
Branch: REL9_4_STABLE [2e14541c4] 2017-04-23 13:10:57 -0400
Branch: REL9_3_STABLE [856580873] 2017-04-23 13:10:57 -0400
Branch: REL9_2_STABLE [952e33b05] 2017-04-23 13:10:58 -0400
-->
     <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>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [1d04a59be] 2017-02-22 03:11:58 +0900
Branch: REL9_6_STABLE [9fab155c6] 2017-02-22 08:29:32 +0900
Branch: REL9_5_STABLE [feb659cce] 2017-02-22 08:29:44 +0900
Branch: REL9_4_STABLE [a3eb715a3] 2017-02-22 08:29:57 +0900
-->
     <para>
      Avoid possible crash in <application>walsender</> due to failure
      to initialize a string buffer (Stas Kelvich, Fujii Masao)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3f074845a] 2017-05-04 13:59:39 -0400
Branch: REL9_6_STABLE [855f0e924] 2017-05-04 13:59:13 -0400
Branch: REL9_5_STABLE [6cfb428b0] 2017-05-04 13:59:13 -0400
-->
     <para>
      Fix possible crash when rescanning a nearest-neighbor index-only scan
      on a GiST index (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [893902085] 2017-04-24 13:00:30 -0400
Branch: REL9_6_STABLE [dfa4baf91] 2017-04-24 13:00:23 -0400
Branch: master [aa1351f1e] 2017-04-26 16:17:34 -0400
Branch: REL9_6_STABLE [e880df25e] 2017-04-26 16:17:29 -0400
-->
     <para>
      Prevent delays in postmaster's launching of multiple parallel worker
      processes (Tom Lane)
     </para>

     <para>
      There could be a significant delay (up to tens of seconds) before
      satisfying a query's request for more than one worker process, or when
      multiple queries requested workers simultaneously.  On most platforms
      this required unlucky timing, but on some it was the typical case.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4fe04244b] 2017-04-24 12:16:58 -0400
Branch: REL9_6_STABLE [63f64d282] 2017-04-24 12:16:58 -0400
Branch: REL9_5_STABLE [dba1f310a] 2017-04-24 12:16:58 -0400
Branch: REL9_4_STABLE [436b560b8] 2017-04-24 12:16:58 -0400
-->
     <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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [89deca582] 2017-04-07 12:18:38 -0400
Branch: REL9_6_STABLE [c0a493e17] 2017-04-07 12:18:38 -0400
-->
     <para>
      Fix possible <quote>no relation entry for relid 0</> error when
      planning nested set operations (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [1ea60ad60] 2017-03-15 12:28:54 -0400
Branch: REL9_6_STABLE [5feb78ae8] 2017-03-15 12:41:00 -0400
Branch: master [f120b614e] 2017-03-24 12:30:39 -0400
Branch: REL9_6_STABLE [5674a258f] 2017-03-24 12:39:07 -0400
Branch: master [7d8f6986b] 2017-03-31 21:01:20 -0400
Branch: REL9_6_STABLE [fb1879c37] 2017-03-31 21:10:30 -0400
-->
     <para>
      Fix assorted minor issues in planning of parallel queries (Robert Haas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [76799fc89] 2017-04-17 15:29:15 -0400
Branch: REL9_6_STABLE [6c73b390b] 2017-04-17 15:29:00 -0400
Branch: REL9_5_STABLE [6f0f98bb0] 2017-04-17 15:29:00 -0400
-->
     <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>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [aa5d3c0b3] 2017-05-06 21:46:35 -0400
Branch: REL9_6_STABLE [92b15224b] 2017-05-06 21:46:41 -0400
Branch: REL9_5_STABLE [d617c7629] 2017-05-06 21:46:56 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9209e0760] 2017-05-02 18:06:09 -0400
Branch: REL9_6_STABLE [d56b8b41b] 2017-05-02 18:05:54 -0400
Branch: REL9_5_STABLE [d0d3a57bf] 2017-05-02 18:05:54 -0400
Branch: REL9_4_STABLE [c6b3d0706] 2017-05-02 18:05:54 -0400
Branch: REL9_3_STABLE [062824edd] 2017-05-02 18:05:54 -0400
Branch: REL9_2_STABLE [c9d6c564f] 2017-05-02 18:05:54 -0400
-->
     <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>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [f30f34e58] 2017-02-12 16:03:41 -0500
Branch: REL9_6_STABLE [4d43d5d35] 2017-02-12 16:03:46 -0500
Branch: REL9_5_STABLE [660e457f5] 2017-02-12 16:03:54 -0500
Branch: REL9_4_STABLE [804aad8ff] 2017-02-12 16:04:09 -0500
Branch: REL9_3_STABLE [b167d57d5] 2017-02-12 16:05:12 -0500
Branch: REL9_2_STABLE [27a8c8033] 2017-02-12 16:05:23 -0500
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [6a4dda44e] 2017-04-28 14:48:38 -0400
Branch: REL9_6_STABLE [8a9c83bfa] 2017-04-28 14:48:44 -0400
Branch: REL9_5_STABLE [a0291c330] 2017-04-28 14:50:36 -0400
Branch: REL9_4_STABLE [93a07a68e] 2017-04-28 14:52:20 -0400
Branch: REL9_3_STABLE [954744f7a] 2017-04-28 14:53:56 -0400
Branch: REL9_2_STABLE [f60f0c8fe] 2017-04-28 14:55:42 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a8df75b0a] 2017-03-06 16:50:47 -0500
Branch: REL9_6_STABLE [943140d57] 2017-03-06 16:50:47 -0500
Branch: REL9_5_STABLE [420d9ec0a] 2017-03-06 16:50:47 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [dbca84f04] 2017-03-04 16:09:33 -0500
Branch: REL9_6_STABLE [68f7b91e5] 2017-03-04 16:09:33 -0500
Branch: REL9_5_STABLE [807df31d1] 2017-03-04 16:09:33 -0500
-->
     <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>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [1914c5ea7] 2017-03-16 22:28:03 +0000
Branch: REL9_6_STABLE [9b626f6c3] 2017-03-16 22:31:49 +0000
Branch: REL9_5_STABLE [ee78ad5bc] 2017-03-16 22:33:59 +0000
Branch: REL9_4_STABLE [269efd052] 2017-03-16 22:32:56 +0000
Branch: REL9_3_STABLE [8f8a5aefc] 2017-03-16 22:33:18 +0000
Branch: REL9_2_STABLE [a494ff4b0] 2017-03-16 22:33:38 +0000
Branch: master [64ae420b2] 2017-03-17 14:35:54 +0000
Branch: REL9_6_STABLE [733488dc6] 2017-03-17 14:46:15 +0000
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f2ec57dee] 2017-02-15 16:40:05 -0500
Branch: REL9_6_STABLE [354dfa235] 2017-02-15 16:40:05 -0500
Branch: REL9_5_STABLE [96ba17640] 2017-02-15 16:40:06 -0500
Branch: REL9_4_STABLE [d0e9c0e31] 2017-02-15 16:40:06 -0500
Branch: REL9_3_STABLE [6a4941f8c] 2017-02-15 16:40:06 -0500
Branch: REL9_2_STABLE [030705e4f] 2017-02-15 16:40:06 -0500
-->
     <para>
      Ensure that bulk-tuple-transfer loops within a hash join are
      interruptible by query cancel requests (Tom Lane, Thomas Munro)
     </para>
    </listitem>

    <listitem>
<!--
Author: Teodor Sigaev <teodor@sigaev.ru>
Branch: master [d5286aa90] 2017-03-21 16:23:10 +0300
Branch: REL9_6_STABLE [a4d07d2e9] 2017-03-21 16:24:10 +0300
-->
     <para>
      Fix incorrect support for certain <type>box</> operators in SP-GiST
      (Nikita Glukhov)
     </para>

     <para>
      SP-GiST index scans using the operators <literal>&amp;&lt;</>
      <literal>&amp;&gt;</> <literal>&amp;&lt;|</> and <literal>|&amp;&gt;</>
      would yield incorrect answers.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [df1a699e5] 2017-04-05 23:51:27 -0400
Branch: REL9_6_STABLE [fd52b8834] 2017-04-05 23:51:28 -0400
Branch: REL9_5_STABLE [d68a2b20a] 2017-04-05 23:51:28 -0400
Branch: REL9_4_STABLE [8851bcf88] 2017-04-05 23:51:28 -0400
-->
     <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>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [0de791ed7] 2017-05-03 21:41:10 -0400
Branch: REL9_6_STABLE [071d13395] 2017-05-04 21:17:46 -0400
Branch: REL9_5_STABLE [9750a9583] 2017-05-04 21:20:26 -0400
Branch: REL9_4_STABLE [12dd58d64] 2017-05-04 21:22:48 -0400
Branch: REL9_3_STABLE [6e86b448f] 2017-05-04 21:31:12 -0400
Branch: REL9_2_STABLE [a48d47908] 2017-05-04 22:39:23 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8f93bd851] 2017-02-08 18:04:59 -0500
Branch: REL9_6_STABLE [404756fe8] 2017-02-08 18:04:59 -0500
Branch: REL9_5_STABLE [7786b9848] 2017-02-08 18:04:59 -0500
Branch: REL9_4_STABLE [1888fad44] 2017-02-08 18:04:59 -0500
Branch: master [5d2adf0f8] 2017-02-09 15:50:16 -0500
Branch: REL9_6_STABLE [fc96a5fbc] 2017-02-09 15:49:57 -0500
Branch: REL9_5_STABLE [cf73c6bfc] 2017-02-09 15:49:57 -0500
Branch: REL9_4_STABLE [86ef376bb] 2017-02-09 15:49:58 -0500
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [a3eac988c] 2017-03-16 12:51:08 -0300
Branch: REL9_6_STABLE [41306a511] 2017-03-16 12:51:08 -0300
Branch: REL9_5_STABLE [087e696f0] 2017-03-16 12:51:08 -0300
Branch: REL9_6_STABLE [1ec36a9eb] 2017-04-16 20:49:40 -0400
Branch: REL9_5_STABLE [b6e6ae1dc] 2017-04-16 20:50:31 -0400
-->
     <para>
      Fix <function>pg_get_object_address()</> to handle members of operator
      families correctly (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Teodor Sigaev <teodor@sigaev.ru>
Branch: master [78874531b] 2017-03-24 13:53:40 +0300
Branch: REL9_6_STABLE [8de6278d3] 2017-03-24 13:55:02 +0300
-->
     <para>
      Fix cancelling of <function>pg_stop_backup()</> when attempting to stop
      a non-exclusive backup (Michael Paquier, David Steele)
     </para>

     <para>
      If <function>pg_stop_backup()</> was cancelled while waiting for a
      non-exclusive backup to end, related state was left inconsistent;
      a new exclusive backup could not be started, and there were other minor
      problems.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [af2c5aa88] 2017-05-02 21:50:35 -0400
Branch: REL9_6_STABLE [c521d5a8d] 2017-05-02 21:50:42 -0400
Branch: REL9_5_STABLE [724cd4f06] 2017-05-02 21:50:47 -0400
Branch: REL9_4_STABLE [5557b6af5] 2017-05-02 21:50:52 -0400
Branch: REL9_3_STABLE [35ac926bf] 2017-05-02 21:50:56 -0400
Branch: REL9_2_STABLE [1b6db75ef] 2017-05-02 21:51:01 -0400
Branch: master [5788a5670] 2017-05-07 11:34:31 -0400
Branch: REL9_6_STABLE [5042e9492] 2017-05-07 11:34:41 -0400
Branch: REL9_5_STABLE [38ed45c91] 2017-05-07 11:34:48 -0400
Branch: REL9_4_STABLE [6eedc6c18] 2017-05-07 11:34:58 -0400
Branch: REL9_3_STABLE [07987304d] 2017-05-07 11:35:05 -0400
Branch: REL9_2_STABLE [9061680f0] 2017-05-07 11:35:11 -0400
-->
     <para>
      Improve performance of <structname>pg_timezone_names</> view
      (Tom Lane, David Rowley)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ff97741bc] 2017-03-08 12:21:23 -0500
Branch: REL9_6_STABLE [e0a6ed8a2] 2017-03-08 12:21:12 -0500
Branch: REL9_5_STABLE [50a9d714a] 2017-03-08 12:21:12 -0500
Branch: REL9_4_STABLE [8dd5c4171] 2017-03-08 12:21:12 -0500
-->
     <para>
      Reduce memory management overhead for contexts containing many large
      blocks (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f97de05a1] 2017-02-21 17:51:37 -0500
Branch: REL9_6_STABLE [62ed08422] 2017-02-21 17:51:27 -0500
Branch: REL9_5_STABLE [ff1b032a9] 2017-02-21 17:51:28 -0500
Branch: REL9_4_STABLE [d9959e6eb] 2017-02-21 17:51:28 -0500
Branch: REL9_3_STABLE [3f613c6a4] 2017-02-21 17:51:28 -0500
Branch: REL9_2_STABLE [775227590] 2017-02-21 17:51:28 -0500
-->
     <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>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [ff30aec75] 2017-03-17 11:14:01 +0200
Branch: REL9_6_STABLE [38bdba54a] 2017-03-17 11:14:36 +0200
Branch: REL9_5_STABLE [96fd76dd2] 2017-03-17 11:14:45 +0200
Branch: REL9_4_STABLE [6b584c36a] 2017-03-17 11:14:49 +0200
Branch: REL9_3_STABLE [3ebcc2498] 2017-03-17 11:14:53 +0200
Branch: REL9_2_STABLE [9c52ddfce] 2017-03-17 11:14:58 +0200
Branch: REL9_6_STABLE [4ae0805bb] 2017-03-24 12:39:23 +0200
Branch: REL9_5_STABLE [42a60aa7f] 2017-03-24 12:39:20 +0200
Branch: REL9_4_STABLE [6423ed7d4] 2017-03-24 12:39:17 +0200
Branch: REL9_3_STABLE [e0e1ef46d] 2017-03-24 12:39:14 +0200
Branch: REL9_2_STABLE [8ae3ff64b] 2017-03-24 12:39:01 +0200
-->
     <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>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [43c79c7d6] 2017-03-13 21:03:55 +0100
Branch: REL9_6_STABLE [f08a90ecd] 2017-03-13 20:50:48 +0100
Branch: REL9_5_STABLE [a8b3262ab] 2017-03-13 20:51:46 +0100
Branch: REL9_4_STABLE [e060baaad] 2017-03-13 20:51:56 +0100
Branch: REL9_3_STABLE [04207ef76] 2017-03-13 20:52:05 +0100
Branch: REL9_2_STABLE [d8c207437] 2017-03-13 20:52:16 +0100
-->
     <para>
      Fix <application>ecpg</> to support <command>COMMIT PREPARED</>
      and <command>ROLLBACK PREPARED</> (Masahiko Sawada)
     </para>
    </listitem>

    <listitem>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [d1ca82d0a] 2017-03-10 10:32:41 +0100
Branch: REL9_6_STABLE [d0fef0654] 2017-03-10 10:50:46 +0100
Branch: REL9_5_STABLE [466ee7a53] 2017-03-10 10:51:24 +0100
Branch: REL9_4_STABLE [f6b906599] 2017-03-10 10:51:40 +0100
Branch: REL9_3_STABLE [af471919b] 2017-03-10 10:51:51 +0100
Branch: REL9_2_STABLE [731afc91f] 2017-03-10 10:52:01 +0100
-->
     <para>
      Fix a double-free error when processing dollar-quoted string literals
      in <application>ecpg</> (Michael Meskes)
     </para>
    </listitem>

    <listitem>
<!--
Author: Teodor Sigaev <teodor@sigaev.ru>
Branch: REL9_6_STABLE [2ed391f95] 2017-03-24 19:23:13 +0300
-->
     <para>
      Fix <application>pgbench</> to handle the combination
      of <option>--connect</> and <option>--rate</> options correctly
      (Fabien Coelho)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ef2662394] 2017-03-07 11:36:42 -0500
Branch: REL9_6_STABLE [0e2c85d13] 2017-03-07 11:36:35 -0500
-->
     <para>
      Fix <application>pgbench</> to honor the long-form option
      spelling <option>--builtin</>, as per its documentation (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [330b84d8c] 2017-03-06 23:29:02 -0500
Branch: REL9_6_STABLE [e961341cc] 2017-03-06 23:29:08 -0500
-->
     <para>
      Fix <application>pg_dump</>/<application>pg_restore</> to correctly
      handle privileges for the <literal>public</> schema when
      using <option>--clean</> option (Stephen Frost)
     </para>

     <para>
      Other schemas start out with no privileges granted,
      but <literal>public</> does not; this requires special-case treatment
      when it is dropped and restored due to the <option>--clean</> option.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [299990ba1] 2017-03-06 19:33:59 -0500
Branch: REL9_6_STABLE [8ea8178cd] 2017-03-06 19:33:59 -0500
Branch: REL9_5_STABLE [b6882e9ec] 2017-03-06 19:33:59 -0500
Branch: REL9_4_STABLE [db9b4b716] 2017-03-06 19:33:59 -0500
Branch: REL9_3_STABLE [783acfd4d] 2017-03-06 19:33:59 -0500
Branch: REL9_2_STABLE [0ab75448e] 2017-03-06 19:33:59 -0500
-->
     <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>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
Branch: master [39370e6a0] 2017-02-17 15:06:28 -0500
Branch: REL9_6_STABLE [4e8b2fd33] 2017-02-17 15:06:34 -0500
-->
     <para>
      Fix typo in <application>pg_dump</>'s query for initial privileges
      of a procedural language (Peter Eisentraut)
     </para>

     <para>
      This resulted in <application>pg_dump</> always believing that the
      language had no initial privileges.  Since that's true for most
      procedural languages, ill effects from this bug are probably rare.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f39ddd843] 2017-03-10 14:15:09 -0500
Branch: REL9_6_STABLE [4cdd81d90] 2017-03-10 14:15:09 -0500
Branch: REL9_5_STABLE [88f3743cb] 2017-03-10 14:15:09 -0500
Branch: REL9_4_STABLE [64d132c29] 2017-03-10 14:15:09 -0500
Branch: REL9_3_STABLE [0c0a95c2f] 2017-03-10 14:15:09 -0500
Branch: REL9_2_STABLE [e6d2ba419] 2017-03-10 14:15:09 -0500
-->
     <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>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [ff992c074] 2017-03-06 17:03:57 -0500
Branch: REL9_6_STABLE [65a3f233b] 2017-03-06 17:04:06 -0500
Branch: REL9_5_STABLE [6be8647f7] 2017-03-06 17:04:13 -0500
Branch: REL9_4_STABLE [93598898c] 2017-03-06 17:04:22 -0500
Branch: REL9_3_STABLE [7f831f09b] 2017-03-06 17:04:29 -0500
Branch: REL9_2_STABLE [e864cd25b] 2017-03-06 17:04:55 -0500
-->
     <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>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [944a026b4] 2017-03-12 19:35:31 -0400
Branch: REL9_6_STABLE [08c6d42c8] 2017-03-12 19:35:49 -0400
Branch: REL9_5_STABLE [d0e5ac736] 2017-03-12 19:35:57 -0400
Branch: REL9_4_STABLE [4b2669ada] 2017-03-12 19:36:06 -0400
Branch: REL9_3_STABLE [e03c6d93b] 2017-03-12 19:36:15 -0400
Branch: REL9_2_STABLE [0276da5eb] 2017-03-12 19:36:28 -0400
-->
     <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>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master [cd1e23e93] 2017-03-11 13:32:18 -0800
Branch: REL9_6_STABLE [8469923f3] 2017-03-11 13:32:26 -0800
Branch: REL9_5_STABLE [82f3792a4] 2017-03-11 13:32:40 -0800
Branch: REL9_4_STABLE [166dfb3a9] 2017-03-11 13:33:14 -0800
Branch: REL9_3_STABLE [f6cfc14e5] 2017-03-11 13:33:22 -0800
Branch: REL9_2_STABLE [c4613c3f4] 2017-03-11 13:33:30 -0800
-->
     <para>
      In <filename>contrib/dblink</>, avoid leaking the previous unnamed
      connection when establishing a new unnamed connection (Joe Conway)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9e43e8714] 2017-02-22 15:04:26 -0500
Branch: REL9_6_STABLE [16500d227] 2017-02-22 15:04:07 -0500
Branch: REL9_5_STABLE [513c9f9de] 2017-02-22 15:04:07 -0500
Branch: REL9_4_STABLE [98755681a] 2017-02-22 15:04:07 -0500
Branch: REL9_3_STABLE [53b5a8c13] 2017-02-22 15:04:07 -0500
Branch: master [1dffabed4] 2017-04-14 14:52:21 -0400
Branch: REL9_6_STABLE [d51279433] 2017-04-14 14:52:03 -0400
Branch: REL9_5_STABLE [9b48ce377] 2017-04-14 14:52:03 -0400
Branch: REL9_4_STABLE [e0eda580d] 2017-04-14 14:52:03 -0400
Branch: REL9_3_STABLE [fad06b287] 2017-04-14 14:52:03 -0400
Branch: master [6cfaffc0d] 2017-04-13 17:18:35 -0400
Branch: REL9_6_STABLE [a70b18b89] 2017-04-13 17:18:35 -0400
Branch: REL9_5_STABLE [67665a71c] 2017-04-13 17:18:35 -0400
Branch: REL9_4_STABLE [b179684c7] 2017-04-13 17:18:35 -0400
Branch: REL9_3_STABLE [5be58cc89] 2017-04-13 17:18:35 -0400
-->
     <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: Peter Eisentraut <peter_e@gmx.net>
Branch: master [332bec1e6] 2017-04-24 22:50:07 -0400
Branch: REL9_6_STABLE [86e640a69] 2017-04-26 09:14:21 -0400
-->
     <para>
      In <filename>contrib/postgres_fdw</>, allow join conditions that
      contain shippable extension-provided functions to be pushed to the
      remote server (David Rowley, Ashutosh Bapat)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [14722c69f] 2017-05-05 12:38:29 -0300
Branch: REL9_6_STABLE [19a403378] 2017-05-05 12:05:34 -0300
Branch: REL9_5_STABLE [adfad4222] 2017-05-05 12:05:34 -0300
Branch: REL9_4_STABLE [41ba2ca08] 2017-05-05 12:05:34 -0300
Branch: REL9_3_STABLE [f692583dd] 2017-05-05 12:05:34 -0300
Branch: REL9_2_STABLE [992e581bf] 2017-05-05 12:05:34 -0300
-->
     <para>
      Support Tcl 8.6 in MSVC builds (&Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e18b2c480] 2017-04-30 15:13:51 -0400
Branch: REL9_6_STABLE [6872d96a3] 2017-04-30 15:14:06 -0400
Branch: REL9_5_STABLE [4d4d8fa77] 2017-04-30 15:14:11 -0400
Branch: REL9_4_STABLE [96cad6f24] 2017-04-30 15:14:15 -0400
Branch: REL9_3_STABLE [f8cf9719d] 2017-04-30 15:14:20 -0400
Branch: REL9_2_STABLE [54aeb8d3e] 2017-04-30 15:14:24 -0400
Branch: master [a54d5875f] 2017-05-07 12:33:12 -0400
Branch: REL9_6_STABLE [fab2d0d7f] 2017-05-07 12:33:18 -0400
Branch: REL9_5_STABLE [74e747fbd] 2017-05-07 12:33:22 -0400
Branch: REL9_4_STABLE [e829385f5] 2017-05-07 12:33:27 -0400
Branch: REL9_3_STABLE [9e5f3d013] 2017-05-07 12:33:31 -0400
Branch: REL9_2_STABLE [da55df018] 2017-05-07 12:33:35 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [74a20d0ab] 2017-05-01 11:53:11 -0400
Branch: REL9_6_STABLE [1fdc3f6e8] 2017-05-01 11:53:42 -0400
Branch: REL9_5_STABLE [9a8cc157c] 2017-05-01 11:53:49 -0400
Branch: REL9_4_STABLE [1c8862346] 2017-05-01 11:53:56 -0400
Branch: REL9_3_STABLE [dc93cafca] 2017-05-01 11:54:02 -0400
Branch: REL9_2_STABLE [c96ccc40e] 2017-05-01 11:54:08 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d4e59c552] 2017-05-07 11:57:41 -0400
Branch: REL9_6_STABLE [f75472817] 2017-05-07 11:57:41 -0400
Branch: REL9_5_STABLE [2f66002df] 2017-05-07 11:57:41 -0400
Branch: REL9_4_STABLE [62a288312] 2017-05-07 11:57:41 -0400
Branch: REL9_3_STABLE [5971accd8] 2017-05-07 11:57:41 -0400
Branch: REL9_2_STABLE [82e7d3dfd] 2017-05-07 11:57:41 -0400
-->
     <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-6-2">
  <title>Release 9.6.2</title>

  <formalpara>
  <title>Release date:</title>
  <para>2017-02-09</para>
  </formalpara>

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

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

   <para>
    A dump/restore is not required for those running 9.6.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.6.1,
    see <xref linkend="release-9-6-1">.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2aaec6546] 2017-02-06 13:20:19 -0500
Branch: REL9_6_STABLE [7fcddbdd0] 2017-02-06 13:20:20 -0500
Branch: REL9_5_STABLE [e935696f4] 2017-02-06 13:20:21 -0500
Branch: REL9_4_STABLE [5879958e1] 2017-02-06 13:20:23 -0500
Branch: REL9_3_STABLE [32c893c8d] 2017-02-06 13:20:24 -0500
Branch: REL9_2_STABLE [bcd7b47c2] 2017-02-06 13:20:25 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ffaa44cb5] 2016-11-15 15:55:35 -0500
Branch: REL9_6_STABLE [8aa3e4751] 2016-11-15 15:55:35 -0500
Branch: REL9_5_STABLE [0bc3ed98c] 2016-11-15 15:55:35 -0500
Branch: REL9_4_STABLE [3e844a34b] 2016-11-15 15:55:36 -0500
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [7403561c0] 2017-01-09 18:19:29 -0300
Branch: REL9_6_STABLE [4482c6a23] 2017-01-09 18:19:29 -0300
Branch: REL9_5_STABLE [ed8e8b814] 2017-01-09 18:19:29 -0300
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [fa0f466d5] 2016-12-08 14:12:08 -0500
Branch: REL9_6_STABLE [1ed3c6ff9] 2016-12-08 14:13:55 -0500
Branch: REL9_5_STABLE [141ad6896] 2016-12-08 14:14:12 -0500
Branch: REL9_4_STABLE [68e56eef6] 2016-12-08 14:14:27 -0500
Branch: REL9_3_STABLE [8e403f215] 2016-12-08 14:16:47 -0500
Branch: REL9_2_STABLE [a00ac6299] 2016-12-08 14:19:25 -0500
-->
     <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: Robert Haas <rhaas@postgresql.org>
Branch: master [4f714b2fd] 2016-10-27 14:27:40 -0400
Branch: REL9_6_STABLE [4a43a6244] 2016-10-27 14:54:35 -0400
Branch: REL9_5_STABLE [0cbd199fd] 2016-10-27 14:54:39 -0400
Branch: REL9_4_STABLE [4a8cfbdcb] 2016-10-27 14:56:37 -0400
Branch: REL9_3_STABLE [e927f55ff] 2016-10-27 14:56:42 -0400
Branch: REL9_2_STABLE [2be2838a7] 2016-10-27 14:56:53 -0400
-->
     <para>
      If the stats collector dies during hot standby, restart it (Takayuki
      Tsunakawa)
     </para>
    </listitem>

    <listitem>
<!--
Author: Simon Riggs <simon@2ndQuadrant.com>
Branch: master [ec4b97501] 2017-01-26 18:14:02 +0000
Branch: REL9_6_STABLE [95d1b4145] 2017-01-26 20:06:44 +0000
Branch: REL9_5_STABLE [99289e506] 2017-01-26 20:09:18 +0000
Branch: REL9_4_STABLE [800d89a98] 2017-01-26 20:10:19 +0000
Branch: REL9_3_STABLE [048d44175] 2017-01-26 20:15:23 +0000
-->
     <para>
      Ensure that hot standby feedback works correctly when it's enabled at
      standby server start (Ants Aasma, Craig Ringer)
     </para>
    </listitem>

    <listitem>
<!--
Author: Simon Riggs <simon@2ndQuadrant.com>
Branch: master [e8ee3d6b8] 2017-01-26 18:59:58 +0000
Branch: REL9_6_STABLE [40b7800da] 2017-01-27 12:13:20 +0000
Branch: REL9_5_STABLE [ace2cd80a] 2017-01-27 12:15:02 +0000
Branch: REL9_4_STABLE [357e06128] 2017-01-27 12:16:18 +0000
Branch: REL9_3_STABLE [332068a21] 2017-01-27 12:18:07 +0000
Branch: REL9_2_STABLE [15c54e836] 2017-01-27 12:19:50 +0000
-->
     <para>
      Check for interrupts while hot standby is waiting for a conflicting
      query (Simon Riggs)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [c6a389792] 2017-01-20 15:55:45 -0500
Branch: REL9_6_STABLE [746ba76f1] 2017-01-20 16:11:45 -0500
Branch: REL9_5_STABLE [aeaaf62aa] 2017-01-20 16:14:11 -0500
Branch: REL9_4_STABLE [806f9b3d7] 2017-01-20 16:16:46 -0500
Branch: REL9_3_STABLE [5c5788e90] 2017-01-20 16:18:55 -0500
Branch: REL9_2_STABLE [5dff230eb] 2017-01-20 16:26:39 -0500
-->
     <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>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [93eb619cd] 2016-12-17 02:22:15 +0900
Branch: REL9_6_STABLE [6c75fb6b3] 2016-12-17 02:25:47 +0900
-->
     <para>
      Disallow setting the <replaceable>num_sync</> field to zero in
      <xref linkend="guc-synchronous-standby-names"> (Fujii Masao)
     </para>

     <para>
      The correct way to disable synchronous standby is to set the whole
      value to an empty string.
     </para>
    </listitem>

    <listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [f1169ab50] 2017-02-01 18:02:43 -0500
Branch: REL9_6_STABLE [13752743b] 2017-02-01 17:59:53 -0500
-->
     <para>
      Don't count background worker processes against a user's connection
      limit (David Rowley)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [182db0704] 2016-11-26 13:31:35 -0500
Branch: REL9_6_STABLE [0cc8453ac] 2016-11-26 13:31:35 -0500
Branch: REL9_5_STABLE [576bd360b] 2016-11-26 13:31:35 -0500
Branch: REL9_4_STABLE [313786a74] 2016-11-26 13:31:35 -0500
Branch: REL9_3_STABLE [2cbb62db1] 2016-11-26 13:31:35 -0500
Branch: REL9_2_STABLE [a982b02a4] 2016-11-26 13:31:35 -0500
-->
     <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>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [e54f75722] 2017-01-29 23:05:07 -0500
Branch: REL9_6_STABLE [20064c0ec] 2017-01-29 23:05:09 -0500
-->
     <para>
      Fix tracking of initial privileges for extension member objects so
      that it works correctly with <command>ALTER EXTENSION ... ADD/DROP</>
      (Stephen Frost)
     </para>

     <para>
      An object's current privileges at the time it is added to the
      extension will now be considered its default privileges; only
      later changes in its privileges will be dumped by
      subsequent <application>pg_dump</> runs.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bd673e8e8] 2016-11-23 13:45:55 -0500
Branch: REL9_6_STABLE [4a5e1d370] 2016-11-23 13:45:56 -0500
Branch: REL9_5_STABLE [e0375d77b] 2016-11-23 13:45:56 -0500
Branch: REL9_4_STABLE [15f3e0cb1] 2016-11-23 13:45:56 -0500
Branch: REL9_3_STABLE [8f67a6c22] 2016-11-23 13:45:56 -0500
Branch: REL9_2_STABLE [05975ab0a] 2016-11-23 13:45:56 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a522fc3d8] 2016-10-26 17:05:06 -0400
Branch: REL9_6_STABLE [445035a6e] 2016-10-26 17:05:06 -0400
Branch: REL9_5_STABLE [b53c841e5] 2016-10-26 17:05:06 -0400
Branch: REL9_4_STABLE [3a9a8c408] 2016-10-26 17:05:06 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4e026b32d] 2016-11-25 13:44:47 -0500
Branch: REL9_6_STABLE [bf5fe7bfa] 2016-11-25 13:44:47 -0500
Branch: REL9_5_STABLE [6cbe84c82] 2016-11-25 13:44:48 -0500
Branch: REL9_4_STABLE [f7166ce24] 2016-11-25 13:44:48 -0500
Branch: REL9_3_STABLE [05bef7b08] 2016-11-25 13:44:48 -0500
Branch: REL9_2_STABLE [6a363a4c2] 2016-11-25 13:44:48 -0500
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [3957b58b8] 2017-01-09 19:26:58 -0300
Branch: REL9_6_STABLE [4e563a1f6] 2017-01-09 19:26:58 -0300
Branch: REL9_5_STABLE [4d4ab6ccd] 2017-01-09 19:26:58 -0300
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d86f40009] 2017-01-04 18:00:11 -0500
Branch: REL9_6_STABLE [f64554b99] 2017-01-04 18:00:11 -0500
Branch: REL9_5_STABLE [50c8196f9] 2017-01-04 18:00:11 -0500
Branch: REL9_4_STABLE [696d40d30] 2017-01-04 18:00:11 -0500
Branch: REL9_3_STABLE [5f89a9885] 2017-01-04 18:00:12 -0500
Branch: REL9_2_STABLE [6c4cf2be8] 2017-01-04 18:00:12 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1ead0208b] 2016-12-22 16:23:38 -0500
Branch: REL9_6_STABLE [68330c8b4] 2016-12-22 16:23:34 -0500
-->
     <para>
      Ensure that <command>CREATE TABLE ... LIKE ... WITH OIDS</> creates
      a table with OIDs, whether or not the <literal>LIKE</>-referenced
      table(s) have OIDs (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Branch: master [58b136264] 2016-12-21 16:58:18 +0000
Branch: REL9_6_STABLE [a46ee6b30] 2016-12-21 17:01:52 +0000
Branch: REL9_5_STABLE [78a98b767] 2016-12-21 17:02:47 +0000
Branch: REL9_4_STABLE [cad24980e] 2016-12-21 17:03:54 +0000
-->
     <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>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [12bd7dd31] 2016-12-22 17:08:43 -0500
Branch: REL9_6_STABLE [f0f2e56ac] 2016-12-22 17:08:47 -0500
Branch: REL9_5_STABLE [e82369217] 2016-12-22 17:08:49 -0500
Branch: REL9_4_STABLE [ac1ec9c1f] 2016-12-22 17:08:58 -0500
Branch: REL9_3_STABLE [0e3aadb68] 2016-12-22 17:09:00 -0500
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [4aaddf2f0] 2016-11-24 15:39:55 -0300
Branch: REL9_6_STABLE [9b6634290] 2016-11-24 15:39:55 -0300
Branch: REL9_5_STABLE [7816d1356] 2016-11-24 15:39:55 -0300
-->
     <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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e3e66d8a9] 2016-11-07 12:08:18 -0500
Branch: REL9_6_STABLE [5ee3a7453] 2016-11-07 12:08:19 -0500
Branch: REL9_5_STABLE [e2f5cd9cf] 2016-11-07 12:08:19 -0500
Branch: master [530f80652] 2016-11-10 15:00:58 -0500
Branch: REL9_6_STABLE [05a6e8728] 2016-11-10 15:00:58 -0500
Branch: REL9_5_STABLE [6e00ba1e1] 2016-11-10 15:00:58 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [385072320] 2016-12-04 15:02:45 -0500
Branch: REL9_6_STABLE [da05d0ebc] 2016-12-04 15:02:46 -0500
Branch: REL9_5_STABLE [25c06a1ed] 2016-12-04 15:02:48 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [da8f3ebf3] 2016-11-02 14:32:13 -0400
Branch: REL9_6_STABLE [f4d865f22] 2016-11-02 14:32:13 -0400
-->
     <para>
      Fix spurious <quote>query provides a value for a dropped column</>
      errors during <command>INSERT</> or <command>UPDATE</> on a table
      with a dropped column (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c5f365f3a] 2016-11-20 14:26:19 -0500
Branch: REL9_6_STABLE [90f8b4be5] 2016-11-20 14:26:19 -0500
Branch: REL9_5_STABLE [aeb5e8242] 2016-11-20 14:26:19 -0500
Branch: REL9_4_STABLE [44c8b4fcd] 2016-11-20 14:26:19 -0500
Branch: REL9_3_STABLE [71db302ec] 2016-11-20 14:26:19 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0b78106cd] 2016-12-08 11:40:02 -0500
Branch: REL9_6_STABLE [cf22c8cb8] 2016-12-09 12:01:14 -0500
Branch: REL9_5_STABLE [6a493adda] 2016-12-09 12:01:14 -0500
Branch: REL9_4_STABLE [c7a62135a] 2016-12-09 12:01:14 -0500
Branch: REL9_3_STABLE [2afe282a3] 2016-12-09 12:01:14 -0500
Branch: REL9_2_STABLE [082d1fb9e] 2016-12-09 12:01:14 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a8ae12322] 2016-12-21 17:39:32 -0500
Branch: REL9_6_STABLE [88e1e91da] 2016-12-21 17:39:32 -0500
Branch: REL9_5_STABLE [d5633af7b] 2016-12-21 17:39:32 -0500
Branch: REL9_4_STABLE [d0f60e4cc] 2016-12-21 17:39:32 -0500
Branch: REL9_3_STABLE [a57695d9a] 2016-12-21 17:39:33 -0500
Branch: REL9_2_STABLE [6e2c21ec5] 2016-12-21 17:39:33 -0500
-->
     <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>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [db80acfc9] 2016-12-20 09:20:17 +0200
Branch: REL9_6_STABLE [ce92fc4e2] 2016-12-20 09:20:30 +0200
-->
     <para>
      Fix execution of <literal>DISTINCT</> and ordered aggregates when
      multiple such aggregates are able to share the same transition state
      (Heikki Linnakangas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [89fcea1ac] 2016-12-21 15:18:39 -0500
Branch: REL9_6_STABLE [4e2477b7b] 2016-12-21 15:18:40 -0500
Branch: master [260443847] 2016-12-19 13:49:50 -0500
Branch: REL9_6_STABLE [3f07eff10] 2016-12-19 13:49:45 -0500
-->
     <para>
      Fix implementation of phrase search operators in <type>tsquery</>
      (Tom Lane)
     </para>

     <para>
      Remove incorrect, and inconsistently-applied, rewrite rules that
      tried to transform away AND/OR/NOT operators appearing below a PHRASE
      operator; instead upgrade the execution engine to handle such cases
      correctly.  This fixes assorted strange behavior and possible crashes
      for text search queries containing such combinations.  Also fix
      nested PHRASE operators to work sanely in combinations other than
      simple left-deep trees, correct the behavior when removing stopwords
      from a phrase search clause, and make sure that index searches behave
      consistently with simple sequential-scan application of such queries.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9d4ca0131] 2017-01-26 12:18:07 -0500
Branch: REL9_6_STABLE [2dfc12647] 2017-01-26 12:17:47 -0500
Branch: REL9_5_STABLE [423ad86f4] 2017-01-26 12:17:47 -0500
Branch: REL9_4_STABLE [2c1976a6c] 2017-01-26 12:17:47 -0500
Branch: REL9_3_STABLE [2e024f83b] 2017-01-26 12:17:47 -0500
Branch: REL9_2_STABLE [fe6120f9b] 2017-01-26 12:17:47 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0eaaaf00e] 2016-12-11 13:09:57 -0500
Branch: REL9_6_STABLE [c8bfe055b] 2016-12-11 13:09:57 -0500
Branch: REL9_5_STABLE [c6caa5200] 2016-12-11 13:09:57 -0500
Branch: REL9_4_STABLE [6f5cb982e] 2016-12-11 13:09:57 -0500
Branch: REL9_3_STABLE [79e1a9efa] 2016-12-11 13:09:57 -0500
Branch: REL9_2_STABLE [f4ccee408] 2016-12-11 13:09:57 -0500
-->
     <para>
      Prevent crash when <function>ts_rewrite()</> replaces a non-top-level
      subtree with an empty query (Artur Zakirov)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5ec81acee] 2016-10-30 17:35:42 -0400
Branch: REL9_6_STABLE [464326e83] 2016-10-30 17:35:42 -0400
Branch: REL9_5_STABLE [e0491c19d] 2016-10-30 17:35:42 -0400
Branch: REL9_4_STABLE [514797a52] 2016-10-30 17:35:43 -0400
Branch: REL9_3_STABLE [407d513df] 2016-10-30 17:35:43 -0400
Branch: REL9_2_STABLE [606e16a7f] 2016-10-30 17:35:43 -0400
-->
     <para>
      Fix performance problems in <function>ts_rewrite()</> (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [24ebc444c] 2016-10-30 15:24:40 -0400
Branch: REL9_6_STABLE [2a2b439cc] 2016-10-30 15:24:40 -0400
Branch: REL9_5_STABLE [de7387604] 2016-10-30 15:24:40 -0400
Branch: REL9_4_STABLE [f0c2ce45e] 2016-10-30 15:24:40 -0400
Branch: REL9_3_STABLE [77a22f898] 2016-10-30 15:24:40 -0400
Branch: REL9_2_STABLE [b0f8a273e] 2016-10-30 15:24:40 -0400
-->
     <para>
      Fix <function>ts_rewrite()</>'s handling of nested NOT operators
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9a00f03e4] 2016-10-30 12:27:41 -0400
Branch: REL9_6_STABLE [48a6592da] 2016-10-30 12:27:41 -0400
Branch: REL9_5_STABLE [7151e72d7] 2016-10-30 12:27:41 -0400
-->
     <para>
      Improve speed of user-defined aggregates that
      use <function>array_append()</> as transition function (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [82f8107b9] 2017-01-05 11:33:51 -0500
Branch: REL9_6_STABLE [5b4f8f4c6] 2017-01-05 11:33:51 -0500
Branch: REL9_5_STABLE [4555a375a] 2017-01-05 11:33:51 -0500
Branch: REL9_4_STABLE [4e446563b] 2017-01-05 11:33:51 -0500
Branch: REL9_3_STABLE [ee9cb284a] 2017-01-05 11:33:51 -0500
Branch: REL9_2_STABLE [e0d59c6ef] 2017-01-05 11:33:51 -0500
-->
     <para>
      Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [a73491e5f] 2016-12-09 12:42:17 -0300
Branch: REL9_6_STABLE [79c89f1f4] 2016-12-09 12:42:17 -0300
Branch: REL9_5_STABLE [581b09c72] 2016-12-09 12:42:17 -0300
-->
     <para>
      Fix possible crash in <function>array_position()</>
      or <function>array_positions()</> when processing arrays of records
      (Junseok Yang)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [4f5182e18] 2016-12-16 12:53:04 +0200
Branch: REL9_6_STABLE [0fe5a4cd7] 2016-12-16 12:52:50 +0200
Branch: REL9_5_STABLE [595333ff4] 2016-12-16 12:53:12 +0200
Branch: REL9_4_STABLE [779325478] 2016-12-16 12:53:16 +0200
Branch: REL9_3_STABLE [e71fe8470] 2016-12-16 12:53:22 +0200
Branch: REL9_2_STABLE [c8f8ed5c2] 2016-12-16 12:53:27 +0200
-->
     <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>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [974ece58b] 2017-01-17 17:27:32 +0900
Branch: REL9_6_STABLE [60a8b63d2] 2017-01-17 17:29:15 +0900
Branch: REL9_5_STABLE [dfe348c1b] 2017-01-17 17:30:26 +0900
Branch: REL9_4_STABLE [9e7f00d86] 2017-01-17 17:31:51 +0900
Branch: REL9_3_STABLE [f64b11fa0] 2017-01-17 17:32:20 +0900
Branch: REL9_2_STABLE [c73157ca0] 2017-01-17 17:32:45 +0900
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c22ecc656] 2017-01-18 15:22:07 -0500
Branch: REL9_6_STABLE [b21e665f2] 2017-01-18 15:21:52 -0500
Branch: REL9_5_STABLE [74e67bbad] 2017-01-18 15:21:52 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f0774abde] 2016-12-27 15:43:54 -0500
Branch: REL9_6_STABLE [21e24eb9a] 2016-12-27 15:43:54 -0500
Branch: REL9_5_STABLE [4efe7aa2d] 2016-12-27 15:43:54 -0500
Branch: REL9_4_STABLE [0b947b692] 2016-12-27 15:43:54 -0500
Branch: REL9_3_STABLE [583599839] 2016-12-27 15:43:54 -0500
Branch: REL9_2_STABLE [beae7d5f0] 2016-12-27 15:43:55 -0500
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [53c7cff72] 2016-12-05 15:54:28 -0500
Branch: REL9_6_STABLE [06fa6670f] 2016-12-05 15:59:02 -0500
-->
     <para>
      Fix crash if the number of workers available to a parallel query
      decreases during a rescan (Andreas Seltenreich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [13671b4b2] 2016-11-19 14:26:19 -0500
Branch: REL9_6_STABLE [272c42660] 2016-11-19 14:26:19 -0500
Branch: REL9_5_STABLE [b9ee42e70] 2016-11-19 14:26:20 -0500
-->
     <para>
      Fix bugs in transmitting GUC parameter values to parallel workers
      (Michael Paquier, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [4212cb732] 2016-12-06 11:11:54 -0500
Branch: REL9_6_STABLE [ebe5dc9e0] 2016-12-06 11:43:12 -0500
-->
     <para>
      Allow statements prepared with <command>PREPARE</> to be given
      parallel plans (Amit Kapila, Tobias Bussmann)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [41e2b84ce] 2016-11-29 19:32:35 -0500
Branch: REL9_6_STABLE [e5b8aa636] 2016-11-29 19:32:35 -0500
-->
     <para>
      Fix incorrect generation of parallel plans for semi-joins (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [0c2070cef] 2017-01-13 13:34:10 -0500
Branch: REL9_6_STABLE [2d443ae1b] 2017-01-13 13:36:09 -0500
-->
     <para>
      Fix planner's cardinality estimates for parallel joins (Robert Haas)
     </para>

     <para>
      Ensure that these estimates reflect the number of rows predicted to
      be seen by each worker, rather than the total.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ab77a5a45] 2016-11-25 16:20:12 -0500
Branch: REL9_6_STABLE [474de765a] 2016-11-25 16:20:31 -0500
Branch: master [f24cf960d] 2016-11-21 11:09:24 -0500
Branch: REL9_6_STABLE [01f08cbbc] 2016-11-21 11:09:33 -0500
-->
     <para>
      Fix planner to avoid trying to parallelize plan nodes containing
      initplans or subplans (Tom Lane, Amit Kapila)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c52d37c8b] 2017-01-06 14:12:52 -0500
Branch: REL9_6_STABLE [4103a2f20] 2017-01-06 14:12:52 -0500
Branch: REL9_5_STABLE [aaf12e577] 2017-01-06 14:12:52 -0500
Branch: REL9_4_STABLE [e4380e4cf] 2017-01-06 14:12:52 -0500
Branch: REL9_3_STABLE [a8191800a] 2017-01-06 14:12:52 -0500
-->
     <para>
      Ensure that cached plans are invalidated by changes in foreign-table
      options (Amit Langote, Etsuro Fujita, Ashutosh Bapat)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e1b449bea] 2016-11-10 11:31:56 -0500
Branch: REL9_6_STABLE [7defc3b97] 2016-11-10 11:31:56 -0500
-->
     <para>
      Fix the plan generated for sorted partial aggregation with a constant
      <literal>GROUP BY</> clause (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1f542a2ea] 2016-12-13 13:20:37 -0500
Branch: REL9_6_STABLE [997a2994e] 2016-12-13 13:20:16 -0500
-->
     <para>
      Fix <quote>could not find plan for CTE</> planner error when dealing
      with a <literal>UNION ALL</> containing CTE references (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [555494d1b] 2017-02-02 19:11:32 -0500
Branch: REL9_6_STABLE [b971a98ce] 2017-02-02 19:11:27 -0500
-->
     <para>
      Fix mishandling of initplans when forcibly adding a Material node to
      a subplan (Tom Lane)
     </para>

     <para>
      The typical consequence of this mistake was a <quote>plan should not
      reference subplan's variable</> error.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7fa93eec4] 2016-12-17 15:28:54 -0500
Branch: REL9_6_STABLE [f4f195d15] 2016-12-17 15:28:54 -0500
Branch: master [770671062] 2016-11-02 15:50:15 -0400
Branch: REL9_6_STABLE [23c6c437f] 2016-11-02 15:50:21 -0400
-->
     <para>
      Fix foreign-key-based join selectivity estimation for semi-joins and
      anti-joins, as well as inheritance cases (Tom Lane)
     </para>

     <para>
      The new code for taking the existence of a foreign key relationship
      into account did the wrong thing in these cases, making the estimates
      worse not better than the pre-9.6 code.
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [bec96c82f] 2017-01-19 12:06:21 -0500
Branch: REL9_6_STABLE [fd081cabf] 2017-01-19 12:06:27 -0500
-->
     <para>
      Fix <application>pg_dump</> to emit the data of a sequence that is
      marked as an extension configuration table (Michael Paquier)
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [e2090d9d2] 2017-01-31 16:24:11 -0500
Branch: REL9_6_STABLE [eb5e9d90d] 2017-01-31 16:24:14 -0500
-->
     <para>
      Fix mishandling of <command>ALTER DEFAULT PRIVILEGES ... REVOKE</>
      in <application>pg_dump</> (Stephen Frost)
     </para>

     <para>
      <application>pg_dump</> missed issuing the
      required <literal>REVOKE</> commands in cases where <command>ALTER
      DEFAULT PRIVILEGES</> had been used to reduce privileges to less than
      they would normally be.
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [2259bf672] 2016-12-21 13:47:06 -0500
Branch: REL9_6_STABLE [542975a14] 2016-12-21 13:47:13 -0500
Branch: REL9_5_STABLE [1efc5dba0] 2016-12-21 13:47:18 -0500
Branch: REL9_4_STABLE [13f51dacf] 2016-12-21 13:47:23 -0500
Branch: REL9_3_STABLE [1f2cfd26f] 2016-12-21 13:47:28 -0500
Branch: REL9_2_STABLE [da57166b7] 2016-12-21 13:47:32 -0500
Branch: master [19990918d] 2016-12-21 13:47:06 -0500
Branch: REL9_6_STABLE [e45319bb7] 2016-12-21 13:47:13 -0500
Branch: REL9_5_STABLE [94476436a] 2016-12-21 13:47:18 -0500
Branch: REL9_4_STABLE [107943f1a] 2016-12-21 13:47:23 -0500
Branch: REL9_3_STABLE [fc03f7dd1] 2016-12-21 13:47:28 -0500
Branch: REL9_2_STABLE [59a389891] 2016-12-21 13:47:32 -0500
-->
     <para>
      Fix <application>pg_dump</> to dump user-defined casts and transforms
      that use built-in functions (Stephen Frost)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ac888986f] 2016-11-17 14:59:13 -0500
Branch: REL9_6_STABLE [0eaa5118a] 2016-11-17 14:59:19 -0500
Branch: REL9_5_STABLE [a7864037d] 2016-11-17 14:59:23 -0500
Branch: REL9_4_STABLE [e69b532be] 2016-11-17 14:59:26 -0500
-->
     <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>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [10238fad0] 2016-12-19 10:11:04 +0100
Branch: REL9_6_STABLE [1c8ad594e] 2016-12-19 10:15:52 +0100
Branch: REL9_5_STABLE [bc53d7130] 2016-12-19 10:16:02 +0100
Branch: REL9_4_STABLE [f6508827a] 2016-12-19 10:16:12 +0100
-->
     <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>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: REL9_6_STABLE [b6a323a8c] 2016-11-07 14:47:30 +0100
Branch: REL9_5_STABLE [6d779e05a] 2016-11-07 15:03:56 +0100
Branch: REL9_4_STABLE [5556420d4] 2016-11-07 15:04:23 +0100
-->
     <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>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [f267c1c24] 2016-10-27 11:19:51 -0400
Branch: REL9_6_STABLE [05e2293f4] 2016-10-27 11:34:28 -0400
Branch: REL9_5_STABLE [ef18cb7da] 2016-10-27 11:53:14 -0400
Branch: REL9_4_STABLE [d1e9c8269] 2016-10-27 11:59:08 -0400
Branch: REL9_3_STABLE [92929a3e3] 2016-10-27 12:00:05 -0400
Branch: REL9_2_STABLE [629575fa2] 2016-10-27 12:14:07 -0400
-->
     <para>
      Fix possible <application>pg_basebackup</> failure on standby
      server when including WAL files (Amit Kapila, Robert Haas)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [dbdfd114f] 2016-11-25 18:36:10 -0500
Branch: REL9_6_STABLE [255bcd27f] 2016-11-25 18:36:10 -0500
-->
     <para>
      Improve <application>initdb</> to insert the correct
      platform-specific default values for
      the <replaceable>xxx</><literal>_flush_after</> parameters
      into <filename>postgresql.conf</> (Fabien Coelho, Tom Lane)
     </para>

     <para>
      This is a cleaner way of documenting the default values than was used
      previously.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cd1b21569] 2016-12-22 15:01:37 -0500
Branch: REL9_6_STABLE [77cd0dc7e] 2016-12-22 15:01:38 -0500
Branch: REL9_5_STABLE [c472f2a33] 2016-12-22 15:01:39 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fc8b81a29] 2016-11-06 12:09:36 -0500
Branch: REL9_6_STABLE [a5b153ff5] 2016-11-06 12:09:36 -0500
Branch: REL9_5_STABLE [674877e93] 2016-11-06 12:09:36 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9cda81f00] 2016-12-09 15:27:23 -0500
Branch: REL9_6_STABLE [b90f2247e] 2016-12-09 15:27:23 -0500
Branch: REL9_5_STABLE [00858728f] 2016-12-09 15:27:23 -0500
Branch: REL9_4_STABLE [13a4b37b9] 2016-12-09 15:27:23 -0500
Branch: REL9_3_STABLE [cea6de20b] 2016-12-09 15:27:23 -0500
Branch: REL9_2_STABLE [981885d17] 2016-12-09 15:27:23 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fd2664dcb] 2016-11-06 14:43:13 -0500
Branch: REL9_6_STABLE [3af8467e9] 2016-11-06 14:43:13 -0500
Branch: REL9_5_STABLE [abdc83998] 2016-11-06 14:43:13 -0500
Branch: REL9_4_STABLE [110413a35] 2016-11-06 14:43:13 -0500
Branch: REL9_3_STABLE [9c0b04f18] 2016-11-06 14:43:14 -0500
Branch: REL9_2_STABLE [92b7b1058] 2016-11-06 14:43:14 -0500
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0a7481930] 2016-11-15 16:17:19 -0500
Branch: REL9_6_STABLE [a69e6d9a6] 2016-11-15 16:17:19 -0500
Branch: REL9_5_STABLE [8951f92da] 2016-11-15 16:17:19 -0500
Branch: REL9_4_STABLE [e9802122d] 2016-11-15 16:17:19 -0500
Branch: REL9_3_STABLE [46b6f3fff] 2016-11-15 16:17:19 -0500
Branch: REL9_2_STABLE [13aa9af37] 2016-11-15 16:17:19 -0500
-->
     <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>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [4032ef18d] 2016-12-22 08:28:13 +0100
Branch: REL9_6_STABLE [fd2a5547c] 2016-12-22 08:29:13 +0100
Branch: REL9_5_STABLE [a88c547f9] 2016-12-22 08:29:33 +0100
Branch: REL9_4_STABLE [3af172f7b] 2016-12-22 08:30:06 +0100
Branch: REL9_3_STABLE [1df8b3fe8] 2016-12-22 08:32:25 +0100
Branch: REL9_2_STABLE [501c91074] 2016-12-22 08:34:07 +0100
-->
     <para>
      Fix one-byte buffer overrun if <application>ecpg</> is given a file
      name that ends with a dot (Takayuki Tsunakawa)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a3aef88e6] 2016-12-25 16:04:45 -0500
Branch: REL9_6_STABLE [6a8c67f50] 2016-12-25 16:04:47 -0500
-->
     <para>
      Fix incorrect error reporting for duplicate data
      in <application>psql</>'s <command>\crosstabview</> (Tom Lane)
     </para>

     <para>
      <application>psql</> sometimes quoted the wrong row and/or column
      values when complaining about multiple entries for the same crosstab
      cell.
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [f3fd531a5] 2016-12-23 21:01:29 -0500
Branch: REL9_6_STABLE [dc61580bd] 2016-12-23 21:01:33 -0500
Branch: REL9_5_STABLE [16a2efdb2] 2016-12-23 21:01:40 -0500
Branch: REL9_4_STABLE [98f30a0e7] 2016-12-23 21:01:45 -0500
Branch: REL9_3_STABLE [2022d594d] 2016-12-23 21:01:48 -0500
Branch: REL9_2_STABLE [26b55d669] 2016-12-23 21:01:51 -0500
-->
     <para>
      Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT
      PRIVILEGES</> (Gilles Darold, Stephen Frost)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [404e66758] 2016-11-28 11:51:30 -0500
Branch: REL9_6_STABLE [28735cc72] 2016-11-28 11:51:35 -0500
-->
     <para>
      Fix <application>psql</>'s tab completion for <command>ALTER TABLE t
      ALTER c DROP ...</> (Kyotaro Horiguchi)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [18f8f784c] 2016-12-07 12:19:56 -0500
Branch: REL9_6_STABLE [bb39f58f7] 2016-12-07 12:19:56 -0500
Branch: REL9_5_STABLE [370c7a863] 2016-12-07 12:19:56 -0500
Branch: REL9_4_STABLE [ccb84dae1] 2016-12-07 12:19:56 -0500
Branch: REL9_3_STABLE [82eb5c514] 2016-12-07 12:19:56 -0500
Branch: REL9_2_STABLE [1ec5cc025] 2016-12-07 12:19:57 -0500
-->
     <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>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master [2f802d95b] 2016-12-22 09:48:55 -0800
Branch: REL9_6_STABLE [51126ccdb] 2016-12-22 09:47:55 -0800
Branch: REL9_5_STABLE [80ca22aa6] 2016-12-22 09:47:46 -0800
Branch: REL9_4_STABLE [76943f54a] 2016-12-22 09:47:36 -0800
Branch: REL9_3_STABLE [9b8507bfa] 2016-12-22 09:47:25 -0800
Branch: REL9_2_STABLE [44de099f8] 2016-12-22 09:46:46 -0800
-->
     <para>
      Improve <filename>contrib/dblink</>'s reporting of
      low-level <application>libpq</> errors, such as out-of-memory
      (Joe Conway)
     </para>
    </listitem>

    <listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master [c44486838] 2016-12-22 09:20:35 -0800
Branch: REL9_6_STABLE [150841fb9] 2016-12-22 09:19:34 -0800
Branch: REL9_5_STABLE [d5c05f27a] 2016-12-22 09:19:18 -0800
Branch: REL9_4_STABLE [cb687e0ac] 2016-12-22 09:19:08 -0800
Branch: REL9_3_STABLE [bd46cce21] 2016-12-22 09:18:50 -0800
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL9_6_STABLE [4774f6183] 2016-11-04 12:37:29 -0400
Branch: REL9_5_STABLE [56d34ba5f] 2016-11-04 12:37:29 -0400
Branch: master [14ee35799] 2016-11-02 00:09:27 -0400
Branch: REL9_6_STABLE [2a8783e44] 2016-11-02 00:09:28 -0400
Branch: REL9_5_STABLE [af636d7b5] 2016-11-02 00:09:28 -0400
-->
     <para>
      Fix portability problems in <filename>contrib/pageinspect</>'s
      functions for GIN indexes (Peter Eisentraut, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [3b790d256] 2016-12-21 11:01:48 -0500
Branch: REL9_6_STABLE [b98e5513f] 2016-12-21 11:11:36 -0500
-->
     <para>
      Fix possible miss of socket read events while waiting on Windows
      (Amit Kapila)
     </para>

     <para>
      This error was harmless for most uses, but it is known to cause hangs
      when trying to use the pldebugger extension.
     </para>
    </listitem>

    <listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [95b9b8a39] 2016-12-03 15:46:36 -0500
Branch: REL9_6_STABLE [784054579] 2016-12-03 15:46:42 -0500
Branch: REL9_5_STABLE [5ab4b2ec4] 2016-12-03 15:46:48 -0500
Branch: REL9_4_STABLE [b45a4949d] 2016-12-03 15:47:18 -0500
Branch: REL9_3_STABLE [6c5d5918b] 2016-12-03 15:47:31 -0500
Branch: REL9_2_STABLE [d83c94292] 2016-12-03 15:47:52 -0500
Branch: master [b37da1e8a] 2016-12-03 15:46:35 -0500
Branch: REL9_6_STABLE [056d62c5e] 2016-12-03 15:46:42 -0500
Branch: REL9_5_STABLE [3cb8bdfef] 2016-12-03 15:46:48 -0500
Branch: REL9_4_STABLE [ec7eacfae] 2016-12-03 15:47:12 -0500
Branch: REL9_3_STABLE [4c3505eb4] 2016-12-03 15:47:31 -0500
Branch: REL9_2_STABLE [a9265258a] 2016-12-03 15:47:49 -0500
-->
     <para>
      On Windows, ensure that environment variable changes are propagated
      to DLLs built with debug options (Christian Ullrich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [93513d1b6] 2016-12-15 14:32:42 -0500
Branch: REL9_6_STABLE [6f4d38dbe] 2016-12-15 14:32:58 -0500
Branch: REL9_5_STABLE [492fe48f0] 2016-12-15 14:33:06 -0500
Branch: REL9_4_STABLE [b95f4bf07] 2016-12-15 14:33:10 -0500
Branch: REL9_3_STABLE [ccf24539b] 2016-12-15 14:33:14 -0500
Branch: REL9_2_STABLE [2b7d715c0] 2016-12-15 14:33:19 -0500
Branch: master [32416b0f9] 2016-11-06 10:45:58 -0500
Branch: REL9_6_STABLE [20559a854] 2016-11-06 10:46:08 -0500
Branch: REL9_5_STABLE [6e377ef0c] 2016-11-06 10:46:14 -0500
Branch: REL9_4_STABLE [6651ab058] 2016-11-06 10:46:21 -0500
Branch: REL9_3_STABLE [3a8f24abd] 2016-11-06 10:46:27 -0500
Branch: REL9_2_STABLE [6653dbafd] 2016-11-06 10:46:34 -0500
Branch: master [1f87181e1] 2016-11-03 22:24:34 -0400
Branch: REL9_6_STABLE [7afafe8af] 2016-11-04 10:44:16 -0400
Branch: REL9_5_STABLE [ac6fc1b55] 2016-11-04 10:44:16 -0400
Branch: REL9_4_STABLE [c09478e15] 2016-11-04 10:44:16 -0400
Branch: REL9_3_STABLE [22b1207a3] 2016-11-04 10:44:16 -0400
Branch: REL9_2_STABLE [07bc2fc45] 2016-11-04 10:44:16 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [308d86827] 2017-01-30 11:40:22 -0500
Branch: REL9_6_STABLE [6da67b684] 2017-01-30 11:40:39 -0500
Branch: REL9_5_STABLE [4c729f471] 2017-01-30 11:40:46 -0500
Branch: REL9_4_STABLE [a7b5de3ba] 2017-01-30 11:40:54 -0500
Branch: REL9_3_STABLE [2b133be04] 2017-01-30 11:41:02 -0500
Branch: REL9_2_STABLE [ef878cc2c] 2017-01-30 11:41:09 -0500
-->
     <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-6-1">
  <title>Release 9.6.1</title>

  <formalpara>
  <title>Release date:</title>
  <para>2016-10-27</para>
  </formalpara>

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

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

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

   <para>
    However, if your installation has been affected by the bugs described in
    the first two changelog entries below, then after updating you may need
    to take action to repair corrupted free space maps and/or visibility
    maps.
   </para>
  </sect2>

  <sect2>
   <title>Changes</title>

   <itemizedlist>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [917dc7d23] 2016-10-19 14:26:05 +0300
Branch: REL9_6_STABLE [142530ef0] 2016-10-19 14:43:34 +0300
Branch: REL9_5_STABLE [b82573d6e] 2016-10-19 15:00:06 +0300
Branch: REL9_4_STABLE [2523bef15] 2016-10-19 15:00:10 +0300
Branch: REL9_3_STABLE [1c02ee314] 2016-10-19 15:00:34 +0300
-->
     <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 [5afcd2aa7] 2016-09-30 20:40:55 -0400
Branch: REL9_6_STABLE [b6d906073] 2016-09-30 20:39:06 -0400
-->
     <para>
      Fix possible data corruption when <application>pg_upgrade</> rewrites
      a relation visibility map into 9.6 format (Tom Lane)
     </para>

     <para>
      On big-endian machines, bytes of the new visibility map were written
      in the wrong order, leading to a completely incorrect map.  On
      Windows, the old map was read using text mode, leading to incorrect
      results if the map happened to contain consecutive bytes that matched
      a carriage return/line feed sequence.  The latter error would almost
      always lead to a <application>pg_upgrade</> failure due to the map
      file appearing to be the wrong length.
     </para>

     <para>
      If you are using a big-endian machine (many non-Intel architectures
      are big-endian) and have used <application>pg_upgrade</> to upgrade
      from a pre-9.6 release, you should assume that all visibility maps are
      incorrect and need to be regenerated.  It is sufficient to truncate
      each relation's visibility map
      with <filename>contrib/pg_visibility</>'s
      <function>pg_truncate_visibility_map()</> function.
      For more information see
      <ulink url="https://wiki.postgresql.org/wiki/Visibility_Map_Problems"></>.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a6c0a5b6e] 2016-10-23 18:36:13 -0400
Branch: REL9_6_STABLE [c4016fcb1] 2016-10-23 18:36:13 -0400
Branch: REL9_5_STABLE [65d85b8f9] 2016-10-23 18:36:13 -0400
-->
     <para>
      Don't throw serialization errors for self-conflicting insertions
      in <command>INSERT ... ON CONFLICT</> (Thomas Munro, Peter Geoghegan)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [d8589946d] 2016-10-17 12:13:16 +0300
Branch: REL9_6_STABLE [a5f0bd77a] 2016-10-17 12:13:35 +0300
-->
     <para>
      Fix use-after-free hazard in execution of aggregate functions
      using <literal>DISTINCT</> (Peter Geoghegan)
     </para>

     <para>
      This could lead to a crash or incorrect query results.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ac4a9d92f] 2016-10-09 12:49:37 -0400
Branch: REL9_6_STABLE [dca25c256] 2016-10-09 12:49:37 -0400
-->
     <para>
      Fix incorrect handling of polymorphic aggregates used as window
      functions (Tom Lane)
     </para>

     <para>
      The aggregate's transition function was told that its first argument
      and result were of the aggregate's output type, rather than the
      state type.  This led to errors or crashes with
      polymorphic transition functions.
     </para>
    </listitem>

    <listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [814b9e9b8] 2016-10-03 16:22:57 -0400
Branch: REL9_6_STABLE [190765a05] 2016-10-03 16:23:02 -0400
Branch: REL9_5_STABLE [647a86e37] 2016-10-03 16:23:12 -0400
-->
     <para>
      Fix <command>COPY</> with a column name list from a table that has
      row-level security enabled (Adam Brightwell)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [709e461be] 2016-10-20 17:17:50 -0400
Branch: REL9_6_STABLE [033666515] 2016-10-20 17:17:57 -0400
Branch: REL9_5_STABLE [cc0e4c567] 2016-10-20 17:18:01 -0400
Branch: REL9_4_STABLE [adb199711] 2016-10-20 17:18:05 -0400
Branch: REL9_3_STABLE [edb514306] 2016-10-20 17:18:09 -0400
Branch: REL9_2_STABLE [f17c26dbd] 2016-10-20 17:18:14 -0400
-->
     <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 [81e82a2bd] 2016-10-13 19:46:05 -0400
Branch: REL9_6_STABLE [03f2bf70a] 2016-10-13 19:46:06 -0400
Branch: REL9_5_STABLE [3cd504254] 2016-10-13 19:45:58 -0400
-->
     <para>
      Fix statistics update for <command>TRUNCATE</> in a prepared
      transaction (Stas Kelvich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e55a946a8] 2016-10-08 19:29:27 -0400
Branch: REL9_6_STABLE [b605aeba0] 2016-10-08 19:29:27 -0400
Branch: REL9_5_STABLE [d1a9f128d] 2016-10-08 19:29:27 -0400
Branch: REL9_4_STABLE [12230c478] 2016-10-08 19:29:27 -0400
Branch: REL9_3_STABLE [56a047f46] 2016-10-08 19:29:28 -0400
Branch: REL9_2_STABLE [a54faa659] 2016-10-08 19:29:28 -0400
Branch: master [3cca13cbf] 2016-10-13 17:05:14 -0400
Branch: REL9_6_STABLE [f9e8b05e5] 2016-10-13 17:05:14 -0400
Branch: REL9_5_STABLE [3217ac3a9] 2016-10-13 17:05:15 -0400
Branch: REL9_4_STABLE [f2024d59a] 2016-10-13 17:05:15 -0400
Branch: REL9_3_STABLE [f0bf0f233] 2016-10-13 17:05:15 -0400
Branch: REL9_2_STABLE [6f2db29ec] 2016-10-13 17:05:15 -0400
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6bc811c99] 2016-10-03 16:40:25 -0400
Branch: REL9_6_STABLE [993d94c59] 2016-10-03 16:40:26 -0400
Branch: REL9_5_STABLE [f50fa46cc] 2016-10-03 16:40:27 -0400
-->
     <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 [9c4cc9e2c] 2016-10-13 00:25:48 -0400
Branch: REL9_6_STABLE [0e9e64c07] 2016-10-13 00:25:28 -0400
-->
     <para>
      Fix replacement of array elements in <function>jsonb_set()</>
      (Tom Lane)
     </para>

     <para>
      If the target is an existing JSON array element, it got deleted
      instead of being replaced with a new value.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6292c2339] 2016-10-23 15:01:24 -0400
Branch: REL9_6_STABLE [5beb73b49] 2016-10-23 15:01:24 -0400
Branch: REL9_5_STABLE [913e7e598] 2016-10-23 15:01:24 -0400
Branch: REL9_4_STABLE [9ec21591f] 2016-10-23 15:01:24 -0400
Branch: REL9_3_STABLE [676c60375] 2016-10-23 15:01:24 -0400
Branch: REL9_2_STABLE [9bc01e7a4] 2016-10-23 15:01:24 -0400
Branch: REL9_1_STABLE [d4fa18a55] 2016-10-23 15:01:24 -0400
Branch: master [8f1fb7d62] 2016-10-23 19:14:32 -0400
Branch: REL9_6_STABLE [fdcee9f1f] 2016-10-23 19:14:32 -0400
Branch: REL9_5_STABLE [beac79369] 2016-10-23 19:14:32 -0400
-->
     <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>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [00f15338b] 2016-10-24 09:45:48 -0300
Branch: REL9_6_STABLE [c8329f934] 2016-10-24 09:46:49 -0300
Branch: REL9_5_STABLE [7a2fa5774] 2016-10-24 09:38:28 -0300
-->
     <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>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [61633f790] 2016-10-03 22:11:36 -0700
Branch: REL9_6_STABLE [76c0b73df] 2016-10-03 22:12:31 -0700
Branch: REL9_5_STABLE [ce603a34a] 2016-10-03 22:13:10 -0700
Branch: REL9_4_STABLE [07172b20f] 2016-10-03 22:14:12 -0700
-->
     <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 [308985b0b] 2016-09-28 11:19:46 -0400
Branch: REL9_6_STABLE [32841fa32] 2016-09-28 11:22:39 -0400
-->
     <para>
      Fix dangling-pointer problem in logical WAL decoding (Stas Kelvich)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cb775768e] 2016-10-13 15:06:46 -0400
Branch: REL9_6_STABLE [2dd9e315d] 2016-10-13 15:06:57 -0400
Branch: REL9_5_STABLE [43d17489d] 2016-10-13 15:07:04 -0400
Branch: REL9_4_STABLE [6d3cbbf59] 2016-10-13 15:07:11 -0400
-->
     <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: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [8bb14cdd3] 2016-10-07 12:20:39 +0300
Branch: REL9_6_STABLE [341acf235] 2016-10-07 12:21:52 +0300
Branch: REL9_5_STABLE [cb38c056f] 2016-10-07 12:22:19 +0300
Branch: REL9_4_STABLE [31895abd8] 2016-10-07 12:22:45 +0300
Branch: REL9_3_STABLE [fde92dc22] 2016-10-07 12:23:06 +0300
Branch: REL9_2_STABLE [e7bb327e3] 2016-10-07 12:23:58 +0300
Branch: REL9_1_STABLE [e76d06d7f] 2016-10-07 12:23:52 +0300
Branch: master [275bf9860] 2016-10-07 12:51:52 +0300
Branch: REL9_6_STABLE [4d3ecbfee] 2016-10-07 12:53:40 +0300
Branch: REL9_5_STABLE [f0ca54037] 2016-10-07 12:53:42 +0300
Branch: REL9_4_STABLE [418cd758a] 2016-10-07 12:53:45 +0300
Branch: REL9_3_STABLE [b5afc6f67] 2016-10-07 12:53:47 +0300
Branch: REL9_2_STABLE [5d5dc6f68] 2016-10-07 12:53:49 +0300
Branch: REL9_1_STABLE [e84e4761f] 2016-10-07 12:53:51 +0300
-->
     <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>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [886f6c5cc] 2016-10-10 10:35:58 -0400
Branch: REL9_6_STABLE [bb211b66f] 2016-10-10 10:35:58 -0400
Branch: REL9_5_STABLE [4f87f7640] 2016-10-10 10:35:58 -0400
Branch: REL9_4_STABLE [eb6bc03bf] 2016-10-10 10:35:58 -0400
Branch: REL9_3_STABLE [455eaf984] 2016-10-10 10:35:58 -0400
Branch: REL9_2_STABLE [7397f62e7] 2016-10-10 10:35:58 -0400
Branch: REL9_1_STABLE [fb6825fe5] 2016-10-10 10:35:58 -0400
-->
     <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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [83c249200] 2016-10-03 10:07:49 -0400
Branch: REL9_6_STABLE [bac56dbe0] 2016-10-03 10:07:39 -0400
Branch: REL9_5_STABLE [0f259bd17] 2016-10-03 10:07:39 -0400
-->
     <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 [e8bdee277] 2016-10-02 14:31:28 -0400
Branch: REL9_6_STABLE [f40334b85] 2016-10-02 14:31:28 -0400
-->
     <para>
      Fix <application>pg_upgrade</> to work correctly for extensions
      containing index access methods (Tom Lane)
     </para>

     <para>
      To allow this, the server has been extended to support <command>ALTER
      EXTENSION ADD/DROP ACCESS METHOD</>.  That functionality should have
      been included in the original patch to support dynamic creation of
      access methods, but it was overlooked.
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f002ed2b8] 2016-09-30 20:40:56 -0400
Branch: REL9_6_STABLE [53fbeed40] 2016-09-30 20:40:27 -0400
-->
     <para>
      Improve error reporting in <application>pg_upgrade</>'s file
      copying/linking/rewriting steps (Tom Lane, &Aacute;lvaro Herrera)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4806f26f9] 2016-10-07 09:51:18 -0400
Branch: REL9_6_STABLE [1749332ec] 2016-10-07 09:51:28 -0400
-->
     <para>
      Fix <application>pg_dump</> to work against pre-7.4 servers
      (Amit Langote, Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [0d4d7d618] 2016-10-07 14:35:17 +0300
Branch: REL9_6_STABLE [2933ed036] 2016-10-07 14:35:41 +0300
Branch: REL9_5_STABLE [010a1b561] 2016-10-07 14:35:45 +0300
-->
     <para>
      Disallow specifying both <option>--source-server</>
      and <option>--source-target</> options to <application>pg_rewind</>
      (Michael Banck)
     </para>
    </listitem>

    <listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [d7eb76b90] 2016-10-06 13:24:46 +0300
Branch: REL9_6_STABLE [aab809664] 2016-10-06 13:34:38 +0300
Branch: REL9_5_STABLE [69da71254] 2016-10-06 13:34:32 +0300
-->
     <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>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [3d39244e6] 2016-09-30 11:22:00 +0200
Branch: REL9_6_STABLE [41d58e97a] 2016-09-30 11:22:20 +0200
Branch: REL9_5_STABLE [d8b4c3490] 2016-09-30 11:22:32 +0200
Branch: REL9_4_STABLE [da3f71a08] 2016-09-30 11:22:49 +0200
Branch: REL9_3_STABLE [4bff35cca] 2016-09-30 11:23:25 +0200
-->
     <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: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9a109452d] 2016-10-01 16:32:54 -0400
Branch: REL9_6_STABLE [f4e787c82] 2016-10-01 16:32:55 -0400
-->
     <para>
      Fix <filename>contrib/pg_visibility</> to report the correct TID for
      a corrupt tuple that has been the subject of a rolled-back update
      (Tom Lane)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7107d58ec] 2016-10-01 13:35:13 -0400
Branch: REL9_6_STABLE [68fb75e10] 2016-10-01 13:35:20 -0400
-->
     <para>
      Fix makefile dependencies so that parallel make
      of <application>PL/Python</> by itself will succeed reliably
      (Pavel Raiskup)
     </para>
    </listitem>

    <listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5e21b6811] 2016-10-20 15:40:07 -0400
Branch: REL9_6_STABLE [845a8ea3e] 2016-10-20 15:40:14 -0400
Branch: REL9_5_STABLE [aac898ac5] 2016-10-20 15:40:18 -0400
Branch: REL9_4_STABLE [a8518738a] 2016-10-20 15:40:22 -0400
Branch: REL9_3_STABLE [92da75278] 2016-10-20 15:40:26 -0400
Branch: REL9_2_STABLE [b2aee4cb6] 2016-10-20 15:40:30 -0400
Branch: REL9_1_STABLE [37ecf07d3] 2016-10-20 15:40:34 -0400
Branch: master [d8fc45bd0] 2016-10-20 15:20:11 -0400
Branch: REL9_6_STABLE [80ba149b0] 2016-10-20 15:20:17 -0400
Branch: REL9_5_STABLE [8cddedc17] 2016-10-20 15:20:21 -0400
Branch: REL9_4_STABLE [1d388ba2c] 2016-10-20 15:20:26 -0400
Branch: REL9_3_STABLE [ff68f434f] 2016-10-20 15:20:30 -0400
Branch: REL9_2_STABLE [3c5fae786] 2016-10-20 15:20:35 -0400
Branch: REL9_1_STABLE [9345bf08c] 2016-10-20 15:20:39 -0400
Branch: master [f3094920a] 2016-10-19 18:55:52 -0400
Branch: REL9_6_STABLE [7fec5e101] 2016-10-19 18:55:57 -0400
Branch: REL9_5_STABLE [bc59c1236] 2016-10-19 18:56:01 -0400
Branch: REL9_4_STABLE [381c4b03b] 2016-10-19 18:56:05 -0400
Branch: REL9_3_STABLE [ad6f67179] 2016-10-19 18:56:09 -0400
Branch: REL9_2_STABLE [66adeefda] 2016-10-19 18:56:14 -0400
Branch: REL9_1_STABLE [2877b102e] 2016-10-19 18:56:18 -0400
Branch: master [ecbac3e6e] 2016-10-19 17:56:38 -0400
Branch: REL9_6_STABLE [0c2f4c54c] 2016-10-19 17:56:45 -0400
Branch: REL9_5_STABLE [5508d0c0b] 2016-10-19 17:56:49 -0400
Branch: REL9_4_STABLE [9727dac58] 2016-10-19 17:56:53 -0400
Branch: REL9_3_STABLE [7abda82ef] 2016-10-19 17:56:57 -0400
Branch: REL9_2_STABLE [a03339aef] 2016-10-19 17:57:01 -0400
Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400
-->
     <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-6">
  <title>Release 9.6</title>

  <formalpara>
   <title>Release date:</title>
   <para>2016-09-29</para>
  </formalpara>

  <sect2>
   <title>Overview</title>

   <para>
    Major enhancements in <productname>PostgreSQL</> 9.6 include:
   </para>

   <!-- Items in this list summarize one or more items below -->

   <itemizedlist>

    <listitem>
     <para>
      Parallel execution of sequential scans, joins and aggregates
     </para>
    </listitem>

    <listitem>
     <para>
      Avoid scanning pages unnecessarily during vacuum freeze operations
     </para>
    </listitem>

    <listitem>
     <para>
      Synchronous replication now allows multiple standby servers for
      increased reliability
     </para>
    </listitem>

    <listitem>
     <para>
      Full-text search can now search for phrases (multiple adjacent words)
     </para>
    </listitem>

    <listitem>
     <para>
      <filename>postgres_fdw</> now supports remote joins, sorts,
      <command>UPDATE</>s, and <command>DELETE</>s
     </para>
    </listitem>

    <listitem>
     <para>
      Substantial performance improvements, especially in the area of
      scalability on multi-<acronym>CPU</>-socket servers
     </para>
    </listitem>

   </itemizedlist>

   <para>
    The above items are explained in more detail in the sections below.
   </para>

  </sect2>

  <sect2>

  <title>Migration to Version 9.6</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.6 contains a number of changes that may affect compatibility
    with previous releases.  Observe the following incompatibilities:
   </para>

   <itemizedlist>

      <listitem>
<!--
2016-03-10 [53be0b1ad] Provide much better wait information in pg_stat_activity
-->
       <para>
        Improve the <link
        linkend="pg-stat-activity-view"><structname>pg_stat_activity</></link>
        view's information about what a process is waiting for (Amit
        Kapila, Ildus Kurbangaliev)
       </para>

       <para>
        Historically a process has only been shown as waiting if it was
        waiting for a heavyweight lock.  Now waits for lightweight locks
        and buffer pins are also shown in <structname>pg_stat_activity</>.
        Also, the type of lock being waited for is now visible.
        These changes replace the <structfield>waiting</> column with
        <structfield>wait_event_type</> and <structfield>wait_event</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-10-05 [2d87eedc1] to_char(): Do not count negative sign as a digit for tim
-->
       <para>
        In <link
        linkend="functions-formatting-table"><function>to_char()</></>,
        do not count a minus sign (when needed) as part of the field
        width for time-related fields (Bruce Momjian)
       </para>

       <para>
        For example, <literal>to_char('-4 years'::interval, 'YY')</>
        now returns <literal>-04</>, rather than <literal>-4</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-21 [647d87c56] Make extract() do something more reasonable with infinit
-->
       <para>
        Make <link
        linkend="functions-datetime-table"><function>extract()</></> behave
        more reasonably with infinite inputs (Vitaly Burovoy)
       </para>

       <para>
        Historically the <function>extract()</> function just returned
        zero given an infinite timestamp, regardless of the given
        field name.  Make it return <literal>infinity</literal>
        or <literal>-infinity</literal> as appropriate when the
        requested field is one that is monotonically increasing (e.g,
        <literal>year</>, <literal>epoch</>), or <literal>NULL</> when
        it is not (e.g., <literal>day</>, <literal>hour</>).  Also,
        throw the expected error for bad field names.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-05 [0426f349e] Rearrange the handling of error context reports.
This commit is also listed under libpq and psql
-->
       <para>
        Remove PL/pgSQL's <quote>feature</> that suppressed the
        innermost line of <literal>CONTEXT</> for messages emitted by
        <command>RAISE</> commands (Pavel Stehule)
       </para>

       <para>
        This ancient backwards-compatibility hack was agreed to have
        outlived its usefulness.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-29 [61d66c44f] Fix support of digits in email/hostnames.
-->
       <para>
        Fix the default text search parser to allow leading digits
        in <literal>email</> and <literal>host</> tokens (Artur Zakirov)
       </para>

       <para>
        In most cases this will result in few changes in the parsing of
        text.  But if you have data where such addresses occur frequently,
        it may be worth rebuilding dependent <type>tsvector</> columns
        and indexes so that addresses of this form will be found properly
        by text searches.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-04 [1bbd52cb9] Make unaccent handle all diacritics known to Unicode, an
2016-03-16 [9a206d063] Improve script generating unaccent rules
-->
       <para>
        Extend <link linkend="unaccent"><filename>contrib/unaccent</></>'s
        standard <filename>unaccent.rules</> file to handle all diacritics
        known to Unicode, and to expand ligatures correctly (Thomas Munro,
        L&eacute;onard Benedetti)
       </para>

       <para>
        The previous version neglected to convert some less-common letters
        with diacritic marks.  Also, ligatures are now expanded into
        separate letters.  Installations that use this rules file may wish
        to rebuild <type>tsvector</> columns and indexes that depend on the
        result.
       </para>
      </listitem>

      <listitem>
<!--
2015-10-22 [d371bebd3] Remove redundant CREATEUSER/NOCREATEUSER options in CREA
-->
       <para>
        Remove the long-deprecated
        <literal>CREATEUSER</>/<literal>NOCREATEUSER</> options from
        <command>CREATE ROLE</> and allied commands (Tom Lane)
       </para>

       <para>
        <literal>CREATEUSER</> actually meant <literal>SUPERUSER</>,
        for ancient backwards-compatibility reasons.  This has been a
        constant source of confusion for people who (reasonably) expect
        it to mean <literal>CREATEROLE</>.  It has been deprecated for
        ten years now, so fix the problem by removing it.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [293007898] Reserve the "pg_" namespace for roles
2016-05-06 [a89505fd2] Remove various special checks around default roles
2016-05-08 [7df974ee0] Disallow superuser names starting with 'pg_' in initdb
-->
       <para>
        Treat role names beginning with <literal>pg_</> as reserved
        (Stephen Frost)
       </para>

       <para>
        User creation of such role names is now disallowed.  This prevents
        conflicts with built-in roles created by <application>initdb</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-08-07 [d8710f18f] Correct column name in information schema
-->
       <para>
        Change a column name in the
        <structname>information_schema</>.<structname>routines</>
        view from <structfield>result_cast_character_set_name</>
        to <structfield>result_cast_char_set_name</> (Cl&eacute;ment
        Pr&eacute;vost)
       </para>

       <para>
        The SQL:2011 standard specifies the longer name, but that appears
        to be a mistake, because adjacent column names use the shorter
        style, as do other <structname>information_schema</> views.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-08 [d5563d7df] psql: Support multiple -c and -f options, and allow mixi
-->
       <para>
        <application>psql</>'s <option>-c</option> option no longer implies
        <option>--no-psqlrc</option>
        (Pavel Stehule, Catalin Iacob)
       </para>

       <para>
        Write <option>--no-psqlrc</option> (or its
        abbreviation <option>-X</option>) explicitly to obtain the old
        behavior.  Scripts so modified will still work with old
        versions of <application>psql</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-02 [5671aaca8] Improve pg_restore's -t switch to match all types of rel
-->
       <para>
        Improve <application>pg_restore</>'s <option>-t</option> option to
        match all types of relations, not only plain tables (Craig Ringer)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-12 [59a884e98] Change delimiter used for display of NextXID
-->
       <para>
        Change the display format used for <literal>NextXID</> in
        <application>pg_controldata</> and related places (Joe Conway,
        Bruce Momjian)
       </para>

       <para>
        Display epoch-and-transaction-ID values in the format
        <replaceable>number</><literal>:</><replaceable>number</>.
        The previous format
        <replaceable>number</><literal>/</><replaceable>number</> was
        confusingly similar to that used for <acronym>LSN</>s.
       </para>
      </listitem>

      <listitem>
<!--
2016-06-07 [a89b4b1be] Update citext extension for parallel query.
and many others in the same vein
-->
       <para>
        Update extension functions to be marked parallel-safe where
        appropriate (Andreas Karlsson)
       </para>

       <para>
        Many of the standard extensions have been updated to allow their
        functions to be executed within parallel query worker processes.
        These changes will not take effect in
        databases <application>pg_upgrade</>'d from prior versions unless
        you apply <command>ALTER EXTENSION UPDATE</> to each such extension
        (in each database of a cluster).
       </para>
      </listitem>

   </itemizedlist>

  </sect2>

  <sect2>
   <title>Changes</title>

   <para>
    Below you will find a detailed account of the changes between
    <productname>PostgreSQL</productname> 9.6 and the previous major
    release.
   </para>

   <sect3>
    <title>Server</title>

    <sect4>
     <title>Parallel Queries</title>

     <itemizedlist>

      <listitem>
<!--
2015-09-18 [4a4e6893a] Glue layer to connect the executor to the shm_mq mechani
2015-09-23 [a0d9f6e43] Add readfuncs.c support for plan nodes.
2015-09-28 [d1b7c1ffe] Parallel executor support.
2015-09-30 [3bd909b22] Add a Gather executor node.
2015-10-16 [ee7ca559f] Add a C API for parallel heap scans.
2015-10-16 [bfc78d719] Rewrite interaction of parallel mode with parallel execu
2015-10-16 [a53c06a13] Prohibit parallel query when the isolation level is seri
2015-11-02 [1efc7e538] Fix problems with ParamListInfo serialization mechanism.
2015-11-06 [6e71dd7ce] Modify tqueue infrastructure to support transient record
2015-11-11 [f0661c4e8] Make sequential scans parallel-aware.
2015-11-11 [80558c1f5] Generate parallel sequential scan plans in simple cases.
2015-12-09 [b287df70e] Allow EXPLAIN (ANALYZE, VERBOSE) to display per-worker s
2016-01-20 [45be99f8c] Support parallel joins, and make related improvements.
2016-02-03 [69d34408e] Allow parallel custom and foreign scans.
2016-02-07 [a1c1af2a1] Introduce group locking to prevent parallel processes fr
2016-02-07 [7c944bd90] Introduce a new GUC force_parallel_mode for testing purp
2016-02-25 [57a6a72b6] Enable parallelism for prepared statements and extended
2016-02-26 [7bea19d0a] On second thought, disable parallelism for prepared stat
2016-03-21 [e06a38965] Support parallel aggregation.
2016-04-05 [11c8669c0] Add parallel query support functions for assorted aggreg
2016-04-08 [25fe8b5f1] Add a 'parallel_degree' reloption.
2016-04-27 [59eb55127] Fix EXPLAIN VERBOSE output for parallel aggregate.
2016-06-09 [c9ce4a1c6] Eliminate "parallel degree" terminology.
2016-06-16 [75be66464] Invent min_parallel_relation_size GUC to replace a hard-
2016-08-16 [f85b1a841] Disable parallel query by default.
2016-09-15 [72ce78162] Make min_parallel_relation_size's default value platform
-->
       <para>
        Parallel queries (Robert Haas, Amit Kapila, David Rowley,
        many others)
       </para>

       <para>
        With 9.6, <productname>PostgreSQL</> introduces initial support
        for parallel execution of large queries.  Only strictly read-only
        queries where the driving table is accessed via a sequential scan
        can be parallelized.  Hash joins and nested loops can be performed
        in parallel, as can aggregation (for supported aggregates).
        Much remains to be done, but this is already a useful set of
        features.
       </para>

       <para>
        Parallel query execution is not (yet) enabled by default.
        To allow it, set the new configuration
        parameter <xref linkend="guc-max-parallel-workers-per-gather"> to a
        value larger than zero.  Additional control over use of parallelism
        is available through other new configuration parameters
        <xref linkend="guc-force-parallel-mode">,
        <xref linkend="guc-parallel-setup-cost">, <xref
        linkend="guc-parallel-tuple-cost">, and <xref
        linkend="guc-min-parallel-relation-size">.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-16 [7aea8e4f2] Determine whether it's safe to attempt a parallel plan f
-->
       <para>
        Provide infrastructure for marking the parallel-safety status of
        functions (Robert Haas, Amit Kapila)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Indexes</title>

     <itemizedlist>

      <listitem>
<!--
2015-09-02 [30bb26b5e] Allow usage of huge maintenance_work_mem for GIN build.
-->
       <para>
        Allow <link linkend="GIN"><acronym>GIN</></> index builds to
        make effective use of <xref linkend="guc-maintenance-work-mem">
        settings larger than 1 GB (Robert Abraham, Teodor Sigaev)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-07 [e95680832] Add pages deleted from pending list to FSM
2015-09-23 [dc943ad95] Allow autoanalyze to add pages deleted from pending list
-->
       <para>
        Add pages deleted from a GIN index's pending list to the free space
        map immediately
        (Jeff Janes, Teodor Sigaev)
       </para>

       <para>
        This reduces bloat if the table is not vacuumed often.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-28 [7f46eaf03] Add gin_clean_pending_list function to clean up GIN pend
-->
       <para>
        Add <link
        linkend="functions-admin-index"><function>gin_clean_pending_list()</></>
        function to allow manual invocation of pending-list cleanup for a
        GIN index (Jeff Janes)
       </para>

       <para>
        Formerly, such cleanup happened only as a byproduct of vacuuming or
        analyzing the parent table.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-09 [013ebc0a7] Microvacuum for GIST
2015-09-17 [22f519c92] Fix bug introduced by microvacuum for GiST
-->
       <para>
        Improve handling of dead index tuples in <link
        linkend="GiST">GiST</> indexes (Anastasia Lubennikova)
       </para>

       <para>
        Dead index tuples are now marked as such when an index scan notices
        that the corresponding heap tuple is dead.  When inserting tuples,
        marked-dead tuples will be removed if needed to make space on
        the page.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-30 [acdf2a8b3] Introduce SP-GiST operator class over box.
-->
       <para>
        Add an <link linkend="SPGiST">SP-GiST</link> operator class for
        type <type>box</> (Alexander Lebedev)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Sorting</title>

     <itemizedlist>

      <listitem>
<!--
2016-04-08 [071180377] Use quicksort, not replacement selection, for external s
2016-03-17 [0011c0091] Improve memory management for external sorts.
2016-09-06 [96ba40c0f] Guard against possible memory allocation botch in batchm
-->
       <para>
        Improve sorting performance by using quicksort, not replacement
        selection sort, when performing external sort steps (Peter
        Geoghegan)
       </para>

       <para>
        The new approach makes better use of the <acronym>CPU</> cache
        for typical cache sizes and data volumes.  Where necessary,
        the behavior can be adjusted via the new configuration parameter
        <xref linkend="guc-replacement-sort-tuples">.
       </para>
      </listitem>

      <listitem>
<!--
2015-10-09 [0e57b4d8b] Speed up text sorts where the same strings occur multipl
2015-10-20 [5be94a9eb] Be a bit more rigorous about how we cache strcoll and st
-->
       <para>
        Speed up text sorts where the same string occurs multiple times
        (Peter Geoghegan)
       </para>
      </listitem>

      <listitem>
<!--
2015-11-06 [a76ef15d9] Add sort support routine for the UUID data type.
2016-02-03 [b47b4dbf6] Extend sortsupport for text to more opclasses.
2016-02-17 [f1f5ec1ef] Reuse abbreviated keys in ordered [set] aggregates.
-->
       <para>
        Speed up sorting of <type>uuid</>, <type>bytea</>, and
        <type>char(n)</> fields by using <quote>abbreviated</> keys
        (Peter Geoghegan)
       </para>

       <para>
        Support for abbreviated keys has also been
        added to the non-default operator classes <link
        linkend="indexes-opclass"><literal>text_pattern_ops</></>,
        <literal>varchar_pattern_ops</>, and
        <literal>bpchar_pattern_ops</>.  Processing of ordered-set
        aggregates can also now exploit abbreviated keys.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-16 [b648b7034] Speed up CREATE INDEX CONCURRENTLY's TID sort.
-->
       <para>
        Speed up <command>CREATE INDEX CONCURRENTLY</> by treating
        <acronym>TID</>s as 64-bit integers during sorting (Peter
        Geoghegan)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Locking</title>

     <itemizedlist>

      <listitem>
<!--
2015-08-06 [0e141c0fb] Reduce ProcArrayLock contention by removing backends in
2015-09-03 [4aec49899] Assorted code review for recent ProcArrayLock patch.
-->
       <para>
        Reduce contention for the <literal>ProcArrayLock</> (Amit Kapila,
        Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2015-12-15 [6150a1b08] Move buffer I/O and content LWLocks out of the main tran
-->
       <para>
        Improve performance by moving buffer content locks into the buffer
        descriptors (Andres Freund, Simon Riggs)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-10 [48354581a] Allow Pin/UnpinBuffer to operate in a lockfree manner.
-->
       <para>
        Replace shared-buffer header spinlocks with atomic operations to
        improve scalability (Alexander Korotkov, Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-10 [008608b9d] Avoid the use of a separate spinlock to protect a LWLock
-->
       <para>
        Use atomic operations, rather than a spinlock, to protect an
        <literal>LWLock</>'s wait queue (Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-23 [44ca4022f] Partition the freelist for shared dynahash tables.
-->
       <para>
        Partition the shared hash table freelist to reduce contention on
        multi-<acronym>CPU</>-socket servers (Aleksander Alekseev)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-09 [687f2cd7a] Avoid pin scan for replay of XLOG_BTREE_VACUUM
2016-04-03 [3e4b7d879] Avoid pin scan for replay of XLOG_BTREE_VACUUM in all ca
-->
       <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>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Optimizer Statistics</title>

     <itemizedlist>

      <listitem>
<!--
2016-04-01 [be4b4dc75] Omit null rows when applying the Haas-Stokes estimator f
2016-04-01 [3d3bf62f3] Omit null rows when setting the threshold for what's a m
2016-04-04 [391159e03] Partially revert commit 3d3bf62f30200500637b24fdb7b992a9
-->
       <para>
        Improve <command>ANALYZE</>'s estimates for columns with many nulls
        (Tomas Vondra, Alex Shulgin)
       </para>

       <para>
        Previously <command>ANALYZE</> tended to underestimate the number
        of non-<literal>NULL</> distinct values in a column with many
        <literal>NULL</>s, and was also inaccurate in computing the
        most-common values.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-04 [84f9a35e3] Improve estimate of distinct values in estimate_num_grou
-->
       <para>
        Improve planner's estimate of the number of distinct values in
        a query result (Tomas Vondra)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [137805f89] Use Foreign Key relationships to infer multi-column join
2016-06-07 [77ba61080] Revert "Use Foreign Key relationships to infer multi-col
2016-06-18 [100340e2d] Restore foreign-key-aware estimation of join relation si
-->
       <para>
        Use foreign key relationships to infer selectivity for join
        predicates (Tomas Vondra, David Rowley)
       </para>

       <para>
        If a table <literal>t</> has a foreign key restriction, say
        <literal>(a,b) REFERENCES r (x,y)</>, then a <literal>WHERE</>
        condition such as <literal>t.a = r.x AND t.b = r.y</> cannot
        select more than one <literal>r</> row per <literal>t</> row.
        The planner formerly considered these <literal>AND</> conditions
        to be independent and would often drastically misestimate
        selectivity as a result.  Now it compares the <literal>WHERE</>
        conditions to applicable foreign key constraints and produces
        better estimates.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><command>VACUUM</></title>

     <itemizedlist>

      <listitem>
<!--
2016-03-01 [a892234f8] Change the format of the VM fork to add a second bit per
2016-03-08 [77a1d1e79] Department of second thoughts: remove PD_ALL_FROZEN.
2016-03-10 [fd31cd265] Don't vacuum all-frozen pages.
2016-03-11 [7087166a8] pg_upgrade: Convert old visibility map format to new for
2016-06-17 [ede62e56f] Add VACUUM (DISABLE_PAGE_SKIPPING) for emergencies.
2016-07-18 [eca0f1db1] Clear all-frozen visibilitymap status when locking tuple
2016-08-04 [e7caacf73] Fix hard to hit race condition in heapam's tuple locking
-->
       <para>
        Avoid re-vacuuming pages containing only frozen tuples (Masahiko
        Sawada, Robert Haas, Andres Freund)
       </para>

       <para>
        Formerly, anti-wraparound vacuum had to visit every page of
        a table, even pages where there was nothing to do.  Now, pages
        containing only already-frozen tuples are identified in the table's
        visibility map, and can be skipped by vacuum even when doing
        transaction wraparound prevention.  This should greatly reduce the
        cost of maintaining large tables containing mostly-unchanging data.
       </para>

       <para>
        If necessary, vacuum can be forced to process all-frozen
        pages using the new <literal>DISABLE_PAGE_SKIPPING</> option.
        Normally this should never be needed, but it might help in
        recovering from visibility-map corruption.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-30 [e84290823] Avoid useless truncation attempts during VACUUM.
-->
       <para>
        Avoid useless heap-truncation attempts during <command>VACUUM</>
        (Jeff Janes, Tom Lane)
       </para>

       <para>
        This change avoids taking an exclusive table lock in some cases
        where no truncation is possible.  The main benefit comes from
        avoiding unnecessary query cancellations on standby servers.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>General Performance</title>

     <itemizedlist>

      <listitem>
<!--
2016-04-08 [848ef42bb] Add the "snapshot too old" feature
2016-05-06 [2cc41acd8] Fix hash index vs "snapshot too old" problemms
2016-05-06 [7e3da1c47] Mitigate "snapshot too old" performance regression on NU
2016-08-03 [3e2f3c2e4] Prevent "snapshot too old" from trying to return pruned
2016-08-07 [9ee1cf04a] Fix TOAST access failure in RETURNING queries.
-->
       <para>
        Allow old <acronym>MVCC</> snapshots to be invalidated after a
        configurable timeout (Kevin Grittner)
       </para>

       <para>
        Normally, deleted tuples cannot be physically removed by
        vacuuming until the last transaction that could <quote>see</>
        them is gone.  A transaction that stays open for a long
        time can thus cause considerable table bloat because
        space cannot be recycled.  This feature allows setting
        a time-based limit, via the new configuration parameter
        <xref linkend="guc-old-snapshot-threshold">, on how long an
        <acronym>MVCC</> snapshot is guaranteed to be valid.  After that,
        dead tuples are candidates for removal.  A transaction using an
        outdated snapshot will get an error if it attempts to read a page
        that potentially could have contained such data.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-11 [d4c3a156c] Remove GROUP BY columns that are functionally dependent
-->
       <para>
        Ignore <literal>GROUP BY</> columns that are
        functionally dependent on other columns (David Rowley)
       </para>

       <para>
        If a <literal>GROUP BY</> clause includes all columns of a
        non-deferred primary key, as well as other columns of the same
        table, those other columns are redundant and can be dropped
        from the grouping.  This saves computation in many common cases.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-31 [f9aefcb91] Support using index-only scans with partial indexes in m
-->
       <para>
        Allow use of an <link linkend="indexes-index-only-scans">index-only
        scan</link> on a partial index when the index's <literal>WHERE</>
        clause references columns that are not indexed (Tomas Vondra,
        Kyotaro Horiguchi)
       </para>

       <para>
        For example, an index defined by <command>CREATE INDEX tidx_partial
        ON t(b) WHERE a &gt; 0</> can now be used for an index-only scan by
        a query that specifies <literal>WHERE a &gt; 0</> and does not
        otherwise use <literal>a</>.  Previously this was disallowed
        because <literal>a</> is not listed as an index column.
       </para>

      </listitem>

      <listitem>
<!--
2016-03-10 [9cd00c457] Checkpoint sorting and balancing.
-->
       <para>
        Perform checkpoint writes in sorted order (Fabien Coelho,
        Andres Freund)
       </para>

       <para>
        Previously, checkpoints wrote out dirty pages in whatever order
        they happen to appear in shared buffers, which usually is nearly
        random.  That performs poorly, especially on rotating media.
        This change causes checkpoint-driven writes to be done in order
        by file and block number, and to be balanced across tablespaces.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-10 [428b1d6b2] Allow to trigger kernel writeback after a configurable n
2016-04-13 [fa11a09fe] Fix assorted portability issues with using msync() for d
2016-04-24 [8f91d87d4] Fix documentation & config inconsistencies around 428b1d
2016-04-26 [72a98a639] Don't open formally non-existent segments in _mdfd_getse
2016-05-04 [a71248708] Fix transient mdsync() errors of truncated relations due
2016-02-16 [7975c5e0a] Allow the WAL writer to flush WAL at a reduced rate.
2016-06-10 [4bc0f165c] Change default of backend_flush_after GUC to 0 (disabled
-->
       <para>
        Where feasible, trigger kernel writeback after a configurable
        number of writes, to prevent accumulation of dirty data in kernel
        disk buffers (Fabien Coelho, Andres Freund)
       </para>

       <para>
        <productname>PostgreSQL</> writes data to the kernel's disk cache,
        from where it will be flushed to physical storage in due time.
        Many operating systems are not smart about managing this and allow
        large amounts of dirty data to accumulate before deciding to flush
        it all at once, causing long delays for new I/O requests until the
        flushing finishes.
        This change attempts to alleviate this problem by explicitly
        requesting data flushes after a configurable interval.
       </para>

       <para>
        On Linux, <function>sync_file_range()</> is used for this purpose,
        and the feature is on by default on Linux because that function has
        few downsides.  This flushing capability is also available on other
        platforms if they have <function>msync()</>
        or <function>posix_fadvise()</>, but those interfaces have some
        undesirable side-effects so the feature is disabled by default on
        non-Linux platforms.
       </para>

       <para>
        The new configuration parameters <xref
        linkend="guc-backend-flush-after">, <xref
        linkend="guc-bgwriter-flush-after">, <xref
        linkend="guc-checkpoint-flush-after">, and <xref
        linkend="guc-wal-writer-flush-after"> control this behavior.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-04 [804163bc2] Share transition state between different aggregates when
-->
       <para>
        Improve aggregate-function performance by sharing calculations
        across multiple aggregates if they have the same arguments and
        transition functions (David Rowley)
       </para>

       <para>
        For example, <command>SELECT AVG(x), VARIANCE(x) FROM tab</> can use
        a single per-row computation for both aggregates.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-26 [8a7d07018] Speed up HeapTupleSatisfiesMVCC() by replacing the XID-i
-->
       <para>
        Speed up visibility tests for recently-created tuples by checking
        the current transaction's snapshot, not <structname>pg_clog</>, to
        decide if the source transaction should be considered committed
        (Jeff Janes, Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-15 [db76b1efb] Allow SetHintBits() to succeed if the buffer's LSN is ne
-->
       <para>
        Allow tuple hint bits to be set sooner than before (Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-20 [978b2f65a] Speedup 2PC by skipping two phase state files in normal
2016-03-10 [e0694cf9c] Reduce size of two phase file header
-->
       <para>
        Improve performance of short-lived prepared transactions (Stas
        Kelvich, Simon Riggs, Pavan Deolasee)
       </para>

       <para>
        Two-phase commit information is now written only to <acronym>WAL</>
        during <command>PREPARE TRANSACTION</>, and will be read back from
        <acronym>WAL</> during <command>COMMIT PREPARED</> if that happens
        soon thereafter.  A separate state file is created only if the
        pending transaction does not get committed or aborted by the time
        of the next checkpoint.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-08 [25c539233] Improve performance in freeing memory contexts
-->
       <para>
        Improve performance of memory context destruction (Jan Wieck)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-26 [cc988fbb0] Improve ResourceOwners' behavior for large numbers of ow
-->
       <para>
        Improve performance of resource owners with many tracked objects
        (Aleksander Alekseev)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-06 [aa2387e2f] Improve speed of timestamp/time/date output functions.
-->
       <para>
        Improve speed of the output functions for <type>timestamp</>,
        <type>time</>, and <type>date</> data types (David Rowley,
        Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-10 [37c54863c] Rework wait for AccessExclusiveLocks on Hot Standby
-->
       <para>
        Avoid some unnecessary cancellations of hot-standby queries
        during replay of actions that take <literal>AccessExclusive</>
        locks (Jeff Janes)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [719c84c1b] Extend relations multiple blocks at a time to improve sc
-->
       <para>
        Extend relations multiple blocks at a time when there is contention
        for the relation's extension lock (Dilip Kumar)
       </para>

       <para>
        This improves scalability by decreasing contention.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [5364b357f] Increase maximum number of clog buffers.
-->
       <para>
        Increase the number of clog buffers for better scalability (Amit
        Kapila, Andres Freund)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-05 [6c82d8d1f] Further reduce overhead for passing plpgsql variables to
-->
       <para>
        Speed up expression evaluation in <application>PL/pgSQL</> by
        keeping <literal>ParamListInfo</> entries for simple variables
        valid at all times (Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-06 [4f33621f3] Don't set SO_SNDBUF on recent Windows versions that have
-->
       <para>
        Avoid reducing the <literal>SO_SNDBUF</> setting below its default
        on recent Windows versions (Chen Huajun)
       </para>
      </listitem>

      <listitem>
<!--
2016-08-17 [9b33c7e80] Disable update_process_title by default on Windows
-->
       <para>
        Disable <xref linkend="guc-update-process-title"> by default on
        Windows (Takayuki Tsunakawa)
       </para>

       <para>
        The overhead of updating the process title is much larger on Windows
        than most other platforms, and it is also less useful to do it since
        most Windows users do not have tools that can display process titles.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Monitoring</title>

     <itemizedlist>

      <listitem>
<!--
2016-03-15 [c16dc1aca] Add simple VACUUM progress reporting.
-->
       <para>
        Add <link
        linkend="pg-stat-progress-vacuum-view"><structname>pg_stat_progress_vacuum</></link>
        system view to provide progress reporting for <command>VACUUM</>
        operations (Amit Langote, Robert Haas, Vinayak Pokale, Rahila Syed)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-05 [dc7d70ea0] Expose control file data via SQL accessible functions.
-->
       <para>
        Add <link
        linkend="functions-controldata"><function>pg_control_system()</></>,
        <function>pg_control_checkpoint()</>,
        <function>pg_control_recovery()</>, and
        <function>pg_control_init()</> functions to expose fields of
        <filename>pg_control</> to <acronym>SQL</> (Joe Conway, Michael
        Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-17 [a5c43b886] Add new system view, pg_config
-->
       <para>
        Add <link linkend="view-pg-config"><structname>pg_config</></link>
        system view (Joe Conway)
       </para>

       <para>
        This view exposes the same information available from
        the <application>pg_config</> command-line utility,
        namely assorted compile-time configuration information for
        <productname>PostgreSQL</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-10 [3f811c2d6] Add confirmed_flush column to pg_replication_slots.
-->
       <para>
        Add a <structfield>confirmed_flush_lsn</> column to the <link
        linkend="view-pg-replication-slots"><structname>pg_replication_slots</></link>
        system view (Marko Tiikkaja)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-07 [b1a9bad9e] pgstat: add WAL receiver status view & SRF
2016-06-29 [9ed551e0a] Add conninfo to pg_stat_wal_receiver
2016-07-07 [60d50769b] Rename pg_stat_wal_receiver.conn_info to conninfo.
-->
       <para>
        Add <link
        linkend="pg-stat-wal-receiver-view"><structname>pg_stat_wal_receiver</></link>
        system view to provide information about the state of a hot-standby
        server's <acronym>WAL</> receiver process (Michael Paquier)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-22 [52f5d578d] Create a function to reliably identify which sessions bl
-->
       <para>
        Add <link
        linkend="functions-info-session-table"><function>pg_blocking_pids()</></>
        function to reliably identify which sessions block which others
        (Tom Lane)
       </para>

       <para>
        This function returns an array of the process IDs of any
        sessions that are blocking the session with the given process ID.
        Historically users have obtained such information using a self-join
        on the <structname>pg_locks</> view.  However, it is unreasonably
        tedious to do it that way with any modicum of correctness, and
        the addition of parallel queries has made the old approach entirely
        impractical, since locks might be held or awaited by child worker
        processes rather than the session's main process.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-12 [e63bb4549] Add new user fn pg_current_xlog_flush_location()
-->
       <para>
        Add function <link
        linkend="functions-admin-backup-table"><function>pg_current_xlog_flush_location()</></>
        to expose the current transaction log flush location (Tomas Vondra)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-17 [a04bb65f7] Add new function pg_notification_queue_usage.
-->
       <para>
        Add function <link
        linkend="functions-info-session-table"><function>pg_notification_queue_usage()</></>
        to report how full the <command>NOTIFY</> queue is (Brendan Jurd)
       </para>
      </listitem>

      <listitem>
<!--
2015-08-25 [7b5ef8f2d] Limit the verbosity of memory context statistics dumps.
-->
       <para>
        Limit the verbosity of memory context statistics dumps (Tom Lane)
       </para>

       <para>
        The memory usage dump that is output to the postmaster log during an
        out-of-memory failure now summarizes statistics when there are a
        large number of memory contexts, rather than possibly generating
        a very large report.  There is also a <quote>grand total</>
        summary line now.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><acronym>Authentication</></title>

     <itemizedlist>

      <listitem>
<!--
2016-04-08 [34c33a1f0] Add BSD authentication method.
-->
       <para>
        Add a <link linkend="auth-bsd"><acronym>BSD</> authentication
        method</link> to allow use of
        the <systemitem class="osname">BSD</> Authentication service for
        <productname>PostgreSQL</> client authentication (Marisa Emerson)
       </para>

       <para>
        BSD Authentication is currently only available on <systemitem
        class="osname">OpenBSD</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [2f1d2b7a7] Set PAM_RHOST item for PAM authentication
-->
       <para>
        When using <link linkend="auth-pam"><acronym>PAM</>
        authentication</link>, provide the client IP address or host name
        to <acronym>PAM</> modules via the <literal>PAM_RHOST</> item
        (Grzegorz Sampolski)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-07 [5e0b5dcab] Provide more detail in postmaster log for password authe
-->
       <para>
        Provide detail in the postmaster log for more types of password
        authentication failure (Tom Lane)
       </para>

       <para>
        All ordinarily-reachable password authentication failure cases
        should now provide specific <literal>DETAIL</> fields in the log.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-06 [643beffe8] Support RADIUS passwords up to 128 characters
-->
       <para>
        Support <link linkend="auth-radius"><acronym>RADIUS</> passwords</>
        up to 128 characters long (Marko Tiikkaja)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [35e2e357c] Add authentication parameters compat_realm and upn_usena
-->
       <para>
        Add new <link linkend="sspi-auth"><acronym>SSPI</>
        authentication</link> parameters
        <varname>compat_realm</> and <varname>upn_username</> to control
        whether <productname>NetBIOS</> or <productname>Kerberos</>
        realm names and user names are used during <acronym>SSPI</>
        authentication (Christian Ullrich)
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Server Configuration</title>

     <itemizedlist>

      <listitem>
<!--
2016-03-16 [c6dda1f48] Add idle_in_transaction_session_timeout.
-->
       <para>
        Allow sessions to be terminated automatically if they are in
        idle-in-transaction state for too long (Vik Fearing)
       </para>

       <para>
        This behavior is controlled by the new configuration parameter
        <xref linkend="guc-idle-in-transaction-session-timeout">.  It can
        be useful to prevent forgotten transactions from holding locks
        or preventing vacuum cleanup for too long.
       </para>
      </listitem>

      <listitem>
<!--
2016-09-11 [f2dba881a] Raise max setting of checkpoint_timeout to 1d
-->
       <para>
        Raise the maximum allowed value
        of <xref linkend="guc-checkpoint-timeout"> to 24 hours (Simon Riggs)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-08 [1aba62ec6] Allow per-tablespace effective_io_concurrency
-->
       <para>
        Allow <varname>effective_io_concurrency</> to be set per-tablespace
        to support cases where different tablespaces have different I/O
        characteristics (Julien Rouhaud)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-07 [f828654e1] Add log_line_prefix option 'n' for Unix epoch.
2015-09-07 [b1e1862a1] Coordinate log_line_prefix options 'm' and 'n' to share
-->
       <para>
        Add <xref linkend="guc-log-line-prefix"> option <literal>%n</> to
        print the current time in Unix epoch form, with milliseconds (Tomas
        Vondra, Jeff Davis)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-16 [f4c454e9b] Add syslog_sequence_numbers parameter
2016-03-16 [fc201dfd9] Add syslog_split_messages parameter
-->
       <para>
        Add <xref linkend="guc-syslog-sequence-numbers"> and <xref
        linkend="guc-syslog-split-messages"> configuration parameters
        to provide more control over the message format when logging to
        <systemitem>syslog</> (Peter Eisentraut)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-18 [b555ed810] Merge wal_level "archive" and "hot_standby" into new nam
-->
       <para>
        Merge the <literal>archive</> and <literal>hot_standby</> values
        of the <xref linkend="guc-wal-level"> configuration parameter
        into a single new value <literal>replica</> (Peter Eisentraut)
       </para>

       <para>
        Making a distinction between these settings is no longer useful,
        and merging them is a step towards a planned future simplification
        of replication setup.  The old names are still accepted but are
        converted to <literal>replica</> internally.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-02 [7d17e683f] Add support for systemd service notifications
-->
       <para>
        Add configure option <option>--with-systemd</> to enable
        calling <function>sd_notify()</> at server start and stop (Peter
        Eisentraut)
       </para>

       <para>
        This allows the use of <application>systemd</> service units of
        type <literal>notify</>, which greatly simplifies the management
        of <productname>PostgreSQL</> under <application>systemd</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-19 [9a83564c5] Allow SSL server key file to have group read access if o
-->
       <para>
        Allow the server's <acronym>SSL</> key file to have group read
        access if it is owned by <literal>root</> (Christoph Berg)
       </para>

       <para>
        Formerly, we insisted the key file be owned by the
        user running the <productname>PostgreSQL</> server, but
        that is inconvenient on some systems (such as <systemitem
        class="osname">Debian</>) that are configured to manage
        certificates centrally.  Therefore, allow the case where the key
        file is owned by <literal>root</> and has group read access.
        It is up to the operating system administrator to ensure that
        the group does not include any untrusted users.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Reliability</title>

     <itemizedlist>

      <listitem>
<!--
2015-11-12 [ac1d7945f] Make idle backends exit if the postmaster dies.
-->
       <para>
        Force backends to exit if the postmaster dies (Rajeev Rastogi,
        Robert Haas)
       </para>

       <para>
        Under normal circumstances the postmaster should always outlive
        its child processes.  If for some reason the postmaster dies,
        force backend sessions to exit with an error.  Formerly, existing
        backends would continue to run until their clients disconnect,
        but that is unsafe and inefficient.  It also prevents a new
        postmaster from being started until the last old backend has
        exited.  Backends will detect postmaster death when waiting for
        client I/O, so the exit will not be instantaneous, but it should
        happen no later than the end of the current query.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-07 [fcff8a575] Detect SSI conflicts before reporting constraint violati
-->
       <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>
<!--
XXX this is pending backpatch, may need to remove
2016-04-26 [c6ff84b06] Emit invalidations to standby for transactions without x
-->
       <para>
        Ensure that invalidation messages are recorded in <acronym>WAL</>
        even when issued by a transaction that has no <acronym>XID</>
        assigned (Andres Freund)
       </para>

       <para>
        This fixes some corner cases in which transactions on standby
        servers failed to notice changes, such as new indexes.
       </para>
      </listitem>

      <listitem>
<!--
XXX this is pending backpatch, may need to remove
2016-04-28 [e2c79e14d] Prevent multiple cleanup process for pending list in GIN
-->
       <para>
        Prevent multiple processes from trying to clean a <acronym>GIN</>
        index's pending list concurrently (Teodor Sigaev, Jeff Janes)
       </para>

       <para>
        This had been intentionally allowed, but it causes race conditions
        that can result in vacuum missing index entries it needs to delete.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Replication and Recovery</title>

     <itemizedlist>

      <listitem>
<!--
2016-04-06 [989be0810] Support multiple synchronous standby servers.
2016-04-27 [4c804fbdf] Clean up parsing of synchronous_standby_names GUC variab
2016-04-30 [17d5db352] Remove warning about num_sync being too large in synchro
-->
       <para>
        Allow synchronous replication to support multiple simultaneous
        synchronous standby servers, not just one (Masahiko Sawada,
        Beena Emerson, Michael Paquier, Fujii Masao, Kyotaro Horiguchi)
       </para>

       <para>
        The number of standby servers that must acknowledge a commit
        before it is considered complete is now configurable as part of
        the <xref linkend="guc-synchronous-standby-names"> parameter.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-29 [314cbfc5d] Add new replication mode synchronous_commit = 'remote_ap
-->
       <para>
        Add new setting <literal>remote_apply</> for configuration
        parameter <xref linkend="guc-synchronous-commit"> (Thomas Munro)
       </para>

       <para>
        In this mode, the master waits for the transaction to be
        <emphasis>applied</> on the standby server, not just written
        to disk.  That means that you can count on a transaction started
        on the standby to see all commits previously acknowledged by
        the master.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-11 [6fcd88511] Allow pg_create_physical_replication_slot() to reserve W
2015-09-06 [c314ead5b] Add ability to reserve WAL upon slot creation via replic
-->
       <para>
        Add a feature to the replication
        protocol, and a corresponding option to <link
        linkend="functions-replication-table"><function>pg_create_physical_replication_slot()</></>,
        to allow reserving <acronym>WAL</> immediately when creating a
        replication slot (Gurjeet Singh, Michael Paquier)
       </para>

       <para>
        This allows the creation of a replication slot to guarantee
        that all the <acronym>WAL</> needed for a base backup will be
        available.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-28 [0dc848b03] pg_basebackup: Add -slot option
-->
       <para>
        Add a <option>--slot</option> option to
        <link linkend="app-pgbasebackup"><application>pg_basebackup</></>
        (Peter Eisentraut)
       </para>

       <para>
        This lets <application>pg_basebackup</> use a replication
        slot defined for <acronym>WAL</> streaming.  After the base
        backup completes, selecting the same slot for regular streaming
        replication allows seamless startup of the new standby server.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-05 [711768546] Implement backup API functions for non-exclusive backups
2016-07-11 [87d84d67b] Fix start WAL filename for concurrent backups from stand
-->
       <para>
        Extend <link
        linkend="functions-admin-backup-table"><function>pg_start_backup()</></>
        and <function>pg_stop_backup()</> to support non-exclusive backups
        (Magnus Hagander)
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Queries</title>

     <itemizedlist>

      <listitem>
<!--
2016-07-26 [d8411a6c8] Allow functions that return sets of tuples to return sim
-->
       <para>
        Allow functions that return sets of tuples to return simple
        <literal>NULL</>s (Andrew Gierth, Tom Lane)
       </para>

       <para>
        In the context of <literal>SELECT FROM function(...)</>, a function
        that returned a set of composite values was previously not allowed
        to return a plain <literal>NULL</> value as part of the set.
        Now that is allowed and interpreted as a row of <literal>NULL</>s.
        This avoids corner-case errors with, for example, unnesting an
        array of composite values.
       </para>
      </listitem>

      <listitem>
<!--
2016-08-03 [a3c7a993d] Make INSERT-from-multiple-VALUES-rows handle targetlist
-->
       <para>
        Fully support array subscripts and field selections in the
        target column list of an <command>INSERT</> with multiple
        <literal>VALUES</> rows (Tom Lane)
       </para>

       <para>
        Previously, such cases failed if the same target column was
        mentioned more than once, e.g., <literal>INSERT INTO tab (x[1],
        x[2]) VALUES (...)</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-11 [9118d03a8] When appropriate, postpone SELECT output expressions til
2016-03-25 [d543170f2] Don't split up SRFs when choosing to postpone SELECT out
-->
       <para>
        When appropriate, postpone evaluation of <command>SELECT</>
        output expressions until after an <literal>ORDER BY</> sort
        (Konstantin Knizhnik)
       </para>

       <para>
        This change ensures that volatile or expensive functions in the
        output list are executed in the order suggested by <literal>ORDER
        BY</>, and that they are not evaluated more times than required
        when there is a <literal>LIMIT</> clause.  Previously, these
        properties held if the ordering was performed by an index scan or
        pre-merge-join sort, but not if it was performed by a top-level
        sort.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-12 [23a27b039] Widen query numbers-of-tuples-processed counters to uint
2016-03-14 [74a379b98] Use repalloc_huge() to enlarge a SPITupleTable's tuple p
-->
       <para>
        Widen counters recording the number of tuples processed to 64 bits
        (Andreas Scherbaum)
       </para>

       <para>
        This change allows command tags, e.g., <command>SELECT</>, to
        correctly report tuple counts larger than 4 billion.  This also
        applies to PL/pgSQL's <command>GET DIAGNOSTICS ... ROW_COUNT</>
        command.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-28 [8d32717b6] Avoid doing encoding conversions by double-conversion vi
-->
       <para>
        Avoid doing encoding conversions by converting through the
        <literal>MULE_INTERNAL</> encoding (Tom Lane)
       </para>

       <para>
        Previously, many conversions for Cyrillic and Central
        European single-byte encodings were done by converting to a
        related <literal>MULE_INTERNAL</> coding scheme and then to the
        destination encoding.  Aside from being inefficient, this meant
        that when the conversion encountered an untranslatable character,
        the error message would confusingly complain about failure to
        convert to or from <literal>MULE_INTERNAL</>, rather than the
        user-visible encoding.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-28 [fbe5a3fb7] Only try to push down foreign joins if the user mapping
2016-07-15 [45639a052] Avoid invalidating all foreign-join cached plans when us
-->
       <para>
        Consider performing joins of foreign tables remotely only when the
        tables will be accessed under the same role ID (Shigeru Hanada,
        Ashutosh Bapat, Etsuro Fujita)
       </para>

       <para>
        Previously, the foreign join pushdown infrastructure left the
        question of security entirely up to individual foreign data
        wrappers, but that made it too easy for an <acronym>FDW</> to
        inadvertently create subtle security holes.  So, make it the core
        code's job to determine which role ID will access each table,
        and do not attempt join pushdown unless the role is the same for
        all relevant relations.
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Utility Commands</title>

     <itemizedlist>

      <listitem>
<!--
2015-11-27 [92e38182d] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)
-->
       <para>
        Allow <command>COPY</> to copy the output of an
        <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</>
        ... <literal>RETURNING</> query (Marko Tiikkaja)
       </para>

       <para>
        Previously, an intermediate <acronym>CTE</> had to be written to
        get this result.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-05 [f2fcad27d] Support ALTER THING .. DEPENDS ON EXTENSION
-->
       <para>
        Introduce <command>ALTER <replaceable>object</> DEPENDS ON
        EXTENSION</command> (Abhijit Menon-Sen)
       </para>

       <para>
        This command allows a database object to be marked as depending
        on an extension, so that it will be dropped automatically if
        the extension is dropped (without needing <literal>CASCADE</>).
        However, the object is not part of the extension, and thus will
        be dumped separately by <application>pg_dump</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-19 [bc4996e61] Make ALTER .. SET SCHEMA do nothing, instead of throwing
-->
       <para>
        Make <command>ALTER <replaceable>object</> SET SCHEMA</> do nothing
        when the object is already in the requested schema, rather than
        throwing an error as it historically has for most object types
        (Marti Raudsepp)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-14 [321eed5f0] Add ALTER OPERATOR command, for changing selectivity est
2015-12-31 [0dab5ef39] Fix ALTER OPERATOR to update dependencies properly.
-->
       <para>
        Add options to <command>ALTER OPERATOR</command> to allow changing
        the selectivity functions associated with an existing operator
        (Yury Zhuravlev)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-29 [2cd40adb8] Add IF NOT EXISTS processing to ALTER TABLE ADD COLUMN
-->
       <para>
        Add an <option>IF NOT EXISTS</> option to <command>ALTER TABLE
        ADD COLUMN</> (Fabr&iacute;zio de Royes Mello)
       </para>
      </listitem>

      <listitem>
<!--
2015-08-14 [47167b790] Reduce lock levels for ALTER TABLE SET autovacuum storag
2016-03-10 [fcb4bfddb] Reduce lock level for altering fillfactor
-->
       <para>
        Reduce the lock strength needed by <command>ALTER TABLE</>
        when setting fillfactor and autovacuum-related relation options
        (Fabr&iacute;zio de Royes Mello, Simon Riggs)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-23 [473b93287] Support CREATE ACCESS METHOD
-->
       <para>
        Introduce <link linkend="sql-create-access-method"><command>CREATE
        ACCESS METHOD</></> to allow extensions to create index access
        methods (Alexander Korotkov, Petr Jel&iacute;nek)
       </para>
      </listitem>

      <listitem>
<!--
2015-10-03 [b67aaf21e] Add CASCADE support for CREATE EXTENSION.
-->
       <para>
        Add a <literal>CASCADE</> option to <command>CREATE
        EXTENSION</command> to automatically create any extensions the
        requested one depends on (Petr Jel&iacute;nek)
       </para>
      </listitem>

      <listitem>
<!--
2015-10-05 [b943f502b] Have CREATE TABLE LIKE add OID column if any LIKEd table
-->
       <para>
        Make <command>CREATE TABLE ... LIKE</> include an <type>OID</>
        column if any source table has one (Bruce Momjian)
       </para>
      </listitem>

      <listitem>
<!--
2015-12-16 [f27a6b15e] Mark CHECK constraints declared NOT VALID valid if creat
-->
       <para>
        If a <literal>CHECK</> constraint is declared <literal>NOT VALID</>
        in a table creation command, automatically mark it as valid
        (Amit Langote, Amul Sul)
       </para>

       <para>
        This is safe because the table has no existing rows.  This matches
        the longstanding behavior of <literal>FOREIGN KEY</> constraints.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-25 [c94959d41] Fix DROP OPERATOR to reset oprcom/oprnegate links to the
-->
       <para>
        Fix <command>DROP OPERATOR</> to clear
        <structname>pg_operator</>.<structfield>oprcom</> and
        <structname>pg_operator</>.<structfield>oprnegate</> links to
        the dropped operator (Roma Sokolov)
       </para>

       <para>
        Formerly such links were left as-is, which could pose a problem
        in the somewhat unlikely event that the dropped operator's
        <type>OID</> was reused for another operator.
       </para>
      </listitem>

      <listitem>
<!--
2016-07-11 [4d042999f] Print a given subplan only once in EXPLAIN.
-->
       <para>
        Do not show the same subplan twice in <command>EXPLAIN</> output
        (Tom Lane)
       </para>

       <para>
        In certain cases, typically involving SubPlan nodes in index
        conditions, <command>EXPLAIN</> would print data for the same
        subplan twice.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-16 [c34df8a00] Disallow creation of indexes on system columns (except f
-->
       <para>
        Disallow creation of indexes on system columns, except for
        <type>OID</> columns (David Rowley)
       </para>

       <para>
        Such indexes were never considered supported, and would very
        possibly misbehave since the system might change the system-column
        fields of a tuple without updating indexes.  However, previously
        there were no error checks to prevent them from being created.
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Permissions Management</title>

    <itemizedlist>

      <listitem>
<!--
2016-04-06 [1574783b4] Use GRANT system to manage access to sensitive functions
-->
       <para>
        Use the privilege system to manage access to sensitive functions
        (Stephen Frost)
       </para>

       <para>
        Formerly, many security-sensitive functions contained hard-wired
        checks that would throw an error if they were called by a
        non-superuser.  This forced the use of superuser roles for
        some relatively pedestrian tasks.  The hard-wired error checks
        are now gone in favor of making <application>initdb</> revoke the
        default public <literal>EXECUTE</> privilege on these functions.
        This allows installations to choose to grant usage of such
        functions to trusted roles that do not need all superuser
        privileges.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [7a542700d] Create default roles
-->
       <para>
        Create some <link linkend="default-roles">built-in roles</link>
        that can be used to grant access to what were previously
        superuser-only functions (Stephen Frost)
       </para>

       <para>
        Currently the only such role is <literal>pg_signal_backend</>,
        but more are expected to be added in future.
       </para>
      </listitem>

    </itemizedlist>

   </sect3>

   <sect3>
    <title>Data Types</title>

    <itemizedlist>

      <listitem>
<!--
2016-04-07 [bb140506d] Phrase full text search.
2016-06-27 [028350f61] Make exact distance match for FTS phrase operator
2016-06-27 [3dbbd0f02] Do not fallback to AND for FTS phrase operator.
2016-06-27 [6734a1cac] Change predecence of phrase operator.
-->
       <para>
        Improve <link linkend="textsearch">full-text search</> to support
        searching for phrases, that is, lexemes appearing adjacent to each
        other in a specific order, or with a specified distance between
        them (Teodor Sigaev, Oleg Bartunov, Dmitry Ivanov)
       </para>

       <para>
        A phrase-search query can be specified in <type>tsquery</>
        input using the new operators <literal>&lt;-&gt;</> and
        <literal>&lt;<replaceable>N</>&gt;</literal>.  The former means
        that the lexemes before and after it must appear adjacent to
        each other in that order.  The latter means they must be exactly
        <replaceable>N</> lexemes apart.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-22 [6efbded6e] Allow omitting one or both boundaries in an array slice
-->
       <para>
        Allow omitting one or both boundaries in an array slice specifier,
        e.g., <literal>array_col[3:]</> (Yury Zhuravlev)
       </para>

       <para>
        Omitted boundaries are taken as the upper or lower limit of the
        corresponding array subscript.  This allows simpler specification
        for many common use-cases.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-16 [a70e13a39] Be more careful about out-of-range dates and timestamps.
-->
       <para>
        Be more careful about out-of-range dates and timestamps (Vitaly
        Burovoy)
       </para>

       <para>
        This change prevents unexpected out-of-range errors for
        <type>timestamp with time zone</> values very close to the
        implementation limits.  Previously, the <quote>same</> value might
        be accepted or not depending on the <varname>timezone</> setting,
        meaning that a dump and reload could fail on a value that had been
        accepted when presented.  Now the limits are enforced according
        to the equivalent <acronym>UTC</> time, not local time, so as to
        be independent of <varname>timezone</>.
       </para>

       <para>
        Also, <productname>PostgreSQL</> is now more careful to detect
        overflow in operations that compute new date or timestamp values,
        such as <type>date</> <literal>+</> <type>integer</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-30 [50861cd68] Improve portability of I/O behavior for the geometric ty
-->
       <para>
        For geometric data types, make sure <literal>infinity</> and
        <literal>NaN</> component values are treated consistently during
        input and output (Tom Lane)
       </para>

       <para>
        Such values will now always print the same as they would in
        a simple <type>float8</> column, and be accepted the same way
        on input.  Previously the behavior was platform-dependent.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-04 [d78a7d9c7] Improve support of Hunspell in ispell dictionary.
2016-03-11 [8829af47e] Fix merge affixes for numeric ones
2016-03-17 [f4ceed6ce] Improve support of Hunspell
-->
       <para>
        Upgrade
        the <link linkend="textsearch-ispell-dictionary"><literal>ispell</></>
        dictionary type to handle modern <productname>Hunspell</> files and
        support more languages (Artur Zakirov)
       </para>
      </listitem>

      <listitem>
<!--
2015-10-30 [12c9a0400] Implement lookbehind constraints in our regular-expressi
-->
       <para>
        Implement look-behind constraints
        in <link linkend="functions-posix-regexp">regular expressions</>
        (Tom Lane)
       </para>

       <para>
        A look-behind constraint is like a lookahead constraint in that it
        consumes no text; but it checks for existence (or nonexistence)
        of a match ending at the current point in the string, rather
        than one starting at the current point.  Similar features exist
        in many other regular-expression engines.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-16 [b44d92b67] Sync regex code with Tcl 8.6.4.
-->
       <para>
        In regular expressions, if an apparent three-digit octal escape
        <literal>\</><replaceable>nnn</> would exceed 377 (255 decimal),
        assume it is a two-digit octal escape instead (Tom Lane)
       </para>

       <para>
        This makes the behavior match current <application>Tcl</> releases.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-07 [c5e86ea93] Add "xid <> xid" and "xid <> int4" operators.
-->
       <para>
        Add transaction ID operators <type>xid</> <literal>&lt;&gt;</>
        <type>xid</> and <type>xid</> <literal>&lt;&gt;</> <type>int4</>,
        for consistency with the corresponding equality operators
        (Michael Paquier)
       </para>
      </listitem>

    </itemizedlist>

   </sect3>

   <sect3>
    <title>Functions</title>

     <itemizedlist>

      <listitem>
<!--
2016-04-06 [0b62fd036] Add jsonb_insert
-->
       <para>
        Add <link
        linkend="functions-json-processing-table"><function>jsonb_insert()</></>
        function to insert a new element into a <type>jsonb</> array,
        or a not-previously-existing key into a <type>jsonb</> object
        (Dmitry Dolgov)
       </para>
      </listitem>

      <listitem>
<!--
2015-11-14 [7d9a4737c] Improve type numeric's calculations for ln(), log(), exp
2016-05-05 [18a02ad2a] Fix corner-case loss of precision in numeric pow() calcu
-->
       <para>
        Improve the accuracy of the <function>ln()</>, <function>log()</>,
        <function>exp()</>, and <function>pow()</> functions for type
        <type>numeric</> (Dean Rasheed)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-05 [abb173392] Add scale(numeric)
-->
       <para>
        Add a <link
        linkend="functions-math-func-table"><function>scale(numeric)</></>
        function to extract the display scale of a <type>numeric</> value
        (Marko Tiikkaja)
       </para>
      </listitem>

      <listitem>
<!--
2016-01-22 [e1bd684a3] Add trigonometric functions that work in degrees.
-->
       <para>
        Add trigonometric functions that work in degrees (Dean Rasheed)
       </para>

       <para>
        For example, <link
        linkend="functions-math-trig-table"><function>sind()</></>
        measures its argument in degrees, whereas <function>sin()</>
        measures in radians.  These functions go to some lengths to
        deliver exact results for values where an exact result can be
        expected, for instance <literal>sind(30) = 0.5</literal>.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-22 [fd5200c3d] Improve cross-platform consistency of Inf/NaN handling i
-->
       <para>
        Ensure that trigonometric functions handle <literal>infinity</>
        and <literal>NaN</> inputs per the <acronym>POSIX</> standard
        (Dean Rasheed)
       </para>

       <para>
        The <acronym>POSIX</> standard says that these functions should
        return <literal>NaN</> for <literal>NaN</> input, and should throw
        an error for out-of-range inputs including <literal>infinity</>.
        Previously our behavior varied across platforms.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-29 [e511d878f] Allow to_timestamp(float8) to convert float infinity to
-->
       <para>
        Make <link
        linkend="functions-datetime-table"><function>to_timestamp(float8)</></>
        convert float <literal>infinity</> to
        timestamp <literal>infinity</> (Vitaly Burovoy)
       </para>

       <para>
        Formerly it just failed on an infinite input.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-11 [6943a946c] Tsvector editing functions
2016-05-05 [0b9a23443] Rename tsvector delete() to ts_delete(), and filter() to
-->
       <para>
        Add new functions for <type>tsvector</> data (Stas Kelvich)
       </para>

       <para>
        The new functions are <link
        linkend="textsearch-functions-table"><function>ts_delete()</></>,
        <function>ts_filter()</>, <function>unnest()</>,
        <function>tsvector_to_array()</>, <function>array_to_tsvector()</>,
        and a variant of <function>setweight()</> that sets the weight
        only for specified lexeme(s).
       </para>
      </listitem>

      <listitem>
<!--
2015-09-17 [9acb9007d] Fix oversight in tsearch type check
-->
       <para>
        Allow <link linkend="textsearch-statistics"><function>ts_stat()</></>
        and <link linkend="textsearch-update-triggers"><function>tsvector_update_trigger()</></>
        to operate on values that are of types binary-compatible with the
        expected argument type, not just exactly that type; for example
        allow <type>citext</> where <type>text</> is expected (Teodor
        Sigaev)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-04 [6819514fc] Add num_nulls() and num_nonnulls() to count NULL argumen
-->
       <para>
        Add variadic functions <link
        linkend="functions-comparison-func-table"><function>num_nulls()</></>
        and <function>num_nonnulls()</> that count the number of their
        arguments that are null or non-null (Marko Tiikkaja)
       </para>

       <para>
        An example usage is <literal>CHECK(num_nonnulls(a,b,c) = 1)</>
        which asserts that exactly one of a,b,c is not <literal>NULL</>.
        These functions can also be used to count the number of null or
        nonnull elements in an array.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-18 [3187d6de0] Introduce parse_ident()
-->
       <para>
        Add function <link
        linkend="functions-string-other"><function>parse_ident()</></>
        to split a qualified, possibly quoted <acronym>SQL</> identifier
        into its parts (Pavel Stehule)
       </para>
      </listitem>

      <listitem>
<!--
2015-10-05 [28b3a3d41] to_number():  allow 'V' to divide by 10^(the number of d
-->
       <para>
        In <link
        linkend="functions-formatting-table"><function>to_number()</></>,
        interpret a <literal>V</> format code as dividing by 10 to the
        power of the number of digits following <literal>V</> (Bruce
        Momjian)
       </para>

       <para>
        This makes it operate in an inverse fashion to
        <function>to_char()</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-05 [ea0d494da] Make the to_reg*() functions accept text not cstring.
-->
       <para>
        Make the <link
        linkend="functions-info-catalog-table"><function>to_reg*()</></>
        functions accept type <type>text</> not <type>cstring</>
        (Petr Korobeinikov)
       </para>

       <para>
        This avoids the need to write an explicit cast in most cases
        where the argument is not a simple literal constant.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-20 [53874c522] Add pg_size_bytes() to parse human-readable size strings
-->
       <para>
        Add <link
        linkend="functions-admin-dbsize"><function>pg_size_bytes()</></>
        function to convert human-readable size strings to numbers (Pavel
        Stehule, Vitaly Burovoy, Dean Rasheed)
       </para>

       <para>
        This function converts strings like those produced by
        <function>pg_size_pretty()</> into bytes.  An example
        usage is <literal>SELECT oid::regclass FROM pg_class WHERE
        pg_total_relation_size(oid) &gt; pg_size_bytes('10 GB')</>.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-06 [8a1fab36a] pg_size_pretty: Format negative values similar to positi
-->
       <para>
        In <link
        linkend="functions-admin-dbsize"><function>pg_size_pretty()</></>,
        format negative numbers similarly to positive ones (Adrian
        Vondendriesch)
       </para>

       <para>
        Previously, negative numbers were never abbreviated, just printed
        in bytes.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-02 [10fb48d66] Add an optional missing_ok argument to SQL function curr
-->
       <para>
        Add an optional <replaceable>missing_ok</> argument to the <link
        linkend="functions-admin-set-table"><function>current_setting()</></>
        function (David Christensen)
       </para>

       <para>
        This allows avoiding an error for an unrecognized parameter
        name, instead returning a <literal>NULL</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-07-26 [976b24fb4] Change various deparsing functions to return NULL for in
2016-07-29 [3153b1a52] Eliminate a few more user-visible "cache lookup failed"
2016-08-07 [8a8c6b538] Fix crash when pg_get_viewdef_name_ext() is passed a non
-->
       <para>
        Change various catalog-inspection functions to return
        <literal>NULL</> for invalid input (Michael Paquier)
       </para>

       <para>
        <link
        linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></>
        now returns <literal>NULL</> if given an invalid view <type>OID</>,
        and several similar functions likewise return <literal>NULL</> for
        bad input.  Previously, such cases usually led to <quote>cache
        lookup failed</> errors, which are not meant to occur in
        user-facing cases.
       </para>
      </listitem>

      <listitem>
<!--
2016-08-02 [dd5eb805d] Remove unused arguments from pg_replication_origin_xact_
-->
       <para>
        Fix <link
        linkend="pg-replication-origin-xact-reset"><function>pg_replication_origin_xact_reset()</></>
        to not have any arguments (Fujii Masao)
       </para>

       <para>
        The documentation said that it has no arguments, and the C code did
        not expect any arguments, but the entry in <structname>pg_proc</>
        mistakenly specified two arguments.
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Server-Side Languages</title>

    <itemizedlist>

      <listitem>
<!--
2015-08-21 [fcdfce682] Detect mismatched CONTINUE and EXIT statements at plpgsq
-->
       <para>
        In <link linkend="plpgsql">PL/pgSQL</link>, detect mismatched
        <command>CONTINUE</> and <command>EXIT</> statements while
        compiling a function, rather than at execution time
        (Jim Nasby)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [5c3c3cd0a] Enhanced custom error in PLPythonu
2016-06-11 [020140d84] PL/Python: Rename new keyword arguments of plpy.error()
2016-07-02 [3a4a33ad4] PL/Python: Report argument parsing errors using exceptio
-->
       <para>
        Extend <application>PL/Python</>'s error-reporting and
        message-reporting functions to allow specifying additional message
        fields besides the primary error message (Pavel Stehule)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-05 [1d2fe56e4] Fix PL/Python for recursion and interleaved set-returnin
-->
       <para>
        Allow PL/Python functions to call themselves recursively
        via <application>SPI</>, and fix the behavior when multiple
        set-returning PL/Python functions are called within one query
        (Alexey Grishchenko, Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-11-05 [8c75ad436] Fix memory leaks in PL/Python.
-->
       <para>
        Fix session-lifespan memory leaks in PL/Python (Heikki Linnakangas,
        Haribabu Kommi, Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-02 [287822068] Convert PL/Tcl to use Tcl's "object" interfaces.
2016-03-02 [e2609323e] Make PL/Tcl require Tcl 8.4 or later.
-->
       <para>
        Modernize <application>PL/Tcl</> to use Tcl's <quote>object</>
        <acronym>API</>s instead of simple strings (Jim Nasby, Karl
        Lehenbauer)
       </para>

       <para>
        This can improve performance substantially in some cases.
        Note that <application>PL/Tcl</> now requires Tcl 8.4 or later.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-25 [fb8d2a7f5] In PL/Tcl, make database errors return additional info i
2016-03-25 [cd37bb785] Improve PL/Tcl errorCode facility by providing decoded n
-->
       <para>
        In <application>PL/Tcl</>, make database-reported errors return
        additional information in Tcl's <varname>errorCode</> global
        variable (Jim Nasby, Tom Lane)
       </para>

       <para>
        This feature follows the Tcl convention for returning auxiliary
        data about an error.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-02 [c8c7c93de] Fix PL/Tcl's encoding conversion logic.
-->
       <para>
        Fix <application>PL/Tcl</> to perform encoding conversion between
        the database encoding and <literal>UTF-8</>, which is what Tcl
        expects (Tom Lane)
       </para>

       <para>
        Previously, strings were passed through without conversion,
        leading to misbehavior with non-<literal>ASCII</> characters when
        the database encoding was not <literal>UTF-8</>.
       </para>
      </listitem>

    </itemizedlist>

   </sect3>

   <sect3>
    <title>Client Interfaces</title>

    <itemizedlist>

      <listitem>
<!--
2016-08-26 [e796d0aba] Add a nonlocalized version of the severity field to clie
-->
       <para>
        Add a nonlocalized version of
        the <link linkend="protocol-error-fields">severity field</> in
        error and notice messages (Tom Lane)
       </para>

       <para>
        This change allows client code to determine severity of an error or
        notice without having to worry about localized variants of the
        severity strings.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-05 [0426f349e] Rearrange the handling of error context reports.
This commit is also listed under psql and PL/pgSQL
-->
       <para>
        Introduce a feature in <application>libpq</> whereby the
        <literal>CONTEXT</> field of messages can be suppressed, either
        always or only for non-error messages (Pavel Stehule)
       </para>

       <para>
        The default behavior of <link
        linkend="libpq-pqerrormessage"><function>PQerrorMessage()</></>
        is now to print <literal>CONTEXT</>
        only for errors.  The new function <link
        linkend="libpq-pqseterrorcontextvisibility"><function>PQsetErrorContextVisibility()</></>
        can be used to adjust this.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-03 [e3161b231] Add libpq support for recreating an error message with d
-->
       <para>
        Add support in <application>libpq</> for regenerating an error
        message with a different verbosity level (Alex Shulgin)
       </para>

       <para>
        This is done with the new function <link
        linkend="libpq-pqresultverboseerrormessage"><function>PQresultVerboseErrorMessage()</></>.
        This supports <application>psql</>'s new <literal>\errverbose</>
        feature, and may be useful for other clients as well.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-27 [40cb21f70] Improve PQhost() to return useful data for default Unix-
-->
       <para>
        Improve <application>libpq</>'s <link
        linkend="libpq-pqhost"><function>PQhost()</></> function to return
        useful data for default Unix-socket connections (Tom Lane)
       </para>

       <para>
        Previously it would return <literal>NULL</> if no explicit host
        specification had been given; now it returns the default socket
        directory path.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-16 [fc1ae7d2e] Change ecpg lexer to accept comments with line breaks in
-->
       <para>
        Fix <application>ecpg</>'s lexer to handle line breaks within
        comments starting on preprocessor directive lines (Michael Meskes)
       </para>
      </listitem>

    </itemizedlist>

   </sect3>

   <sect3>
    <title>Client Applications</title>

    <itemizedlist>

      <listitem>
<!--
2015-09-14 [d02426029] Check existency of table/schema for -t/-n option (pg_dum
-->
       <para>
        Add a <option>--strict-names</> option
        to <link linkend="APP-PGDUMP"><application>pg_dump</></>
        and <link linkend="APP-PGRESTORE"><application>pg_restore</></>
        (Pavel Stehule)
       </para>

       <para>
        This option causes the program to complain if there is no match
        for a <option>-t</option> or <option>-n</option> option, rather
        than silently doing nothing.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-06 [a9f0e8e5a] In pg_dump, use a bitmap to represent what to include
2016-04-06 [d217b2c36] In pg_dump, split "dump" into "dump" and "dump_contains"
2016-04-06 [23f34fa4b] In pg_dump, include pg_catalog and extension ACLs, if ch
2016-05-06 [5d589993c] pg_dump performance and other fixes
2016-05-06 [e1b120a8c] Only issue LOCK TABLE commands when necessary
-->
       <para>
        In <application>pg_dump</>, dump locally-made changes of privilege
        assignments for system objects (Stephen Frost)
       </para>

       <para>
        While it has always been possible for a superuser to change
        the privilege assignments for built-in or extension-created
        objects, such changes were formerly lost in a dump and reload.
        Now, <application>pg_dump</> recognizes and dumps such changes.
        (This works only when dumping from a 9.6 or later server, however.)
       </para>
      </listitem>

      <listitem>
<!--
2016-09-08 [31eb14504] Allow pg_dump to dump non-extension members of an extens
-->
       <para>
        Allow <application>pg_dump</> to dump non-extension-owned objects
        that are within an extension-owned schema
        (Mart&iacute;n Marqu&eacute;s)
       </para>

       <para>
        Previously such objects were ignored because they were mistakenly
        assumed to belong to the extension owning their schema.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-06 [3b3fcc4ee] pg_dump: Add table qualifications to some tags
-->
       <para>
        In <application>pg_dump</> output, include the table name in object
        tags for object types that are only uniquely named per-table
        (for example, triggers) (Peter Eisentraut)
       </para>
      </listitem>

    </itemizedlist>

     <sect4>
      <title><xref linkend="APP-PSQL"></title>

      <itemizedlist>

      <listitem>
<!--
2015-12-08 [d5563d7df] psql: Support multiple -c and -f options, and allow mixi
this commit is also listed in the compatibility section
-->
       <para>
        Support multiple <option>-c</option> and <option>-f</option>
        command-line options (Pavel Stehule, Catalin Iacob)
       </para>

       <para>
        The specified operations are carried out in the order in which the
        options are given, and then <application>psql</> terminates.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [c09b18f21] Support \crosstabview in psql
-->
       <para>
        Add a <command>\crosstabview</> command that prints the results of
        a query in a cross-tabulated display (Daniel V&eacute;rit&eacute;)
       </para>

       <para>
        In the crosstab display, data values from one query result column
        are placed in a grid whose column and row headers come from other
        query result columns.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-03 [3cc38ca7d] Add psql \errverbose command to see last server error at
-->
       <para>
        Add an <literal>\errverbose</> command that shows the last server
        error at full verbosity (Alex Shulgin)
       </para>

       <para>
        This is useful after getting an unexpected error &mdash; you
        no longer need to adjust the <varname>VERBOSITY</> variable and
        recreate the failure in order to see error fields that are not
        shown by default.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-03 [8eb6407aa] Add psql \ev and \sv commands for editing and showing vi
2016-05-06 [9b66aa006] Fix psql's \ev and \sv commands so that they handle view
-->
       <para>
        Add <literal>\ev</> and <literal>\sv</> commands for editing and
        showing view definitions (Petr Korobeinikov)
       </para>

       <para>
        These are parallel to the existing <literal>\ef</> and
        <literal>\sf</> commands for functions.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-04 [2bbe9112a] Add a \gexec command to psql for evaluation of computed
-->
       <para>
        Add a <command>\gexec</> command that executes a query and
        re-submits the result(s) as new queries (Corey Huinker)
       </para>
      </listitem>

      <listitem>
<!--
2015-10-05 [2145a7660] psql:  allow \pset C in setting the title, matches \C
-->
       <para>
        Allow <literal>\pset C <replaceable>string</></literal>
        to set the table title, for consistency with <literal>\C
        <replaceable>string</></literal> (Bruce Momjian)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-11 [69ab7b9d6] psql: Don't automatically use expanded format when there
-->
       <para>
        In <literal>\pset expanded auto</> mode, do not use expanded
        format for query results with only one column (Andreas Karlsson,
        Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-21 [dea2b5960] Improve header output from psql's \watch command.
2016-06-15 [9901d8ac2] Use strftime("%c") to format timestamps in psql's \watch
-->
       <para>
        Improve the headers output by the <command>\watch</> command
        (Michael Paquier, Tom Lane)
       </para>

       <para>
        Include the <command>\pset title</> string if one has
        been set, and shorten the prefabricated part of the
        header to be <literal><replaceable>timestamp</> (every
        <replaceable>N</>s)</literal>.  Also, the timestamp format now
        obeys <application>psql</>'s locale environment.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-20 [d854118c8] Teach psql's tab completion to consider the entire input
-->
       <para>
        Improve tab-completion logic to consider the entire input query,
        not only the current line (Tom Lane)
       </para>

       <para>
        Previously, breaking a command into multiple lines defeated any
        tab completion rules that needed to see words on earlier lines.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-04 [158e3bc8e] Tab completion for CREATE SEQUENCE.
2015-09-08 [3ae16798f] psql: Generic tab completion support for enum and bool G
2015-09-09 [2f8880704] Improve tab-completion for GRANT and REVOKE.
2015-10-01 [bf4817e4f] Fix incorrect tab-completion for GRANT and REVOKE
2015-10-20 [7c0b49cd0] Tab complete CREATE EXTENSION .. VERSION.
2015-12-25 [8014c44e8] Improve SECURITY LABEL tab completion
2016-01-12 [bc56d5898] psql: Fix CREATE INDEX tab completion
2016-01-12 [b1bfb28b5] psql: Improve CREATE INDEX CONCURRENTLY tab completion
2016-01-16 [4189e3d65] psql: Add completion support for DROP INDEX CONCURRENTLY
2016-01-20 [d0f2f53cd] psql: Add tab completion for COPY with query
2016-01-23 [6ae4c8de0] psql: Improve completion of FDW DDL commands
2016-01-26 [879d71393] Various fixes to REFRESH MATERIALIZED VIEW tab completio
2016-02-01 [89611c4df] Various fixes to "ALTER ... SET/RESET" tab completions
-->
       <para>
        Numerous minor improvements in tab-completion behavior (Peter
        Eisentraut, Vik Fearing, Kevin Grittner, Kyotaro Horiguchi, Jeff
        Janes, Andreas Karlsson, Fujii Masao, Thomas Munro, Masahiko
        Sawada, Pavel Stehule)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-07 [275f05c99] Add psql PROMPT variable showing the pid of the connecte
-->
       <para>
        Add a <literal>PROMPT</> option <literal>%p</> to insert the
        process ID of the connected backend (Julien Rouhaud)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-05 [0426f349e] Rearrange the handling of error context reports.
This commit is also listed under libpq and PL/pgSQL
-->
       <para>
        Introduce a feature whereby the <literal>CONTEXT</> field of
        messages can be suppressed, either always or only for non-error
        messages (Pavel Stehule)
       </para>

       <para>
        Printing <literal>CONTEXT</> only for errors is now the default
        behavior.  This can be changed by setting the special variable
        <varname>SHOW_CONTEXT</varname>.
       </para>
      </listitem>

      <listitem>
<!--
2016-07-11 [a670c24c3] Improve output of psql's \df+ command.
-->
       <para>
        Make <command>\df+</> show function access privileges and
        parallel-safety attributes (Michael Paquier)
       </para>
      </listitem>

      </itemizedlist>

    </sect4>

    <sect4>
     <title><xref linkend="pgbench"></title>

     <itemizedlist>

      <listitem>
<!--
2016-03-20 [68ab8e8ba] SQL commands in pgbench scripts are now ended by semicol
-->
       <para>
        SQL commands in <application>pgbench</> scripts are now ended by
        semicolons, not newlines (Kyotaro Horiguchi, Tom Lane)
       </para>

       <para>
        This change allows SQL commands in scripts to span multiple lines.
        Existing custom scripts will need to be modified to add a semicolon
        at the end of each line that does not have one already.  (Doing so
        does not break the script for use with older versions
        of <application>pgbench</>.)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-01 [7e137f846] Extend pgbench's expression syntax to support a few buil
2016-03-28 [86c43f4e2] pgbench: Support double constants and functions.
2016-05-05 [7a622b273] Rename pgbench min/max to least/greatest, and fix handli
2016-05-06 [951529948] Improve handling of numeric-valued variables in pgbench.
-->
       <para>
        Support floating-point arithmetic, as well as some <link
        linkend="pgbench-builtin-functions">built-in functions</>, in
        expressions in backslash commands (Fabien Coelho)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-29 [ad9566470] pgbench: Remove \setrandom.
-->
       <para>
        Replace <command>\setrandom</> with built-in functions (Fabien
        Coelho)
       </para>

       <para>
        The new built-in functions include <link
        linkend="pgbench-functions"><function>random()</></>,
        <function>random_exponential()</>, and
        <function>random_gaussian()</>, which perform the same work as
        <command>\setrandom</>, but are easier to use since they can be
        embedded in larger expressions.  Since these additions have made
        <command>\setrandom</> obsolete, remove it.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-27 [8bea3d221] pgbench: improve multi-script support
2016-03-03 [d561f1cae] pgbench: accept unambiguous builtin prefixes for -b
-->
       <para>
        Allow invocation of multiple copies of the built-in scripts,
        not only custom scripts (Fabien Coelho)
       </para>

       <para>
        This is done with the new <option>-b</> switch, which works
        similarly to <option>-f</> for custom scripts.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-19 [7bafffea6] pgbench: Allow changing weights for scripts
2016-09-21 [970300faa] Print test parameters like "foo: 123", and results like
-->
       <para>
        Allow changing the selection probabilities (weights) for scripts
        (Fabien Coelho)
       </para>

       <para>
        When multiple scripts are specified, each <application>pgbench</>
        transaction randomly chooses one to execute.  Formerly this was
        always done with uniform probability, but now different selection
        probabilities can be specified for different scripts.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-01 [1d0c3b3f8] pgbench: allow per-script statistics
-->
       <para>
        Collect statistics for each script in a multi-script run (Fabien
        Coelho)
       </para>

       <para>
        This feature adds an intermediate level of detail to existing
        global and per-command statistics printouts.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-16 [1def9063c] pgbench progress with timestamp
-->
       <para>
        Add a <option>--progress-timestamp</> option to report progress
        with Unix epoch timestamps, instead of time since the run started
        (Fabien Coelho)
       </para>
      </listitem>

      <listitem>
<!--
2015-07-03 [ba3deeefb] Lift the limitation that # of clients must be a multiple
-->
       <para>
        Allow the number of client connections (<option>-c</>) to not
        be an exact multiple of the number of threads (<option>-j</>)
        (Fabien Coelho)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-09 [accf7616f] pgbench: When -T is used, don't wait for transactions be
-->
       <para>
        When the <option>-T</> option is used, stop promptly at the end
        of the specified time (Fabien Coelho)
       </para>

       <para>
        Previously, specifying a low transaction rate could cause
        <application>pgbench</> to wait significantly longer than
        specified.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

   <sect3>
    <title>Server Applications</title>

    <itemizedlist>

      <listitem>
<!--
2015-12-17 [66d947b9d] Adjust behavior of single-user -j mode for better initdb
-->
       <para>
        Improve error reporting during <application>initdb</>'s
        post-bootstrap phase (Tom Lane)
       </para>

       <para>
        Previously, an error here led to reporting the entire input
        file as the <quote>failing query</>; now just the current
        query is reported.  To get the desired behavior, queries in
        <application>initdb</>'s input files must be separated by blank
        lines.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-17 [c4a8812cf] Use just one standalone-backend session for initdb's pos
2016-08-30 [d9720e437] Fix initdb misbehavior when user mis-enters superuser pa
-->
       <para>
        Speed up <application>initdb</> by using just one
        standalone-backend session for all the post-bootstrap steps
        (Tom Lane)
       </para>
      </listitem>

      <listitem>
<!--
2015-12-01 [e50cda784] Use pg_rewind when target timeline was switched
-->
       <para>
        Improve <link linkend="app-pgrewind"><application>pg_rewind</></>
        so that it can work when the target timeline changes (Alexander
        Korotkov)
       </para>

       <para>
        This allows, for example, rewinding a promoted standby back to
        some state of the old master's timeline.
       </para>
      </listitem>

    </itemizedlist>

   </sect3>

   <sect3>
    <title>Source Code</title>

     <itemizedlist>

      <listitem>
<!--
2015-07-02 [726117243] Remove obsolete heap_formtuple/modifytuple/deformtuple f
-->
       <para>
        Remove obsolete
        <function>heap_formtuple</>/<function>heap_modifytuple</>/<function>heap_deformtuple</>
        functions (Peter Geoghegan)
       </para>
      </listitem>

      <listitem>
<!--
2016-08-27 [b9fe6cbc8] Add macros to make AllocSetContextCreate() calls simpler
-->
       <para>
        Add macros to make <function>AllocSetContextCreate()</> calls simpler
        and safer (Tom Lane)
       </para>

       <para>
        Writing out the individual sizing parameters for a memory context
        is now deprecated in favor of using one of the new
        macros <symbol>ALLOCSET_DEFAULT_SIZES</>,
        <symbol>ALLOCSET_SMALL_SIZES</>,
        or <symbol>ALLOCSET_START_SMALL_SIZES</>.
        Existing code continues to work, however.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-05 [de6fd1c89] Rely on inline functions even if that causes warnings in
-->
       <para>
        Unconditionally use <literal>static inline</> functions in header
        files (Andres Freund)
       </para>

       <para>
        This may result in warnings and/or wasted code space with very
        old compilers, but the notational improvement seems worth it.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-29 [13d856e17] Make TAP tests work on Windows.
2015-12-02 [1caef31d9] Refactor Perl test code
2015-12-07 [9821492ee] Cleanup some problems in new Perl test code
2016-03-03 [2c83f435a] Rework PostgresNode's psql method
2016-02-26 [49148645f] Add a test framework for recovery
2016-02-26 [74d58425c] Apply last revision of recovery patch
2016-05-06 [6bd356c33] Add TAP tests for pg_dump
-->
       <para>
        Improve <application>TAP</> testing infrastructure (Michael
        Paquier, Craig Ringer, &Aacute;lvaro Herrera, Stephen Frost)
       </para>

       <para>
        Notably, it is now possible to test recovery scenarios using
        this infrastructure.
       </para>
      </listitem>

      <listitem>
<!--
2015-09-11 [aa65de042] When trace_lwlocks is used, identify individual lwlocks
-->
       <para>
        Make <varname>trace_lwlocks</> identify individual locks by name
        (Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2015-12-19 [d37b816dc] Adopt a more compact, less error-prone notation for tab
2016-01-04 [9b181b036] In psql's tab completion, change most TailMatches patter
2016-01-05 [4f18010af] Convert psql's tab completion for backslash commands to
-->
       <para>
        Improve <application>psql</>'s tab-completion code infrastructure
        (Thomas Munro, Michael Paquier)
       </para>

       <para>
        Tab-completion rules are now considerably easier to write, and
        more compact.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-05 [efa318bcf] Make pg_shseclabel available in early backend startup
-->
       <para>
        Nail the <structname>pg_shseclabel</> system catalog into cache,
        so that it is available for access during connection authentication
        (Adam Brightwell)
       </para>

       <para>
        The core code does not use this catalog for authentication,
        but extensions might wish to consult it.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-17 [65c5fcd35] Restructure index access method API to hide most of it a
2016-01-21 [be44ed27b] Improve index AMs' opclass validation procedures.
2016-08-13 [ed0097e4f] Add SQL-accessible functions for inspecting index AM pro
-->
       <para>
        Restructure <link linkend="indexam">index access
        method <acronym>API</></> to hide most of it at
        the <application>C</> level (Alexander Korotkov, Andrew Gierth)
       </para>

       <para>
        This change modernizes the index <acronym>AM API</> to look more
        like the designs we have adopted for foreign data wrappers and
        tablesample handlers.  This simplifies the <application>C</> code
        and makes it much more practical to define index access methods in
        installable extensions.  A consequence is that most of the columns
        of the <structname>pg_am</> system catalog have disappeared.
        New <link linkend="functions-info-catalog-table">inspection
        functions</link> have been added to allow SQL queries to determine
        index AM properties that used to be discoverable
        from <structname>pg_am</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-06 [6c268df12] Add new catalog called pg_init_privs
-->
       <para>
        Add <link
        linkend="catalog-pg-init-privs"><structname>pg_init_privs</></>
        system catalog to hold original privileges
        of <application>initdb</>-created and extension-created objects
        (Stephen Frost)
       </para>

       <para>
        This infrastructure allows <application>pg_dump</> to dump changes
        that an installation may have made in privileges attached to
        system objects.  Formerly, such changes would be lost in a dump
        and reload, but now they are preserved.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-04 [c1772ad92] Change the way that LWLocks for extensions are allocated
-->
       <para>
        Change the way that extensions allocate custom <literal>LWLocks</>
        (Amit Kapila, Robert Haas)
       </para>

       <para>
        The <function>RequestAddinLWLocks()</> function is removed,
        and replaced by <function>RequestNamedLWLockTranche()</>.
        This allows better identification of custom <literal>LWLocks</>,
        and is less error-prone.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-11 [38f8bdcac] Modify the isolation tester so that multiple sessions ca
-->
       <para>
        Improve the isolation tester to allow multiple sessions to wait
        concurrently, allowing testing of deadlock scenarios (Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-12 [bcac23de7] Introduce extensible node types.
-->
       <para>
        Introduce extensible node types (KaiGai Kohei)
       </para>

       <para>
        This change allows <application>FDW</>s or custom scan providers
        to store data in a plan tree in a more convenient format than
        was previously possible.
       </para>
      </listitem>

      <listitem>
<!--
2015-08-11 [68fa28f77] Postpone extParam/allParam calculations until the very e
2016-01-07 [c44d01383] Delay creation of subplan tlist until after create_plan(
2016-02-18 [19a541143] Add an explicit representation of the output targetlist
2016-03-07 [3fc6e2d7f] Make the upper part of the planner work by generating an
2016-07-01 [5ce5e4a12] Set consider_parallel correctly for upper planner rels.
2016-07-01 [9e703987a] Rethink the GetForeignUpperPaths API (again).
-->
       <para>
        Make the planner deal with post-scan/join query steps by generating
        and comparing <literal>Paths</>, replacing a lot of ad-hoc logic
        (Tom Lane)
       </para>

       <para>
        This change provides only marginal user-visible improvements today,
        but it enables future work on a lot of upper-planner improvements
        that were impractical to tackle using the old code structure.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-20 [a7de3dc5c] Support multi-stage aggregation.
2016-06-22 [f8ace5477] Fix type-safety problem with parallel aggregate serial/d
2016-06-26 [19e972d55] Rethink node-level representation of partial-aggregation
-->
       <para>
        Support partial aggregation (David Rowley, Simon Riggs)
       </para>

       <para>
        This change allows the computation of an aggregate function to be
        split into separate parts, for example so that parallel worker
        processes can cooperate on computing an aggregate.  In future
        it might allow aggregation across local and remote data to occur
        partially on the remote end.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-09 [b6fb6471f] Add a generic command progress reporting facility.
-->
       <para>
        Add a generic command progress reporting facility (Vinayak Pokale,
        Rahila Syed, Amit Langote, Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-18 [27199058d] Convert psql's flex lexer to be re-entrant, and make it
2016-03-19 [0ea9efbe9] Split psql's lexer into two separate .l files for SQL an
2016-03-20 [b6afae71a] Use %option bison-bridge in psql/pgbench lexers.
2016-03-24 [588d963b0] Create src/fe_utils/, and move stuff into there from pg_
2016-03-24 [d65bea26a] Move psql's print.c and mbprint.c into src/fe_utils.
2016-03-24 [c1156411a] Move psql's psqlscan.l into src/fe_utils.
-->
       <para>
        Separate out <application>psql</>'s <application>flex</> lexer to
        make it usable by other client programs (Tom Lane, Kyotaro
        Horiguchi)
       </para>

       <para>
        This eliminates code duplication for programs that need to be able
        to parse SQL commands well enough to identify command boundaries.
        Doing that in full generality is more painful than one could
        wish, and up to now only <application>psql</> has really gotten
        it right among our supported client programs.
       </para>

       <para>
        A new source-code subdirectory <filename>src/fe_utils/</> has
        been created to hold this and other code that is shared across
        our client programs.  Formerly such sharing was accomplished by
        symbolic linking or copying source files at build time, which
        was ugly and required duplicate compilation.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-21 [98a64d0bd] Introduce WaitEventSet API.
-->
       <para>
        Introduce <literal>WaitEventSet</> <acronym>API</> to allow
        efficient waiting for event sets that usually do not change from
        one wait to the next (Andres Freund, Amit Kapila)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-01 [65578341a] Add Generic WAL interface
-->
       <para>
        Add a generic interface for writing <acronym>WAL</> records
        (Alexander Korotkov, Petr Jel&iacute;nek, Markus Nullmeier)
       </para>

       <para>
        This change allows extensions to write <acronym>WAL</> records for
        changes to pages using a standard layout.  The problem of needing to
        replay <acronym>WAL</> without access to the extension is solved by
        having generic replay code.  This allows extensions to implement,
        for example, index access methods and have <acronym>WAL</>
        support for them.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-06 [3fe3511d0] Generic Messages for Logical Decoding
-->
       <para>
        Support generic <acronym>WAL</> messages for logical decoding
        (Petr Jel&iacute;nek, Andres Freund)
       </para>

       <para>
        This feature allows extensions to insert data into the
        <acronym>WAL</> stream that can be read by logical-decoding
        plugins, but is not connected to physical data restoration.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-30 [ccd6eb49a] Introduce traversalValue for SP-GiST scan
2016-03-30 [87545f541] Use traversalValue in SP-GiST range opclass.
-->
       <para>
        Allow SP-GiST operator classes to store an arbitrary
        <quote>traversal value</> while descending the index (Alexander
        Lebedev, Teodor Sigaev)
       </para>

       <para>
        This is somewhat like the <quote>reconstructed value</>, but it
        could be any arbitrary chunk of data, not necessarily of the same
        data type as the indexed column.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-04 [66229ac00] Introduce a LOG_SERVER_ONLY ereport level, which is neve
-->
       <para>
        Introduce a <literal>LOG_SERVER_ONLY</> message level for
        <function>ereport()</> (David Steele)
       </para>

       <para>
        This level acts like <literal>LOG</> except that the message is
        never sent to the client.  It is meant for use in auditing and
        similar applications.
       </para>
      </listitem>

      <listitem>
<!--
2016-07-01 [548af97fc] Provide and use a makefile target to build all generated
-->
       <para>
        Provide a <filename>Makefile</> target to build all generated
        headers (Michael Paquier, Tom Lane)
       </para>

       <para>
        <literal>submake-generated-headers</> can now be invoked to ensure
        that generated backend header files are up-to-date.  This is
        useful in subdirectories that might be built <quote>standalone</>.
       </para>
      </listitem>

      <listitem>
<!--
2016-09-15 [fcd93e4af] Support OpenSSL 1.1.0.
2016-09-15 [9895818d5] Fix building with LibreSSL.
-->
       <para>
        Support OpenSSL 1.1.0 (Andreas Karlsson, Heikki Linnakangas)
       </para>
      </listitem>

     </itemizedlist>

   </sect3>

   <sect3>
    <title>Additional Modules</title>

    <itemizedlist>

      <listitem>
<!--
2016-03-11 [92f03fe76] Allow setting sample ratio for auto_explain
2016-03-13 [7a8d87483] Rename auto_explain.sample_ratio to sample_rate
-->
       <para>
        Add configuration parameter <literal>auto_explain.sample_rate</> to
        allow <link linkend="auto-explain"><filename>contrib/auto_explain</></>
        to capture just a configurable fraction of all queries (Craig
        Ringer, Julien Rouhaud)
       </para>

       <para>
        This allows reduction of overhead for heavy query traffic, while
        still getting useful information on average.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-01 [9ee014fc8] Bloom index contrib module
-->
       <para>
        Add <link linkend="bloom"><filename>contrib/bloom</></> module that
        implements an index access method based on Bloom filtering (Teodor
        Sigaev, Alexander Korotkov)
       </para>

       <para>
        This is primarily a proof-of-concept for non-core index access
        methods, but it could be useful in its own right for queries that
        search many columns.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-18 [33bd250f6] Cube extension kNN support
2015-12-28 [81ee726d8] Code and docs review for cube kNN support.
-->
       <para>
        In <link linkend="cube"><filename>contrib/cube</></>, introduce
        distance operators for cubes, and support kNN-style searches in
        GiST indexes on cube columns (Stas Kelvich)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-03 [41d2c081c] Make hstore_to_jsonb_loose match hstore_to_json_loose on
-->
       <para>
        Make <filename>contrib/hstore</>'s <link
        linkend="hstore-func-table"><function>hstore_to_jsonb_loose()</></>
        and <function>hstore_to_json_loose()</> functions agree on what
        is a number (Tom Lane)
       </para>

       <para>
        Previously, <function>hstore_to_jsonb_loose()</> would convert
        numeric-looking strings to <acronym>JSON</> numbers, rather than
        strings, even if they did not exactly match the <acronym>JSON</>
        syntax specification for numbers.  This was inconsistent with
        <function>hstore_to_json_loose()</>, so tighten the test to match
        the <acronym>JSON</> syntax.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-21 [c6fbe6d6f] Add selectivity estimation functions for intarray operat
-->
       <para>
        Add selectivity estimation functions for
        <link linkend="intarray"><filename>contrib/intarray</></> operators
        to improve plans for queries using those operators (Yury Zhuravlev,
        Alexander Korotkov)
       </para>
      </listitem>

      <listitem>
<!--
2015-11-25 [d6061f83a] Improve pageinspect module
-->
       <para>
        Make <link
        linkend="pageinspect"><filename>contrib/pageinspect</></>'s
        <function>heap_page_items()</> function show the raw data in each
        tuple, and add new functions <function>tuple_data_split()</> and
        <function>heap_page_item_attrs()</> for inspection of individual
        tuple fields (Nikolay Shaplov)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-09 [188f359d3] pgcrypto: support changing S2K iteration count
-->
       <para>
        Add an optional <literal>S2K</> iteration count parameter to
        <link linkend="pgcrypto"><filename>contrib/pgcrypto</></>'s
        <function>pgp_sym_encrypt()</> function (Jeff Janes)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-16 [f576b17cd] Add word_similarity to pg_trgm contrib module.
-->
       <para>
        Add support for <quote>word similarity</> to
        <link linkend="pgtrgm"><filename>contrib/pg_trgm</></>
        (Alexander Korotkov, Artur Zakirov)
       </para>

       <para>
        These functions and operators measure the similarity between one
        string and the most similar single word of another string.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-16 [5871b8848] GUC variable pg_trgm.similarity_threshold insead of set_
2016-06-20 [9c852566a] Fix comparison of similarity to threshold in GIST trigra
-->
       <para>
        Add configuration parameter
        <varname>pg_trgm.similarity_threshold</> for
        <filename>contrib/pg_trgm</>'s similarity threshold (Artur Zakirov)
       </para>

       <para>
        This threshold has always been configurable, but formerly it was
        controlled by special-purpose functions <function>set_limit()</>
        and <function>show_limit()</>.  Those are now deprecated.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-20 [97f301464] This supports the triconsistent function for pg_trgm GIN
-->
       <para>
        Improve <filename>contrib/pg_trgm</>'s GIN operator class to
        speed up index searches in which both common and rare keys appear
        (Jeff Janes)
       </para>
      </listitem>

      <listitem>
<!--
2015-12-25 [25bfa7efd] Improve the gin index scan performance in pg_trgm.
-->
       <para>
        Improve performance of similarity searches in
        <filename>contrib/pg_trgm</> GIN indexes (Christophe Fornaroli)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-08 [ba0a198fb] Add pg_visibility contrib module.
2016-06-17 [71d05a2c7] pg_visibility: Add pg_truncate_visibility_map function.
-->
       <para>
        Add <link
        linkend="pgvisibility"><filename>contrib/pg_visibility</></> module
        to allow examining table visibility maps (Robert Haas)
       </para>
      </listitem>

      <listitem>
<!--
2015-09-07 [49124613f] contrib/sslinfo: add ssl_extension_info SRF
-->
       <para>
        Add <link linkend="sslinfo"><function>ssl_extension_info()</></>
        function to <filename>contrib/sslinfo</>, to print information
        about <acronym>SSL</> extensions present in the <literal>X509</>
        certificate used for the current connection (Dmitry Voronin)
       </para>
      </listitem>

    </itemizedlist>

    <sect4>
     <title><link linkend="postgres-fdw"><filename>postgres_fdw</></></title>

     <itemizedlist>

      <listitem>
<!--
2015-11-03 [d89494166] Allow postgres_fdw to ship extension funcs/operators for
-->
       <para>
        Allow extension-provided operators and functions to be sent for
        remote execution, if the extension is whitelisted in the foreign
        server's options (Paul Ramsey)
       </para>

       <para>
        Users can enable this feature when the extension is known to exist
        in a compatible version in the remote database.  It allows more
        efficient execution of queries involving extension operators.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-03 [f18c944b6] postgres_fdw: Add ORDER BY to some remote SQL queries.
2015-12-22 [ccd8f9792] postgres_fdw: Consider requesting sorted data so we can
-->
       <para>
        Consider performing sorts on the remote server (Ashutosh Bapat)
       </para>
      </listitem>

      <listitem>
<!--
2016-02-09 [e4106b252] postgres_fdw: Push down joins to remote servers.
2016-03-09 [aa09cd242] postgres_fdw: Consider foreign joining and foreign sorti
-->
       <para>
        Consider performing joins on the remote server (Shigeru Hanada,
        Ashutosh Bapat)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-18 [0bf3ae88a] Directly modify foreign tables.
-->
       <para>
        When feasible, perform <command>UPDATE</> or <command>DELETE</>
        entirely on the remote server (Etsuro Fujita)
       </para>

       <para>
        Formerly, remote updates involved sending a <command>SELECT FOR UPDATE</>
        command and then updating or deleting the selected rows one-by-one.
        While that is still necessary if the operation requires any local
        processing, it can now be done remotely if all elements of the
        query are safe to send to the remote server.
       </para>
      </listitem>

      <listitem>
<!--
2016-02-03 [dc203dc3a] postgres_fdw: Allow fetch_size to be set per-table or pe
-->
       <para>
        Allow the fetch size to be set as a server or table option
        (Corey Huinker)
       </para>

       <para>
        Formerly, <filename>postgres_fdw</> always fetched 100 rows at
        a time from remote queries; now that behavior is configurable.
       </para>
      </listitem>

      <listitem>
<!--
2016-01-28 [96198d94c] Avoid multiple foreign server connections when all use s
-->
       <para>
        Use a single foreign-server connection for local user IDs that
        all map to the same remote user (Ashutosh Bapat)
       </para>
      </listitem>

      <listitem>
<!--
2016-04-21 [f039eaac7] Allow queries submitted by postgres_fdw to be canceled.
2016-05-16 [1b812afb0] Fix multiple problems in postgres_fdw query cancellation
-->
       <para>
        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.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

   </sect3>

  </sect2>

 </sect1>
