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

 <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-style">  (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>.<structname>table_privileges</structname>
      view (Peter Eisentraut)
     </para>

     <para>
      All other relevant <structname>information_schema</structname> views include
      foreign tables, but this one ignored them.
     </para>

     <para>
      Since this view definition is installed by <application>initdb</application>,
      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</application>:
<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</literal>.
     </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</systemitem>) that occurs while trying to execute
      a <command>ROLLBACK</command> 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</quote>.
     </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</command> 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</application> 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</application>'s parser to allow <literal>RETURNING</literal>
      clauses without attached C variables (Michael Meskes)
     </para>

     <para>
      This allows <application>ecpg</application> programs to contain SQL constructs
      that use <literal>RETURNING</literal> 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</application>'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</type> values.
      A side-effect that may be visible to extension developers is
      that <literal>_USE_32BIT_TIME_T</literal> is no longer defined globally
      in <productname>PostgreSQL</productname> Windows builds.  This is not expected
      to cause problems, because type <type>time_t</type> is not used
      in any <productname>PostgreSQL</productname> 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</literal> 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</structname>.<structfield>umoptions</structfield>, 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</literal> 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</structname> does not
      show the options in such cases, <structname>pg_user_mappings</structname>
      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</literal> to <filename>postgresql.conf</filename>.  (In versions
        supporting <command>ALTER SYSTEM</command>, you can use that to make the
        configuration change, but you'll still need a restart.)
       </para>
      </step>

      <step>
       <para>
        In <emphasis>each</emphasis> 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</literal>
        and <literal>template1</literal> databases, or the vulnerability will still
        exist in databases you create later.  To fix <literal>template0</literal>,
        you'll need to temporarily make it accept connections.
        In <productname>PostgreSQL</productname> 9.5 and later, you can use
<programlisting>
ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
</programlisting>
        and then after fixing <literal>template0</literal>, 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</literal> 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</application> 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</application> or other <application>libpq</application>-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</application>-based client,
      logging in could be possible, depending on which authentication
      method is configured.  In particular the most common
      method, <literal>md5</literal>, 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()</function> check for <literal>UPDATE</literal> privilege on
      the target large object (Tom Lane, Michael Paquier)
     </para>

     <para>
      <function>lo_put()</function> should surely require the same permissions
      as <function>lowrite()</function>, 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</application> (Bruce Momjian)
     </para>

     <para>
      The previous documentation instructed users to start/stop the primary
      server after running <application>pg_upgrade</application> 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</literal> 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</application> 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</systemitem> and <systemitem>SIGUSR1</systemitem> 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</application>
      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</command> or <command>UPDATE</command> 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</literal>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</literal> 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</command> (Vik Fearing)
     </para>

     <para>
      Previously, we would rename a conflicting autogenerated array type
      out of the way during <command>CREATE</command>; 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</command> 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</command> accepts all the syntax
      variants that <command>ALTER ROLE ... SET</command> 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</literal> constraints to be
      initially <literal>NOT VALID</literal> (Amit Langote)
     </para>

     <para>
      <command>CREATE TABLE</command> silently drops <literal>NOT VALID</literal>
      specifiers for <literal>CHECK</literal> constraints, reasoning that the
      table must be empty so the constraint can be validated immediately.
      But this is wrong for <command>CREATE FOREIGN TABLE</command>, 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</quote> 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</type> to the
      correct type (Heikki Linnakangas)
     </para>

     <para>
      <command>CREATE TYPE</command> 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</command> 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</command> 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</command> processes
      a <type>tsvector</type> 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</type> 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()</function> (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</literal> symbols from Perl while
      compiling <application>PL/Perl</application> (Ashutosh Sharma, Tom Lane)
     </para>

     <para>
      This avoids portability problems, typically manifesting as
      a <quote>handshake</quote> 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</application>, 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</application>, fix failure when <command>COPY FROM STDIN</command>
      is ended with a keyboard EOF signal and then another <command>COPY
      FROM STDIN</command> 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</application> and <application>pg_restore</application> to
      emit <command>REFRESH MATERIALIZED VIEW</command> 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>/<application>pg_restore</application>'s
      reporting of error conditions originating in <application>zlib</application>
      (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</application> with the <option>--clean</option> 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</application> with the <option>--clean</option> option to not
      fail when the <literal>public</literal> 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</application> 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</application> 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()</function> to print correct output for
      the <literal>ON SELECT</literal> rule of a view whose columns have been
      renamed (Tom Lane)
     </para>

     <para>
      In some corner cases, <application>pg_dump</application> relies
      on <function>pg_get_ruledef()</function> 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</literal> 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</literal> 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</application> 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</application> to correctly handle files exceeding 2GB
      (Kuntal Ghosh, Michael Paquier)
     </para>

     <para>
      Ordinarily such files won't appear in <productname>PostgreSQL</productname> 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</application> to ensure that the ending WAL record
      does not have <xref linkend="guc-wal-level"> = <literal>minimum</literal>
      (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</application>'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</filename>, re-establish connections to remote
      servers after <command>ALTER SERVER</command> or <command>ALTER USER
      MAPPING</command> 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</filename>, 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</literal> 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</option>, not <option>-fpic</option>, 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</application>
      library is not within a <filename>VC</filename> 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</application>
      header files (Andrew Dunstan)
     </para>

     <para>
      This fixes a former need to move things around in standard Windows
      installations of <application>libxml2</application>.
     </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</filename> (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</literal> settings
      on <filename>vcregress.pl</filename>'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</quote>, 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</structname>.<structfield>umoptions</structfield>, 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</literal> 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</structname>, 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</structname>, 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</application>'s recognition of
      the <envar>PGREQUIRESSL</envar> environment variable (Daniel Gustafsson)
     </para>

     <para>
      Processing of this environment variable was unintentionally dropped
      in <productname>PostgreSQL</productname> 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</envar>, 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</quote> 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</structname> 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</structname>, 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</application> 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()</function> 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</quote> 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</quote> 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</literal>
      row-level-security policy (Stephen Frost)
     </para>

     <para>
      In some cases the <literal>WITH CHECK</literal> restriction would be applied
      when the <literal>USING</literal> 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</command>.
     </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</command> rebuilds an existing index (Noah Misch)
     </para>

     <para>
      The command failed if the calling user did not currently have
      <literal>CREATE</literal> 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</command> to not recurse
      to child tables when the constraint is marked <literal>NO INHERIT</literal>
      (Amit Langote)
     </para>

     <para>
      This fix prevents unwanted <quote>constraint does not exist</quote> 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</command> 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</command>
      and <command>VACUUM FULL</command> (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</command> 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</command> 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</type> operators in SP-GiST
      (Nikita Glukhov)
     </para>

     <para>
      SP-GiST index scans using the operators <literal>&amp;&lt;</literal>
      <literal>&amp;&gt;</literal> <literal>&amp;&lt;|</literal> and <literal>|&amp;&gt;</literal>
      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</type> comparison (Kyotaro
      Horiguchi, Tom Lane)
     </para>

     <para>
      The comparison operators for type <type>interval</type> 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()</function> to produce valid output
      with <replaceable>tableforest</replaceable> = false
      (Thomas Munro, Peter Eisentraut)
     </para>

     <para>
      Previously it failed to produce a wrapping <literal>&lt;table&gt;</literal>
      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()</function>
      and <function>make_interval()</function> (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()</function> 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()</function> when attempting to stop
      a non-exclusive backup (Michael Paquier, David Steele)
     </para>

     <para>
      If <function>pg_stop_backup()</function> 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</structname> 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()</function>
      and <function>close()</function> (Tom Lane)
     </para>

     <para>
      Neither of these system calls are likely to fail in typical situations,
      but if they did, <filename>fd.c</filename> 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</application> to support <command>COMMIT PREPARED</command>
      and <command>ROLLBACK PREPARED</command> (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</application> (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</application> to handle the combination
      of <option>--connect</option> and <option>--rate</option> 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</application> to honor the long-form option
      spelling <option>--builtin</option>, 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>/<application>pg_restore</application> to correctly
      handle privileges for the <literal>public</literal> schema when
      using <option>--clean</option> option (Stephen Frost)
     </para>

     <para>
      Other schemas start out with no privileges granted,
      but <literal>public</literal> does not; this requires special-case treatment
      when it is dropped and restored due to the <option>--clean</option> 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</application>, 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</application>'s query for initial privileges
      of a procedural language (Peter Eisentraut)
     </para>

     <para>
      This resulted in <application>pg_dump</application> 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</literal>
      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</literal>'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</application> to transfer comments and security labels
      attached to <quote>large objects</quote> (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</filename>'s <function>pg_file_write()</function>
      function (Noah Misch)
     </para>

     <para>
      Notably, it failed to detect errors reported
      by <function>fclose()</function>.
     </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</filename>, 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</filename>'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</filename>, 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</application> 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</productname>
      will continue to accept such removed abbreviations for timestamp input.
      But they will not be shown in the <structname>pg_timezone_names</structname>
      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</filename> 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</literal> zone.  If you don't want that, remove
      the <filename>posixrules</filename> 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</command> to be corrupt
      (Pavan Deolasee, Tom Lane)
     </para>

     <para>
      If <command>CREATE INDEX CONCURRENTLY</command> 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> 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</quote>.
     </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</quote> 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</quote> for an
      unlogged table (Michael Paquier)
     </para>

     <para>
      Previously, this was skipped when <xref linkend="guc-wal-level">
      = <literal>minimal</literal>, 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</replaceable> 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</command>
      (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</application> 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</command> 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</command> (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</replaceable></quote>
      or <quote>relation <replaceable>NNN</replaceable> 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</command> 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</literal>
      expression led to errors,
      typically <quote>attribute <replaceable>N</replaceable> 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</command> (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</command> creates
      a table with OIDs, whether or not the <literal>LIKE</literal>-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</command> 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</command> (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</literal>
      and <literal>BootstrapTransactionId</literal> (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</quote> errors when the target
      of <command>INSERT ... ON CONFLICT</command> 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</replaceable>
      entries</quote> complaint when using <literal>ON CONFLICT</literal> 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</quote>
      errors during <command>INSERT</command> or <command>UPDATE</command> 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</replaceable><literal>.*</literal> in
      an <command>UPDATE</command> source expression (Tom Lane)
     </para>

     <para>
      This led to <quote>UPDATE target count mismatch --- internal
      error</quote>.  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</literal> 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</type> 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;'...'</literal>) or Unicode identifier
      (<literal>U&amp;"..."</literal>).
     </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</literal> 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</type>
      (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</literal>, matches empty <type>tsvector</type>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()</function> 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()</function> (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()</function>'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()</function> 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()</function> 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()</function>
      or <function>array_positions()</function> 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()</function>
      (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()</function>
      and <function>pg_stop_backup()</function> 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</literal> 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</type>-to-<type>interval</type> 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</type> fields was mistakenly deemed to be a
      no-op and discarded.  An example is that casting from <type>INTERVAL
      MONTH</type> to <type>INTERVAL YEAR</type> 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</command> 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</literal> 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</quote> planner error when dealing
      with a <literal>UNION ALL</literal> 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</quote> 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</application> 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</command>
      in <application>pg_dump</application> (Stephen Frost)
     </para>

     <para>
      <application>pg_dump</application> missed issuing the
      required <literal>REVOKE</literal> commands in cases where <command>ALTER
      DEFAULT PRIVILEGES</command> 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</application> 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</application> with <option>--create --if-exists</option>
      to behave more sanely if an archive contains
      unrecognized <command>DROP</command> commands (Tom Lane)
     </para>

     <para>
      This doesn't fix any live bug, but it may improve the behavior in
      future if <application>pg_restore</application> is used with an archive
      generated by a later <application>pg_dump</application> 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</application>'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</application>'s handling of
      symlinked <filename>pg_stat_tmp</filename> and <filename>pg_replslot</filename>
      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</application> 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</application> to insert the correct
      platform-specific default values for
      the <replaceable>xxx</replaceable><literal>_flush_after</literal> parameters
      into <filename>postgresql.conf</filename> (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</literal> 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</literal>
      as a column name (Tom Lane)
     </para>

     <para>
      This matches the (previously undocumented) behavior of
      PL/Tcl's <command>spi_exec</command> and <command>spi_execp</command> commands,
      namely that a magic <literal>.tupno</literal> 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</filename> 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</application> 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</application>'s <command>\crosstabview</command> (Tom Lane)
     </para>

     <para>
      <application>psql</application> 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</application>'s tab completion for <command>ALTER DEFAULT
      PRIVILEGES</command> (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</application>'s tab completion for <command>ALTER TABLE t
      ALTER c DROP ...</command> (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</application>, treat an empty or all-blank setting of
      the <envar>PAGER</envar> environment variable as meaning <quote>no
      pager</quote> (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</filename>'s reporting of
      low-level <application>libpq</application> 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</filename> to ignore irrelevant server options
      when it uses a <filename>contrib/postgres_fdw</filename> 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</application> 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</filename>'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</application> 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</replaceable>:
      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"></ulink>.
     </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</application> 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</application> 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</application> 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</filename>'s
      <function>pg_truncate_visibility_map()</function> function.
      For more information see
      <ulink url="https://wiki.postgresql.org/wiki/Visibility_Map_Problems"></ulink>.
     </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</command> (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</literal> (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</command> 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</command> 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;</literal>.  That is now
      rendered as <literal>&lt;I-O-Read-Time&gt;</literal>.
     </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</command> 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</literal> constraints while
      creating or altering a table (Tom Lane, Amit Langote)
     </para>

     <para>
      Allow identical <literal>CHECK</literal> 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</literal>
      constraint on the child.  Likewise, prevent merging of a <literal>NO
      INHERIT</literal> 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</structname>.<structfield>unit</structfield>
      for <varname>min_wal_size</varname> and <varname>max_wal_size</varname> (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()</function>
      (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()</function> 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</application> (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</application> (Tom Lane)
     </para>

     <para>
      The reported problem involved leaking an error report
      during <function>PQreset()</function>, 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</application>, 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</application> 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</command>.  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</application>'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</application> 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</option>
      and <option>--source-target</option> options to <application>pg_rewind</application>
      (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</application> turn off <varname>synchronous_commit</varname>
      in its session on the source server (Michael Banck, Michael Paquier)
     </para>

     <para>
      This allows <application>pg_rewind</application> 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</application>, retry opening new WAL segments when
      using <option>--follow</option> 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</filename> 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</application> 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</application> 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</productname>
      will continue to accept such removed abbreviations for timestamp input.
      But they will not be shown in the <structname>pg_timezone_names</structname>
      view nor used for output.
     </para>

     <para>
      In this update, <literal>AMT</literal> is no longer shown as being in use to
      mean Armenia Time.  Therefore, we have changed the <literal>Default</literal>
      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</productname> 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</filename> now supports remote joins, sorts,
      <command>UPDATE</command>s, and <command>DELETE</command>s
     </para>
    </listitem>

    <listitem>
     <para>
      Substantial performance improvements, especially in the area of
      scalability on multi-<acronym>CPU</acronym>-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</structname></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</structname>.
        Also, the type of lock being waited for is now visible.
        These changes replace the <structfield>waiting</structfield> column with
        <structfield>wait_event_type</structfield> and <structfield>wait_event</structfield>.
       </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()</function></link>,
        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')</literal>
        now returns <literal>-04</literal>, rather than <literal>-4</literal>.
       </para>
      </listitem>

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

       <para>
        Historically the <function>extract()</function> 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>, <literal>epoch</literal>), or <literal>NULL</literal> when
        it is not (e.g., <literal>day</literal>, <literal>hour</literal>).  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</quote> that suppressed the
        innermost line of <literal>CONTEXT</literal> for messages emitted by
        <command>RAISE</command> 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</literal> and <literal>host</literal> 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</type> 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</filename></link>'s
        standard <filename>unaccent.rules</filename> 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</type> 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>/<literal>NOCREATEUSER</literal> options from
        <command>CREATE ROLE</command> and allied commands (Tom Lane)
       </para>

       <para>
        <literal>CREATEUSER</literal> actually meant <literal>SUPERUSER</literal>,
        for ancient backwards-compatibility reasons.  This has been a
        constant source of confusion for people who (reasonably) expect
        it to mean <literal>CREATEROLE</literal>.  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_</literal> 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</application>.
       </para>
      </listitem>

      <listitem>
<!--
2016-08-07 [d8710f18f] Correct column name in information schema
-->
       <para>
        Change a column name in the
        <structname>information_schema</structname>.<structname>routines</structname>
        view from <structfield>result_cast_character_set_name</structfield>
        to <structfield>result_cast_char_set_name</structfield> (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</structname> views.
       </para>
      </listitem>

      <listitem>
<!--
2015-12-08 [d5563d7df] psql: Support multiple -c and -f options, and allow mixi
-->
       <para>
        <application>psql</application>'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</application>.
       </para>
      </listitem>

      <listitem>
<!--
2015-07-02 [5671aaca8] Improve pg_restore's -t switch to match all types of rel
-->
       <para>
        Improve <application>pg_restore</application>'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</literal> in
        <application>pg_controldata</application> and related places (Joe Conway,
        Bruce Momjian)
       </para>

       <para>
        Display epoch-and-transaction-ID values in the format
        <replaceable>number</replaceable><literal>:</literal><replaceable>number</replaceable>.
        The previous format
        <replaceable>number</replaceable><literal>/</literal><replaceable>number</replaceable> was
        confusingly similar to that used for <acronym>LSN</acronym>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</application>'d from prior versions unless
        you apply <command>ALTER EXTENSION UPDATE</command> 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</productname> 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
        <literal>min_parallel_relation_size</literal>.
       </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</acronym></link> 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></link>
        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</link> 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</type> (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</acronym> cache
        for typical cache sizes and data volumes.  Where necessary,
        the behavior can be adjusted via the new configuration parameter
        <literal>replacement_sort_tuples</literal>.
       </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>, <type>bytea</type>, and
        <type>char(n)</type> fields by using <quote>abbreviated</quote> 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></link>,
        <literal>varchar_pattern_ops</literal>, and
        <literal>bpchar_pattern_ops</literal>.  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</command> by treating
        <acronym>TID</acronym>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</literal> (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</literal>'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</acronym>-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</command>'s estimates for columns with many nulls
        (Tomas Vondra, Alex Shulgin)
       </para>

       <para>
        Previously <command>ANALYZE</command> tended to underestimate the number
        of non-<literal>NULL</literal> distinct values in a column with many
        <literal>NULL</literal>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</literal> has a foreign key restriction, say
        <literal>(a,b) REFERENCES r (x,y)</literal>, then a <literal>WHERE</literal>
        condition such as <literal>t.a = r.x AND t.b = r.y</literal> cannot
        select more than one <literal>r</literal> row per <literal>t</literal> row.
        The planner formerly considered these <literal>AND</literal> conditions
        to be independent and would often drastically misestimate
        selectivity as a result.  Now it compares the <literal>WHERE</literal>
        conditions to applicable foreign key constraints and produces
        better estimates.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><command>VACUUM</command></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</literal> 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</command>
        (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</acronym> 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</quote>
        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</acronym> 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</literal> columns that are
        functionally dependent on other columns (David Rowley)
       </para>

       <para>
        If a <literal>GROUP BY</literal> 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</literal>
        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</command> can now be used for an index-only scan by
        a query that specifies <literal>WHERE a &gt; 0</literal> and does not
        otherwise use <literal>a</literal>.  Previously this was disallowed
        because <literal>a</literal> 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</productname> 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()</function> 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()</function>
        or <function>posix_fadvise()</function>, 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</command> 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</structname>, 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</acronym>
        during <command>PREPARE TRANSACTION</command>, and will be read back from
        <acronym>WAL</acronym> during <command>COMMIT PREPARED</command> 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>,
        <type>time</type>, and <type>date</type> 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</literal>
        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</application> by
        keeping <literal>ParamListInfo</literal> 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</literal> 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</structname></link>
        system view to provide progress reporting for <command>VACUUM</command>
        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></link>,
        <function>pg_control_checkpoint()</function>,
        <function>pg_control_recovery()</function>, and
        <function>pg_control_init()</function> functions to expose fields of
        <filename>pg_control</filename> to <acronym>SQL</acronym> (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</structname></link>
        system view (Joe Conway)
       </para>

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

      <listitem>
<!--
2015-08-10 [3f811c2d6] Add confirmed_flush column to pg_replication_slots.
-->
       <para>
        Add a <structfield>confirmed_flush_lsn</structfield> column to the <link
        linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></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</structname></link>
        system view to provide information about the state of a hot-standby
        server's <acronym>WAL</acronym> 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></link>
        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</structname> 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()</function></link>
        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()</function></link>
        to report how full the <command>NOTIFY</command> 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</quote>
        summary line now.
       </para>
      </listitem>

     </itemizedlist>

    </sect4>

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

     <itemizedlist>

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

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

      <listitem>
<!--
2016-04-08 [2f1d2b7a7] Set PAM_RHOST item for PAM authentication
-->
       <para>
        When using <link linkend="auth-pam"><acronym>PAM</acronym>
        authentication</link>, provide the client IP address or host name
        to <acronym>PAM</acronym> modules via the <literal>PAM_RHOST</literal> 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</literal> 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</acronym> passwords</link>
        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</acronym>
        authentication</link> parameters
        <varname>compat_realm</varname> and <varname>upn_username</varname> to control
        whether <productname>NetBIOS</productname> or <productname>Kerberos</productname>
        realm names and user names are used during <acronym>SSPI</acronym>
        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</varname> 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</literal> 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</systemitem> (Peter Eisentraut)
       </para>
      </listitem>

      <listitem>
<!--
2016-03-18 [b555ed810] Merge wal_level "archive" and "hot_standby" into new nam
-->
       <para>
        Merge the <literal>archive</literal> and <literal>hot_standby</literal> values
        of the <xref linkend="guc-wal-level"> configuration parameter
        into a single new value <literal>replica</literal> (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</literal> internally.
       </para>
      </listitem>

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

       <para>
        This allows the use of <application>systemd</application> service units of
        type <literal>notify</literal>, which greatly simplifies the management
        of <productname>PostgreSQL</productname> under <application>systemd</application>.
       </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</acronym> key file to have group read
        access if it is owned by <literal>root</literal> (Christoph Berg)
       </para>

       <para>
        Formerly, we insisted the key file be owned by the
        user running the <productname>PostgreSQL</productname> server, but
        that is inconvenient on some systems (such as <systemitem
        class="osname">Debian</systemitem>) that are configured to manage
        certificates centrally.  Therefore, allow the case where the key
        file is owned by <literal>root</literal> 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</acronym>
        even when issued by a transaction that has no <acronym>XID</acronym>
        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</acronym>
        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</literal> 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</emphasis> 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()</function></link>,
        to allow reserving <acronym>WAL</acronym> 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</acronym> 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</application></link>
        (Peter Eisentraut)
       </para>

       <para>
        This lets <application>pg_basebackup</application> use a replication
        slot defined for <acronym>WAL</acronym> 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()</function></link>
        and <function>pg_stop_backup()</function> 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</literal>s (Andrew Gierth, Tom Lane)
       </para>

       <para>
        In the context of <literal>SELECT FROM function(...)</literal>, a function
        that returned a set of composite values was previously not allowed
        to return a plain <literal>NULL</literal> value as part of the set.
        Now that is allowed and interpreted as a row of <literal>NULL</literal>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</command> with multiple
        <literal>VALUES</literal> 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 (...)</literal>.
       </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</command>
        output expressions until after an <literal>ORDER BY</literal> 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</literal>, and that they are not evaluated more times than required
        when there is a <literal>LIMIT</literal> 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</command>, to
        correctly report tuple counts larger than 4 billion.  This also
        applies to PL/pgSQL's <command>GET DIAGNOSTICS ... ROW_COUNT</command>
        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</literal> 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</literal> 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</literal>, 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</acronym> 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</command> to copy the output of an
        <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal>
        ... <literal>RETURNING</literal> query (Marko Tiikkaja)
       </para>

       <para>
        Previously, an intermediate <acronym>CTE</acronym> 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</replaceable> 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</literal>).
        However, the object is not part of the extension, and thus will
        be dumped separately by <application>pg_dump</application>.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-19 [bc4996e61] Make ALTER .. SET SCHEMA do nothing, instead of throwing
-->
       <para>
        Make <command>ALTER <replaceable>object</replaceable> SET SCHEMA</command> 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> option to <command>ALTER TABLE
        ADD COLUMN</command> (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</command>
        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</command></link> 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</literal> 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</command> include an <type>OID</type>
        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</literal> constraint is declared <literal>NOT VALID</literal>
        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</literal> constraints.
       </para>
      </listitem>

      <listitem>
<!--
2016-03-25 [c94959d41] Fix DROP OPERATOR to reset oprcom/oprnegate links to the
-->
       <para>
        Fix <command>DROP OPERATOR</command> to clear
        <structname>pg_operator</structname>.<structfield>oprcom</structfield> and
        <structname>pg_operator</structname>.<structfield>oprnegate</structfield> 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</type> 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</command> output
        (Tom Lane)
       </para>

       <para>
        In certain cases, typically involving SubPlan nodes in index
        conditions, <command>EXPLAIN</command> 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</type> 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</application> revoke the
        default public <literal>EXECUTE</literal> 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</literal>,
        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</link> 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</type>
        input using the new operators <literal>&lt;-&gt;</literal> and
        <literal>&lt;<replaceable>N</replaceable>&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</replaceable> 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:]</literal> (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</type> values very close to the
        implementation limits.  Previously, the <quote>same</quote> value might
        be accepted or not depending on the <varname>timezone</varname> 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</acronym> time, not local time, so as to
        be independent of <varname>timezone</varname>.
       </para>

       <para>
        Also, <productname>PostgreSQL</productname> is now more careful to detect
        overflow in operations that compute new date or timestamp values,
        such as <type>date</type> <literal>+</literal> <type>integer</type>.
       </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</literal> and
        <literal>NaN</literal> 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</type> 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</literal></link>
        dictionary type to handle modern <productname>Hunspell</productname> 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</link>
        (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>\</literal><replaceable>nnn</replaceable> 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</application> releases.
       </para>
      </listitem>

      <listitem>
<!--
2015-11-07 [c5e86ea93] Add "xid <> xid" and "xid <> int4" operators.
-->
       <para>
        Add transaction ID operators <type>xid</type> <literal>&lt;&gt;</literal>
        <type>xid</type> and <type>xid</type> <literal>&lt;&gt;</literal> <type>int4</type>,
        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></link>
        function to insert a new element into a <type>jsonb</type> array,
        or a not-previously-existing key into a <type>jsonb</type> 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>, <function>log()</function>,
        <function>exp()</function>, and <function>pow()</function> functions for type
        <type>numeric</type> (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></link>
        function to extract the display scale of a <type>numeric</type> 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()</function></link>
        measures its argument in degrees, whereas <function>sin()</function>
        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</literal>
        and <literal>NaN</literal> inputs per the <acronym>POSIX</acronym> standard
        (Dean Rasheed)
       </para>

       <para>
        The <acronym>POSIX</acronym> standard says that these functions should
        return <literal>NaN</literal> for <literal>NaN</literal> input, and should throw
        an error for out-of-range inputs including <literal>infinity</literal>.
        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)</function></link>
        convert float <literal>infinity</literal> to
        timestamp <literal>infinity</literal> (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</type> data (Stas Kelvich)
       </para>

       <para>
        The new functions are <link
        linkend="textsearch-functions-table"><function>ts_delete()</function></link>,
        <function>ts_filter()</function>, <function>unnest()</function>,
        <function>tsvector_to_array()</function>, <function>array_to_tsvector()</function>,
        and a variant of <function>setweight()</function> 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()</function></link>
        and <link linkend="textsearch-update-triggers"><function>tsvector_update_trigger()</function></link>
        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</type> where <type>text</type> 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()</function></link>
        and <function>num_nonnulls()</function> 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)</literal>
        which asserts that exactly one of a,b,c is not <literal>NULL</literal>.
        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()</function></link>
        to split a qualified, possibly quoted <acronym>SQL</acronym> 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()</function></link>,
        interpret a <literal>V</literal> format code as dividing by 10 to the
        power of the number of digits following <literal>V</literal> (Bruce
        Momjian)
       </para>

       <para>
        This makes it operate in an inverse fashion to
        <function>to_char()</function>.
       </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*()</function></link>
        functions accept type <type>text</type> not <type>cstring</type>
        (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></link>
        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()</function> 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')</literal>.
       </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()</function></link>,
        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</replaceable> argument to the <link
        linkend="functions-admin-set-table"><function>current_setting()</function></link>
        function (David Christensen)
       </para>

       <para>
        This allows avoiding an error for an unrecognized parameter
        name, instead returning a <literal>NULL</literal>.
       </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</literal> for invalid input (Michael Paquier)
       </para>

       <para>
        <link
        linkend="functions-info-catalog-table"><function>pg_get_viewdef()</function></link>
        now returns <literal>NULL</literal> if given an invalid view <type>OID</type>,
        and several similar functions likewise return <literal>NULL</literal> for
        bad input.  Previously, such cases usually led to <quote>cache
        lookup failed</quote> 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()</function></link>
        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</structname>
        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</command> and <command>EXIT</command> 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</application>'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</application>, 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</application> to use Tcl's <quote>object</quote>
        <acronym>API</acronym>s instead of simple strings (Jim Nasby, Karl
        Lehenbauer)
       </para>

       <para>
        This can improve performance substantially in some cases.
        Note that <application>PL/Tcl</application> 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</application>, make database-reported errors return
        additional information in Tcl's <varname>errorCode</varname> 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</application> to perform encoding conversion between
        the database encoding and <literal>UTF-8</literal>, which is what Tcl
        expects (Tom Lane)
       </para>

       <para>
        Previously, strings were passed through without conversion,
        leading to misbehavior with non-<literal>ASCII</literal> characters when
        the database encoding was not <literal>UTF-8</literal>.
       </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</link> 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</application> whereby the
        <literal>CONTEXT</literal> 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()</function></link>
        is now to print <literal>CONTEXT</literal>
        only for errors.  The new function <link
        linkend="libpq-pqseterrorcontextvisibility"><function>PQsetErrorContextVisibility()</function></link>
        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</application> 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()</function></link>.
        This supports <application>psql</application>'s new <literal>\errverbose</literal>
        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</application>'s <link
        linkend="libpq-pqhost"><function>PQhost()</function></link> function to return
        useful data for default Unix-socket connections (Tom Lane)
       </para>

       <para>
        Previously it would return <literal>NULL</literal> 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</application>'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> option
        to <link linkend="app-pgdump"><application>pg_dump</application></link>
        and <link linkend="app-pgrestore"><application>pg_restore</application></link>
        (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</application>, 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</application> 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</application> 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</application> 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</application> terminates.
       </para>
      </listitem>

      <listitem>
<!--
2016-04-08 [c09b18f21] Support \crosstabview in psql
-->
       <para>
        Add a <command>\crosstabview</command> 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</literal> 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</varname> 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</literal> and <literal>\sv</literal> commands for editing and
        showing view definitions (Petr Korobeinikov)
       </para>

       <para>
        These are parallel to the existing <literal>\ef</literal> and
        <literal>\sf</literal> 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> 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</replaceable></literal>
        to set the table title, for consistency with <literal>\C
        <replaceable>string</replaceable></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</literal> 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> command
        (Michael Paquier, Tom Lane)
       </para>

       <para>
        Include the <command>\pset title</command> string if one has
        been set, and shorten the prefabricated part of the
        header to be <literal><replaceable>timestamp</replaceable> (every
        <replaceable>N</replaceable>s)</literal>.  Also, the timestamp format now
        obeys <application>psql</application>'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</literal> option <literal>%p</literal> 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</literal> field of
        messages can be suppressed, either always or only for non-error
        messages (Pavel Stehule)
       </para>

       <para>
        Printing <literal>CONTEXT</literal> 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+</command> 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</application> 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</application>.)
       </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</link>, in
        expressions in backslash commands (Fabien Coelho)
       </para>
      </listitem>

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

       <para>
        The new built-in functions include <link
        linkend="pgbench-functions"><function>random()</function></link>,
        <function>random_exponential()</function>, and
        <function>random_gaussian()</function>, which perform the same work as
        <command>\setrandom</command>, but are easier to use since they can be
        embedded in larger expressions.  Since these additions have made
        <command>\setrandom</command> 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</option> switch, which works
        similarly to <option>-f</option> 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</application>
        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> 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</option>) to not
        be an exact multiple of the number of threads (<option>-j</option>)
        (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> 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</application> 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</application>'s
        post-bootstrap phase (Tom Lane)
       </para>

       <para>
        Previously, an error here led to reporting the entire input
        file as the <quote>failing query</quote>; now just the current
        query is reported.  To get the desired behavior, queries in
        <application>initdb</application>'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</application> 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</application></link>
        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>/<function>heap_modifytuple</function>/<function>heap_deformtuple</function>
        functions (Peter Geoghegan)
       </para>
      </listitem>

      <listitem>
<!--
2016-08-27 [b9fe6cbc8] Add macros to make AllocSetContextCreate() calls simpler
-->
       <para>
        Add macros to make <function>AllocSetContextCreate()</function> 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>,
        <symbol>ALLOCSET_SMALL_SIZES</symbol>,
        or <symbol>ALLOCSET_START_SMALL_SIZES</symbol>.
        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</literal> 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</application> 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</varname> 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</application>'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</structname> 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</acronym></link> to hide most of it at
        the <application>C</application> level (Alexander Korotkov, Andrew Gierth)
       </para>

       <para>
        This change modernizes the index <acronym>AM API</acronym> to look more
        like the designs we have adopted for foreign data wrappers and
        tablesample handlers.  This simplifies the <application>C</application> 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</structname> 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</structname>.
       </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</structname></link>
        system catalog to hold original privileges
        of <application>initdb</application>-created and extension-created objects
        (Stephen Frost)
       </para>

       <para>
        This infrastructure allows <application>pg_dump</application> 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</literal>
        (Amit Kapila, Robert Haas)
       </para>

       <para>
        The <function>RequestAddinLWLocks()</function> function is removed,
        and replaced by <function>RequestNamedLWLockTranche()</function>.
        This allows better identification of custom <literal>LWLocks</literal>,
        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</application>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</literal>, 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</application>'s <application>flex</application> 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</application> has really gotten
        it right among our supported client programs.
       </para>

       <para>
        A new source-code subdirectory <filename>src/fe_utils/</filename> 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</literal> <acronym>API</acronym> 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</acronym> records
        (Alexander Korotkov, Petr Jel&iacute;nek, Markus Nullmeier)
       </para>

       <para>
        This change allows extensions to write <acronym>WAL</acronym> records for
        changes to pages using a standard layout.  The problem of needing to
        replay <acronym>WAL</acronym> 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</acronym>
        support for them.
       </para>
      </listitem>

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

       <para>
        This feature allows extensions to insert data into the
        <acronym>WAL</acronym> 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</quote> while descending the index (Alexander
        Lebedev, Teodor Sigaev)
       </para>

       <para>
        This is somewhat like the <quote>reconstructed value</quote>, 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</literal> message level for
        <function>ereport()</function> (David Steele)
       </para>

       <para>
        This level acts like <literal>LOG</literal> 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</filename> target to build all generated
        headers (Michael Paquier, Tom Lane)
       </para>

       <para>
        <literal>submake-generated-headers</literal> 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</quote>.
       </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</literal> to
        allow <link linkend="auto-explain"><filename>contrib/auto_explain</filename></link>
        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</filename></link> 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</filename></link>, 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</filename>'s <link
        linkend="hstore-func-table"><function>hstore_to_jsonb_loose()</function></link>
        and <function>hstore_to_json_loose()</function> functions agree on what
        is a number (Tom Lane)
       </para>

       <para>
        Previously, <function>hstore_to_jsonb_loose()</function> would convert
        numeric-looking strings to <acronym>JSON</acronym> numbers, rather than
        strings, even if they did not exactly match the <acronym>JSON</acronym>
        syntax specification for numbers.  This was inconsistent with
        <function>hstore_to_json_loose()</function>, so tighten the test to match
        the <acronym>JSON</acronym> 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</filename></link> 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</filename></link>'s
        <function>heap_page_items()</function> function show the raw data in each
        tuple, and add new functions <function>tuple_data_split()</function> and
        <function>heap_page_item_attrs()</function> 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</literal> iteration count parameter to
        <link linkend="pgcrypto"><filename>contrib/pgcrypto</filename></link>'s
        <function>pgp_sym_encrypt()</function> 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</quote> to
        <link linkend="pgtrgm"><filename>contrib/pg_trgm</filename></link>
        (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</varname> for
        <filename>contrib/pg_trgm</filename>'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()</function>
        and <function>show_limit()</function>.  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</filename>'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</filename> 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</filename></link> 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></link>
        function to <filename>contrib/sslinfo</filename>, to print information
        about <acronym>SSL</acronym> extensions present in the <literal>X509</literal>
        certificate used for the current connection (Dmitry Voronin)
       </para>
      </listitem>

    </itemizedlist>

    <sect4>
     <title><link linkend="postgres-fdw"><filename>postgres_fdw</filename></link></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</command> or <command>DELETE</command>
        entirely on the remote server (Etsuro Fujita)
       </para>

       <para>
        Formerly, remote updates involved sending a <command>SELECT FOR UPDATE</command>
        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</filename> 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>
