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

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

  <formalpara>
   <title>Release date:</title>
   <para>2020-XX-XX, CURRENT AS OF 2020-05-03</para>
  </formalpara>

  <sect2>
   <title>Overview</title>

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

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

   <itemizedlist>

    <listitem>
    <para></para>
    </listitem>

   </itemizedlist>

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

  </sect2>

  <sect2>

  <title>Migration to Version 13</title>

   <para>
    A dump/restore using <xref linkend="app-pg-dumpall"/> or use of <xref
    linkend="pgupgrade"/> or logical replication is required for those
    wishing to migrate data from any previous release.  See <xref
    linkend="upgrading"/> for general information on migrating to new major
    releases.
   </para>

   <para>
    Version 13 contains a number of changes that may affect compatibility
    with previous releases.  Observe the following incompatibilities:
   </para>

   <itemizedlist>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-09-07 [ca70bdaef] Fix issues around strictness of SIMILAR TO.
-->

<para>
Change SIMILAR TO ... ESCAPE NULL to return NULL (Tom Lane)
</para>

<para>
This new behavior matches the SQL specification.  Previously this caused the escape to be set to the default backslash character.  The previous behavior has been retained in old views by keeping the
original function unchanged.  This also applies to substring(text FROM pattern ESCAPE text).
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 [870ad6a59] Fix not-quite-right string comparison in parse_jsonb_ind
-->

<para>
Have parse_jsonb_index_flags() properly check "string" parameter (Dominik Czarnota)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-28 [9950c8aad] Fix lquery's behavior for consecutive '*' items.
-->

<para>
In ltree, when using adjacent asterisks with braces, e.g. "*{2}.*{3}", properly interpret that as "*{5}" (Nikita Glukhov)
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-03-16 [b09ff5366] Simplify the effective_io_concurrency setting.
-->

<para>
Change the way non-default effective_io_concurrency values affect concurrency (Thomas Munro)
</para>

<para>
Previously, this value was adjusted before effecting the number of concurrent requests.  This value is now used directly.  Conversion of old values to new ones can be done using:
</para>

<para>
      SELECT round(sum(OLD / n::float)) FROM generate_series(1, OLD) s(n);
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-11-12 [5c46e7d82] pg_stat_{ssl,gssapi}: Show only processes with connectio
-->

<para>
Prevent display of auxiliary processes in pg_stat_ssl and pg_stat_gssapi system views (Euler Taveira)
</para>

<para>
Queries that join these views to pg_stat_activity and wish to see auxiliary processes will need to use left joins.
</para>

</listitem>

<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2020-03-07 [691e8b2e1] pageinspect: Fix types used for bt_metap() columns.
-->

<para>
Fix pageinspect's bt_metap() to return more appropriate data types that are less likely to overflow (Peter Geoghegan)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-19 [1d253bae5] Rename the recovery-related wait events.
-->

<para>
Rename some recovery-related wait events (Fujii Masao)
</para>

<para>
Rename RecoveryWalAll to RecoveryWalStream and RecoveryWalStream to RecoveryRetrieveRetryInterval.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-11-06 [979766c0a] Correct the command tags for ALTER ... RENAME COLUMN.
-->

<para>
Fix ALTER FOREIGN TABLE ... RENAME COLUMN to return a more appropriate command tag (Fujii Masao)
</para>

<para>
Previously it returned "ALTER TABLE", but now returns "ALTER FOREIGN TABLE".
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-11-06 [979766c0a] Correct the command tags for ALTER ... RENAME COLUMN.
-->

<para>
Fix ALTER MATERIALIZED VIEW ... RENAME COLUMN to return a more appropriate command tag (Fujii Masao)
</para>

<para>
Previously it returned "ALTER TABLE", but now returns "ALTER MATERIALIZED VIEW".
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-05 [84eca14bc] Remove ancient hacks to ignore certain opclass names in 
-->

<para>
Remove support for defining operator classes using pre-Postgres 8.0 syntax (Daniel Gustafsson)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-05 [e58a59975] Remove ancient support for upgrading pre-7.3 foreign key
-->

<para>
Remove support for defining foreign key constraints using pre-Postgres 7.3 syntax (Daniel Gustafsson)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-05 [bb03010b9] Remove the "opaque" pseudo-type and associated compatibi
-->

<para>
Remove support for "opaque" pseudo-types used by pre-Postgres 7.3 servers (Daniel Gustafsson)
</para>

</listitem>

   </itemizedlist>

  </sect2>

  <sect2>
   <title>Changes</title>

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

   <sect3>
    <title>Server</title>

    <sect4>
     <title><link linkend="ddl-partitioning">Partitioning</link></title>

     <itemizedlist>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-08-07 [4e85642d9] Apply constraint exclusion more generally in partitionin
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-08-13 [815ef2f56] Don't constraint-exclude partitioned tables as much
-->

<para>
Improve cases where pruning of partitions can happen (Amit Langote, Yuzuko Hosoya, &Aacute;lvaro Herrera)
</para>

</listitem>

<listitem>
<!--
Author: Etsuro Fujita <efujita@postgresql.org>
2020-04-08 [c8434d64c] Allow partitionwise joins in more cases.
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-07 [981643dcd] Allow partitionwise join to handle nested FULL JOIN USIN
-->

<para>
Allow partitionwise joins to happen in more cases (Ashutosh Bapat, Etsuro Fujita, Amit Langote)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-03-18 [487e9861d] Enable BEFORE row-level triggers for partitioned tables
-->

<para>
Allow BEFORE row-level triggers on partitioned tables (&Aacute;lvaro Herrera)
</para>

<para>
These triggers cannot change which partition is the destination.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-04-06 [f1ac27bfd] Add logical replication support to replicate into partit
-->

<para>
Allow logical replication to replicate partitioned tables (Amit Langote)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-10 [17b9e7f9f] Support adding partitioned tables to publication
-->

<para>
Allow partitioned tables to be added to replicated publications (Amit Langote)
</para>

<para>
Partition additions/removals are replicated as well.  Previously, partitions had to be replicated individually.  HOW IS THIS DIFFERENT FROM THE ITEM ABOVE?
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-04-08 [83fd4532a] Allow publishing partition changes via ancestors
-->

<para>
Allow CREATE PUBLICATION to control whether partitioned tables are published as themselves or their ancestors (Amit Langote)
</para>

<para>
The option is publish_via_partition_root.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-12-25 [bb4114a4e] Allow whole-row Vars to be used in partitioning expressi
-->

<para>
Allow ROW values to be used as partitioning expressions (Amit Langote)
</para>

</listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Indexes</title>

     <itemizedlist>

<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2020-02-26 [0d861bbb7] Add deduplication to nbtree.
-->

<para>
More efficiently store duplicates in btree indexes (Anastasia Lubennikova, Peter Geoghegan)
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-07-14 [c085e1c1c] Add support for <-> (box, point) operator to GiST box_op
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-07-14 [075f0a880] Add support for <-> (box, point) operator to SP-GiST box
-->

<para>
Allow GiST and SP-GiST indexes for box/point distance lookups (Nikita Glukhov)
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2020-01-18 [4b754d6c1] Avoid full scan of GIN indexes when possible
-->

<para>
Allow GIN indexes to more efficiently handle NOT restrictions (Nikita
Glukhov, Alexander Korotkov, Tom Lane, Julien Rouhaud)
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2020-03-30 [911e70207] Implement operator class parameters
-->

<para>
Allow index operator classes to take parameters (Nikita Glukhov)
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2020-03-30 [911e70207] Implement operator class parameters
-->

<para>
Allow CREATE INDEX to specify the GiST signature length and maximum number of integer ranges (Nikita Glukhov)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-12-06 [fbbf68094] Disallow non-default collation in ADD PRIMARY KEY/UNIQUE
-->

<para>
Prevent indexes that use non-default collations from being added as a table's unique or primary key constraint (Tom Lane)
</para>

<para>
The index and column collations must now match so the index's uniqueness matches the column's uniqueness.
</para>

</listitem>


     </itemizedlist>

    </sect4>

    <sect4>
     <title>Optimizer</title>

     <itemizedlist>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-01 [a80818605] Improve selectivity estimation for assorted match-style 
-->

<para>
Improve the optimizer's selectivity estimation for containment/match operators (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-09-11 [d06215d03] Allow setting statistics target for extended statistics
-->

<para>
Allow setting statistics target for extended statistics (Tomas Vondra)
</para>

<para>
This is controlled with the new command option ALTER STATISTICS ... SET STATISTICS.  Previously this was computed based on more general statistics target settings.
</para>

</listitem>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-01-13 [aaa676187] Apply all available functional dependencies
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-01-13 [eae056c19] Apply multiple multivariate MCV lists when possible
-->

<para>
Allow use of multiple extended statistics objects in a single query (Tomas Vondra)
</para>

</listitem>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-03-14 [8f321bd16] Use functional dependencies to estimate ScalarArrayOpExp
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-03-14 [e83daa7e3] Use multi-variate MCV lists to estimate ScalarArrayOpExp
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-03-18 [ccaa3569f] Recognize some OR clauses as compatible with functional 
-->

<para>
Allow use of extended statistics objects for OR clauses and IN/ANY constant lists (Pierre Ducroquet, Tomas Vondra)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-08-01 [7266d0997] Allow functions-in-FROM to be pulled up if they reduce t
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-09-24 [a9ae99d01] Prevent bogus pullup of constant-valued functions return
-->

<para>
Allow functions in FROM clauses to be moved to their reference sites if they evaluate to constants (Alexander Kuzmenkov, Aleksandr Parfenov)
</para>

</listitem>


     </itemizedlist>

    </sect4>

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

     <itemizedlist>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-04-06 [d2d8a229b] Implement Incremental Sort
-->

<para>
Implement incremental sorting (James Coleman, Alexander Korotkov, Tomas Vondra)
</para>

<para>
If a result is already sorted by several leading keys, this allows for batch sorting of additional trailing keys because the previous keys are already equal.  This is controlled by enable_incrementalsort.
</para>

</listitem>

<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2019-08-01 [71dcd7438] Add sort support routine for the inet data type.
-->

<para>
Improve the performance of sorting inet values (Brandur Leach)
</para>

</listitem>

<listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
2020-03-18 [1f39bce02] Disk-based Hash Aggregation.
Author: Jeff Davis <jdavis@postgresql.org>
2020-03-24 [dd8e19132] Consider disk-based hash aggregation to implement DISTIN
-->

<para>
Allow hash aggregation to use disk storage for large aggregation result sets (Jeff Davis)
</para>

<para>
Previously, hash aggregation was avoided if it was expected to use more than work_mem memory.  This is controlled by enable_hashagg_disk.
</para>

</listitem>

<listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
2020-03-18 [1f39bce02] Disk-based Hash Aggregation.
-->

<para>
Allow grouping sets to use hash aggregation with disk storage for large grouping set results (Jeff Davis)
</para>

<para>
Previously, hash aggregation was avoided if it was expected to use more than work_mem memory.  This is controlled by enable_hashagg_disk.
WHAT USED TO HAPPEN?
</para>

</listitem>

<listitem>
<!--
Author: David Rowley <drowley@postgresql.org>
2020-03-28 [b07642dbc] Trigger autovacuum based on number of INSERTs
-->

<para>
Allow inserts to trigger autovacuum activity (Laurenz Albe, Darafei Praliaskouski)
</para>

<para>
This new behavior allows pages to be set as all-visible, which then allows index-only scans, and reduces the work necessary when the table needs to be frozen.
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-03-16 [fc34b0d9d] Introduce a maintenance_io_concurrency setting.
-->

<para>
Add maintenance_io_concurrency to control I/O concurrency for maintenance operations (Thomas Munro)
</para>

</listitem>

<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
2020-04-04 [c6b92041d] Skip WAL for new relfilenodes, under wal_level=minimal.
-->

<para>
Allow skipping of WAL for new tables and indexes if wal_level is 'minimal' (Noah Misch)
</para>

<para>
Relations larger than wal_skip_threshold will have their files fsync'ed rather than writing their WAL records.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-28 [8f3ec75de] Enable Unix-domain sockets support on Windows
-->

<para>
Enable Unix-domain sockets support on Windows (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-11-21 [e6d806952] Make DROP DATABASE command generate less WAL records.
-->

<para>
Improve the performance when replaying DROP DATABASE commands when many tablespaces are in use (Fujii Masao)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-09-24 [6d05086c0] Speedup truncations of relation forks.
-->

<para>
Improve performance for truncation of very large relations (Kirk Jamison)
</para>

</listitem>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-10-01 [11a078cf8] Optimize partial TOAST decompression
-->

<para>
Improve retrieving of only the leading bytes of TOAST values (Binguo Bao)
</para>

<para>
Previously, TOAST values were fully fetched and only the requested leading bytes were decompressed and returned.  Now, only the requested bytes are fetched.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-09-10 [bca6e6435] Reduce overhead of scanning the backend[] array in LISTE
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-09-22 [51004c717] Make some efficiency improvements in LISTEN/NOTIFY.
-->

<para>
Improve performance of LISTEN/NOTIFY (Martijn van Oosterhout)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-08-15 [bb5ae8f6c] Use a hash table to de-duplicate NOTIFY events faster.
-->

<para>
Improve the efficiency of removing duplicate NOTIFY events (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
2020-02-01 [1fd687a03] Optimizations for integer to decimal output.
-->

<para>
Use lookup tables to speed up integer to text conversion (David Fetter)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-07-10 [b5810de3f] Reduce memory consumption for multi-statement query stri
-->

<para>
Reduce memory usage for query strings that contain multiple SQL statements (Amit Langote)
</para>

</listitem>


     </itemizedlist>

    </sect4>

    <sect4>
     <title>Monitoring</title>

     <itemizedlist>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2020-04-05 [6b466bf5f] Allow pg_stat_statements to track WAL usage statistics.
Author: Amit Kapila <akapila@postgresql.org>
2020-04-06 [33e05f89c] Add the option to report WAL usage in EXPLAIN and auto_e
Author: Amit Kapila <akapila@postgresql.org>
2020-04-06 [b7ce6de93] Allow autovacuum to log WAL usage statistics.
-->

<para>
Allow EXPLAIN, auto_explain, autovacuum, and pg_stat_statements to track WAL usage statistics (Kirill Bychik, Julien Rouhaud)
</para>

</listitem>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-11-06 [6e3e6cc0e] Allow sampling of statements depending on duration
-->

<para>
Allow a sample of statements to be logged (Adrien Nayrat)
</para>

<para>
A log_statement_sample_rate ratio of statements taking over log_min_duration_sample duration will be logged.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-15 [70a7b4776] Add backend type to csvlog and optionally log_line_prefi
-->

<para>
Add the backend type to csvlog and optionally log_line_prefix log output (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-12-11 [ba79cb5dc] Emit parameter values during query bind/execute errors
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-02 [0b34e7d30] Improve user control over truncation of logged bind-para
-->

<para>
Improve control of prepared statement parameter logging (Alexey Bashtanov, &Aacute;lvaro Herrera)
</para>

<para>
The GUC setting log_parameter_max_length controls the maximum length of parameter values output during statement non-error logging, and log_parameter_max_length_on_error does the same for error statement logging.
Previously, prepared statement parameters were not logged during errors.
error.
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-02-05 [15d13e829] Make vacuum buffer counters 64 bits wide
-->

<para>
Make vacuum buffer counters 64-bits wide to avoid overflow (&Aacute;lvaro Herrera)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-11-08 [71a8a4f6e] Add backtrace support for error reporting
-->

<para>
Allow function call backtraces of errors to be logged (Peter Eisentraut, &Aacute;lvaro Herrera)
</para>

<para>
Server variable backtrace_functions specifies which C functions should generate backtraces on error.
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-07-05 [313f87a17] Add min() and max() aggregates for pg_lsn
-->

<para>
Add min() and max() aggregates for pg_lsn (Fabr&iacute;zio de Royes Mello)
</para>

<para>
This is useful for monitoring queries.
</para>

</listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>System Views</title>

     <itemizedlist>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2020-02-06 [b025f32e0] Add leader_pid to pg_stat_activity
-->

<para>
Add leader_pid to pg_stat_activity to report parallel worker ownership (Julien Rouhaud)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-03 [e65497df8] Report progress of streaming base backup.
-->

<para>
Add system view pg_stat_progress_basebackup to report the progress of streaming base backups (Fujii Masao)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-01-15 [a166d408e] Report progress of ANALYZE commands
-->

<para>
Add system view pg_stat_progress_analyze to report analyze progress (&Aacute;lvaro Herrera, Tatsuro Yamada)
</para>

</listitem>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2019-11-21 [9290ad198] Track statistics for spilling of changes from ReorderBuf
-->

<para>
Add columns to the pg_stat_replication system view to report how much logical decoding information has been spilled to disk (Tomas Vondra)
</para>

</listitem>

<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2020-01-09 [ed10f32e3] Add pg_shmem_allocations view.
-->

<para>
Add system view pg_shmem_allocations to display shared memory usage (Andres Freund, Robert Haas)
</para>

<para>
WHAT IS THE ENTRY WITH NO NAME?
</para>

</listitem>

<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2020-04-02 [28cac71bd] Collect statistics about SLRU caches
-->

<para>
Create pg_stat_slru system view to monitor internal SLRU caches (Tomas Vondra)
</para>

</listitem>

<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2020-01-07 [814727858] Increase the maximum value of track_activity_query_size.
-->

<para>
Allow track_activity_query_size to be set up to 1MB (Vyacheslav Makarov)
</para>

<para>
The previous maximum was 100kB.
</para>

</listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title>Wait Events</title>

     <itemizedlist>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-01-31 [ef02fb15a] Report time spent in posix_fallocate() as a wait event.
-->

<para>
Add wait event for posix_fallocate() (Thomas Munro)
</para>

</listitem>

<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2020-03-23 [cedffbdb8] Report wait event for cost-based vacuum delay.
-->

<para>
Add wait event VacuumDelay to report on cost-based vacuum delay (Justin Pryzby)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-24 [b8e20d6da] Add wait events for WAL archive and recovery pause.
-->

<para>
Add wait events for WAL archive and recovery pause (Fujii Masao)
</para>

<para>
The new events are BackupWaitWalArchive and RecoveryPause.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-04-03 [18808f8c8] Add wait events for recovery conflicts.
-->

<para>
Add  wait events RecoveryConflictSnapshot and RecoveryConflictTablespace to monitor recovery conflicts (Masahiko Sawada)
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-02-05 [815c2f097] Add kqueue(2) support to the WaitEventSet API.
-->

<para>
Improve performance of wait events on BSD-based systems (Thomas Munro)
</para>

</listitem>

     </itemizedlist>

    </sect4>

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

     <itemizedlist>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-09 [d9249441e] Mark ssl_passphrase_command as GUC_SUPERUSER_ONLY.
-->

<para>
Only allow superusers to view the ssl_passphrase_command setting (Insung Moon)
</para>

<para>
This was changed as a security precaution.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-12-04 [b1abfec82] Update minimum SSL version
-->

<para>
Change the default minimum TLS version from 1.0 to 1.2 (Peter Eisentraut)
</para>

<para>
This is controlled by ssl_min_protocol_version.
</para>

</listitem>


     </itemizedlist>

    </sect4>

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

     <itemizedlist>

<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2020-01-16 [2eb34ac36] Fix problems with "read only query" checks, and refactor
-->

<para>
Tighten rules on which utility commands are possible in transaction_read_only mode (Robert Haas)
</para>

<para>
This also increases the number of utility commands that can run in parallel queries.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-11-29 [c4a7a392e] Make allow_system_table_mods settable at run time
-->

<para>
Allow allow_system_table_mods to be changed after server start (Peter Eisentraut)
</para>

<para>
Previously, this could only be set at server start.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-11-29 [508bf95b7] Remove any-user DML capability from allow_system_table_m
-->

<para>
Disallow non-superusers from modifying system tables when allow_system_table_mods is set (Peter Eisentraut)
</para>

<para>
Previously, if allow_system_table_mods was set at server start, non-superusers could issue INSERT/UPDATE/DELETE commands on system tables.
</para>

</listitem>


     </itemizedlist>

    </sect4>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-03-27 [1e6148032] Allow walreceiver configuration to change on reload
-->

<para>
Allow streaming replication configuration settings to be changed by reload (Sergei Kornilov)
</para>

<para>
Previously, a server restart was required to change primary_conninfo and primary_slot_name.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-01-14 [329730827] walreceiver uses a temporary replication slot by default
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-03-27 [092c6936d] Set wal_receiver_create_temp_slot PGC_POSTMASTER
-->

<para>
Allow WAL receivers use a temporary replication slot if a permanent one is not specified (Peter Eisentraut, Sergei Kornilov)
</para>

<para>
This behavior can be enabled using wal_receiver_create_temp_slot.
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-04-07 [c65507763] Allow users to limit storage reserved by replication slo
-->

<para>
Allow replication slot storage to be limited by max_slot_wal_keep_size (Kyotaro Horiguchi)
</para>

<para>
Replication slots that exceed this value are invalidated.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-24 [496ee647e] Prefer standby promotion over recovery pause.
-->

<para>
Allow standby promotion to cancel any requested pause (Fujii Masao)
</para>

<para>
Previously, promotion could not happen while the standby was in paused state.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-01-29 [dc788668b] Fail if recovery target is not reached
-->

<para>
Generate an error if recovery does not reach the specified target (Leif Gunnar Erlandsen, Peter Eisentraut)
</para>

<para>
Previously, the end of the WAL would promote the standby, even if the target was not reached.
</para>

</listitem>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2019-11-19 [cec2edfa7] Add logical_decoding_work_mem to limit ReorderBuffer mem
-->

<para>
Allow control over how much memory is used by logical decoding before it is spilled to disk (Tomas Vondra, Dilip Kumar, Amit Kapila)
</para>

<para>
This is controlled by logical_decoding_work_mem.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-01-22 [41c184bc6] Add GUC ignore_invalid_pages.
-->

<para>
Allow WAL recovery to continue even if invalid pages are referenced (Fujii Masao)
</para>

<para>
This is enabled using ignore_invalid_pages.
</para>

</listitem>

    </itemizedlist>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2020-01-20 [40d964ec9] Allow vacuum command to process indexes in parallel.
-->

<para>
Allow VACUUM to process indexes in parallel (Masahiko Sawada, Amit Kapila)
</para>

<para>
The new PARALLEL option controls this.
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-04-07 [357889eb1] Support FETCH FIRST WITH TIES
-->

<para>
Allow FETCH FIRST to use WITH TIES to return any additional rows that match the last result row (Surafel Temesgen)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-04-04 [ce77abe63] Include information on buffer usage during planning phas
-->

<para>
Report planning-time buffer usage in EXPLAIN's BUFFER output (Julien Rouhaud)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-10 [cacef1722] Ensure that CREATE TABLE LIKE copies any NO INHERIT cons
-->

<para>
Have CREATE TABLE LIKE propagate CHECK's NO INHERIT property to created tables (Ildar Musin, Chris Travers)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-02-18 [b7e51b350] Make inherited LOCK TABLE perform access permission chec
-->

<para>
When using LOCK TABLE on a partitioned table, do not check permissions on the child tables (Amit Langote)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-31 [de3bbfcc9] Fix INSERT OVERRIDING USER VALUE behavior
-->

<para>
Allow OVERRIDING USER VALUE on inserts into identity columns (Dean Rasheed)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-01-14 [f595117e2] ALTER TABLE ... ALTER COLUMN ... DROP EXPRESSION
-->

<para>
Add ALTER TABLE clause DROP EXPRESSION to remove generated properties from columns (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-01-15 [1281a5c90] Restructure ALTER TABLE execution to fix assorted bugs.
-->

<para>
Fix bugs in ALTER TABLE when later clauses overlap changes made by earlier clauses in the same command (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-11-21 [30840c92a] Allow ALTER VIEW command to rename the column in the vie
-->

<para>
Add ALTER VIEW syntax to rename view columns (Fujii Masao)
</para>

<para>
This was previously possible only using ALTER TABLE RENAME COLUMN.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-06 [fe30e7ebf] Allow ALTER TYPE to change some properties of a base typ
-->

<para>
Add ALTER TYPE options useful for extensions, like TOAST and I/O functions control (Tomas Vondra, Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-07-23 [06140c201] Add CREATE DATABASE LOCALE option
-->

<para>
Add CREATE DATABASE LOCALE option (Peter Eisentraut)
</para>

<para>
This combines existing options LC_COLLATE and LC_CTYPE into a single option.
</para>

</listitem>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2019-11-13 [1379fd537] Introduce the 'force' option for the Drop Database comma
-->

<para>
Allow DROP DATABASE to disconnect users so drop succeeds (Pavel Stehule, Amit Kapila)
</para>

<para>
This is enabled by WITH FORCE.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-09 [71d60e2aa] Add tg_updatedcols to TriggerData
-->

<para>
Add C structure member tg_updatedcols to record updated columns to C triggers (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-03-20 [4e6209134] pg_dump: Add FOREIGN to ALTER statements, if appropriate
-->

<para>
Add FOREIGN to ALTER statements, if appropriate (Luis Carril)
</para>

<para>
WHAT IS THIS ABOUT?
</para>

</listitem>

    </itemizedlist>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Tom Lane <tgl@sss.pgh.pa.us>
2020-03-19 [24e2885ee] Introduce "anycompatible" family of polymorphic types.
-->

<para>
Add polymorphic data types for use by functions requiring compatible arguments (Pavel Stehule)
</para>

<para>
The new data types are anycompatible, anycompatiblearray, anycompatiblenonarray, and anycompatiblerange.
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-04-07 [aeec457de] Add SQL type xid8 to expose FullTransactionId to users.
-->

<para>
Add SQL data type xid8 to expose FullTransactionId (Thomas Munro)
</para>

<para>
The xid data type is only four bytes so does not show the transaction epoch.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-18 [a2b1faa0f] Implement type regcollation
-->

<para>
Add data type regcollation and helper functions for system collations (Julien Rouhaud)
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-10-16 [d5ac14f9c] Use libc version as a collation version on glibc systems
-->

<para>
Use the glibc version in some cases as the collation version (Thomas Munro)
</para>

<para>
If the glibc version changes, a warning will be issued when a mismatching collation is used.
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-03-25 [352f6f2df] Add collation versions for Windows.
-->

<para>
Add support for collation versions on Windows (Thomas Munro)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-10-28 [8b7a0f1d1] Allow extracting fields from a ROW() expression in more 
-->

<para>
Allow ROW values to have their members extracted with suffix notation (Tom Lane)
</para>

<para>
For example, (ROW(4, 5.0)).f1 returns 4.
</para>

</listitem>


    </itemizedlist>

   </sect3>

   <sect3>
    <title>Functions</title>

    <itemizedlist>

<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2020-01-17 [a83586b55] Add a non-strict version of jsonb_set
-->

<para>
Add alternate version of jsonb_set with special NULL handling (Andrew Dunstan)
</para>

<para>
The new function, jsonb_set_lax(), allows null new values to either set the specified key to JSON null, delete the key, raise exception, or ignore the operation.
IS 'return_target' CLEAR?
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-09-25 [bffe1bd68] Implement jsonpath .datetime() method
-->

<para>
Add jsonpath .datetime() method (Nikita Glukhov, Teodor Sigaev, Oleg Bartunov, Alexander Korotkov)
</para>

<para>
This allows json values to be converted to timestamps, which can then be processed in jsonpath expressions.  This also adds jsonpath functions that support time zone-aware output.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-04-02 [2991ac5fc] Add SQL functions for Unicode normalization
-->

<para>
Add SQL functions NORMALIZE() to normalize Unicode strings, and IS NORMALIZED to check for normalization (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-06 [a6525588b] Allow Unicode escapes in any server encoding, not only U
-->

<para>
Allow Unicode escapes, e.g., E'\u####', in clients that don't use UTF-8 encoding (Tom Lane)
</para>

<para>
The Unicode characters must be available in the server encoding.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-03 [d67755049] Allow to_date/to_timestamp to recognize non-English mont
-->

<para>
Allow to_date() and to_timestamp() to recognize non-English month/day names (Juan Jos&eacute; Santamar&iacute;a Flecha, Tom Lane)
</para>

<para>
The names recognized are the same as those output by to_char() with the same format codes.
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-09-16 [d589f9446] Support for FF1-FF6 datetime format patterns
-->

<para>
Add format specifications FF1-FF6 to control display of 1-6 subsecond digits (Alexander Korotkov, Nikita Glukhov, Teodor Sigaev, Oleg Bartunov)
</para>

<para>
These patterns can be used by to_char(), to_timestamp(), and jsonpath's .datetime().
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-09-16 [b64b857f5] Support for SSSSS datetime format pattern
-->

<para>
Add SSSSS time format specification as an SQL standard alias for SSSS (Nikita Glukhov, Alexander Korotkov)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-07-14 [5925e5549] Add gen_random_uuid function
-->

<para>
Add function gen_random_uuid to generate version 4 UUIDs (Peter Eisentraut)
</para>

<para>
Previously UUID generation functions were only available external modules uuid-ossp or pgcrypto were installed.
</para>

</listitem>

<listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
2020-01-25 [13661ddd7] Add functions gcd() and lcm() for integer and numeric ty
-->

<para>
Add greatest-common-denominator (gcd) and least-common-multiple (lcm) functions (Vik Fearing)
</para>

</listitem>

<listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
2020-03-01 [43a899f41] Fix corner-case loss of precision in numeric ln().
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
2020-03-28 [4083f445c] Improve the performance and accuracy of numeric sqrt() a
-->

<para>
Improve the performance and accuracy of square root and natural log (ln) output (Dean Rasheed)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-01-06 [20d6225d1] Add functions min_scale(numeric) and trim_scale(numeric)
-->

<para>
Add function min_scale() that returns the number of digits to the right the decimal point that is required to represent the numeric value with full precision (Pavel Stehule)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-01-06 [20d6225d1] Add functions min_scale(numeric) and trim_scale(numeric)
-->

<para>
Add function trim_scale() to reduce the scale of a number by removing trailing zeros (Pavel Stehule)
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-07-14 [6254c55f8] Add missing commutators for distance operators
-->

<para>
Add commutators of distance operators (Nikita Glukhov)
</para>

<para>
For example, previously only point &lt;-&gt; line was supported, now line &lt;-&gt; point works too.
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2020-04-07 [4c04be9b0] Introduce xid8-based functions to replace txid_XXX.
-->

<para>
Create xid8 versions of all transaction id functions (Thomas Munro)
</para>

<para>
The old function names were kept for backward compatibility.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-07 [26a944cf2] Adjust bytea get_bit/set_bit to use int8 not int4 for bi
-->

<para>
Allow get_bit() and set_bit() to set bits beyond 256MB of bytea data (Movead Li)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-08-01 [4886da832] Mark advisory-lock functions as parallel restricted, not
-->

<para>
Allow advisory-lock functions to be used in some parallel operations (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-04-20 [5fc703946] Add ALTER .. NO DEPENDS ON
-->

<para>
Add the ability to remove an object's dependency on an extension (&Aacute;lvaro Herrera)
</para>

<para>
The object can be a function, materialized view, index, or trigger.  The syntax is ALTER .. NO DEPENDS ON.
</para>

</listitem>


    </itemizedlist>

   </sect3>

   <sect3>
    <title><link linkend="plpgsql">PL/pgSQL</link></title>

    <itemizedlist>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-26 [8f59f6b9c] Improve performance of "simple expressions" in PL/pgSQL.
-->

<para>
Improve performance of simple PL/pgSQL expressions (Tom Lane, Amit Langote)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-11-22 [73b06cf89] Avoid taking a new snapshot for an immutable simple expr
-->

<para>
Improve the performance of PL/pgSQL functions that use immutable expressions (Konstantin Knizhnik)
</para>

</listitem>


    </itemizedlist>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
2019-09-23 [d6e612f83] Add libpq parameter 'channel_binding'.
-->

<para>
Allow libpq clients to require channel binding (Jeff Davis)
</para>

<para>
Using the libpq connection parameter 'channel_binding' forces the other end of the TLS connection to prove it knows the user's password.  This prevents man-in-the-middle attacks.
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2020-01-28 [ff8ca5fad] Add connection parameters to control SSL protocol min/ma
Author: Michael Paquier <michael@paquier.xyz>
2020-04-30 [401aad670] Rename connection parameters to control min/max SSL prot
-->

<para>
Add libpq connection parameters to control the min/max TLS version (Daniel Gustafsson)
</para>

<para>
The settings are min_protocol_version and max_protocol_version.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-05 [2eb3bc588] Fix issues around .pgpass file.
-->

<para>
Tighten line length and comment detection in .pgpass files (Fujii Masao)
</para>

</listitem>

<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2019-11-30 [4dc635521] libq support for sslpassword connection param,  DER form
-->

<para>
Allow specification of passwords to unlock client certificates (Craig Ringer, Andrew Dunstan)
</para>

<para>
This is specified by the sslpassword connection option.
</para>

</listitem>

<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2019-11-30 [4dc635521] libq support for sslpassword connection param,  DER form
-->

<para>
Allow DER-encoded client certificates (Craig Ringer, Andrew Dunstan)
</para>

</listitem>


    </itemizedlist>

   </sect3>

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

    <sect4>
     <title><xref linkend="app-psql"/></title>

     <itemizedlist>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2020-02-12 [dcdbb5a5d] Add %x to default PROMPT1 and PROMPT2 in psql
-->

<para>
Add the transaction status (%x) to the default psql prompts (Vik Fearing)
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-11-19 [7f338369c] Allow invisible PROMPT2 in psql.
-->

<para>
Allow the secondary psql prompt to be same number of spaces as the primary prompt (Thomas Munro)
</para>

<para>
This is accomplished by setting PROMPT2 to %w.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-07 [b63c293bc] Allow psql's \g and \gx commands to transiently change \
-->

<para>
Allow \g and \gx to change any pset output options for a single command (Tom Lane)
</para>

<para>
This allows syntax like \g (expand=on), which is equivalent to \gx.
</para>

</listitem>

<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2020-03-08 [b0b5e20cd] Show opclass and opfamily related information in psql
-->

<para>
Add psql commands to report operator classes and operator families (Sergey Cherkashin, Nikita Glukhov, Alexander Korotkov)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-07-03 [9a2ea6183] Show table persistence in psql's \dt+ and related comman
-->

<para>
Show table persistence in psql's \dt+ and related commands (David Fetter)
</para>

<para>
In verbose mode, the table/index/view shows if the object is permanent, temporary, or unlogged.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-07-23 [eb5472da9] Improve psql's \d output for TOAST tables.
-->

<para>
Improve output of psql \d for TOAST tables (Justin Pryzby)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-11-22 [d1c866e57] Make psql redisplay the query buffer after \e.
-->

<para>
Adjust display of psql's \e query (Tom Lane)
</para>

<para>
When exiting the editor, if the query doesn't end with a semicolon or \g, the query buffer contents will now be displayed.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-07-05 [02e95a504] Add \warn command to psql.
-->

<para>
Add \warn command to psql (David Fetter)
</para>

<para>
This is like \echo except that the text is sent to stderr instead of stdout.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-02-28 [1933ae629] Add PostgreSQL home page to - -help output
-->

<para>
Add the PostgreSQL home page to command-line --help output (Peter Eisentraut)
</para>

</listitem>

     </itemizedlist>

    </sect4>

    <sect4>
     <title><link linkend="pgbench"><application>pgbench</application></link></title>

     <itemizedlist>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2019-10-03 [b1c1aa531] pgbench: add - -partitions and - -partition-method options
-->

<para>
Allow pgbench to partition its 'accounts' table (Fabien Coelho)
</para>

<para>
This allows performance testing of partitioning.
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2020-04-03 [9d8ef9880] Add support for \aset in pgbench
-->

<para>
Add pgbench command \aset, which behaves like \gset, but for multiple queries (Fabien Coelho)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-11-06 [a386942bd] Add "G" (server-side data generation) as an initializati
-->

<para>
Allow pgbench to generate its data server-side, rather than client side (Fabien Coelho)
</para>

<para>
DOCUMENT THE DEFAULT GENERATION METHOD
</para>

</listitem>

<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-07-16 [5823677ac] Provide pgbench - -show-script to dump built-in scripts.
-->

<para>
Allow pgbench to dump script contents using --show-script (Fabien Coelho)
</para>

</listitem>

     </itemizedlist>

    </sect4>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2020-04-03 [0d8c9c121] Generate backup manifests for base backups, and validate
Author: Robert Haas <rhaas@postgresql.org>
2020-04-12 [dbc60c559] Rename pg_validatebackup to pg_verifybackup.
-->

<para>
Generate backup manifests for base backups, and verify them (Robert Haas)
</para>

<para>
A new tool pg_verifybackup can verify backups.
</para>

</listitem>

<listitem>
<!--
Author: Author: Fujii Masao <fujii@postgresql.org>
2020-03-19 [fab13dc50] Make pg_basebackup ask the server to estimate the total 
-->

<para>
Have pg_basebackup estimate the total backup size by default (Fujii Masao)
</para>

<para>
This computation allows pg_stat_progress_basebackup to show progress, and can be disabled by using the --no-estimate-size option.  Previously, this computation happened only if --progress was used.
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-09-30 [927474ce1] pg_rewind: Allow writing recovery configuration
-->

<para>
Add pg_rewind option to configure standbys (Paul Guo, Jimmy Yih, Ashwin Agrawal)
</para>

<para>
This matches pg_basebackup's --write-recovery-conf option.
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2020-04-01 [a7e8ece41] Add -c/- -restore-target-wal to pg_rewind
-->

<para>
Allow pg_rewind to use the target cluster's restore_command to retrieve needed WAL (Alexey Kondratov)
</para>

<para>
This is enabled using the -c/--restore-target-wal option.
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-09-27 [5adafaf17] Have pg_rewind run crash recovery before rewinding
-->

<para>
Have pg_rewind automatically run crash recovery before rewinding (Paul Guo, Jimmy Yih, Ashwin Agrawal)
</para>

<para>
This can be disabled by using --no-ensure-shutdown.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-11-13 [7b8a899bd] Make pg_waldump report more detail information about PRE
-->

<para>
Increase PREPARE TRANSACTION information reported by pg_waldump (Fujii Masao)
</para>

</listitem>

<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2020-04-02 [ac44367ef] pg_waldump: Add a - -quiet option.
-->

<para>
Add pg_waldump option --quiet to suppress non-error output (Andres Freund, Robert Haas)
</para>

</listitem>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-03-25 [2f9eb3132] pg_dump: Allow dumping data of specific foreign servers
-->

<para>
Allow pg_dump --include-foreign-data to dump data from foreign servers (Luis Carril)
</para>

</listitem>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2020-01-29 [47bc9ced0] Add - -parallel option to vacuumdb command.
-->

<para>
Allow vacuum commands run by vacuumdb to operate in parallel mode (Masahiko Sawada)
</para>

<para>
This is enabled with the new --parallel option.
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-07-27 [5ab892c39] Add support for - -jobs in reindexdb
-->

<para>
Allow reindexdb to operate in parallel (Julien Rouhaud)
</para>

<para>
Parallel mode is enabled with the new --jobs option.
</para>

</listitem>

<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2019-11-20 [80e05a088] Add the support for '-f' option in dropdb utility.
-->

<para>
Allow dropdb to force disconnections so the drop succeeds (Pavel Stehule)
</para>

<para>
This is enabled with the -f option.
</para>

</listitem>

<listitem>
<!--
Author: Author: Michael Paquier <michael@paquier.xyz>
2019-10-23 [4fa5edcd1] Remove last traces of - -adduser/- -no-adduser in createus
-->

<para>
Remove --adduser and --no-adduser from createuser (Alexander Lakhin)
</para>

<para>
The long-supported options for this are called --superuser and --no-superuser.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-07-27 [959f6d6a1] pg_upgrade: Default new bindir to pg_upgrade location
-->

<para>
Use the directory of the pg_upgrade binary as the default new 'bindir' location when running pg_upgrade (Daniel Gustafsson)
</para>

</listitem>

    </itemizedlist>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-04-03 [347d2b07f] Add a glossary to the documentation
-->

<para>
Add a glossary to the documentation (Corey Huinker, J&uuml;rgen Purtz, Roger Harkavy, &Aacute;lvaro Herrera)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-08-13 [416c75cf3] Update to DocBook 4.5
-->

<para>
Upgrade to use DocBook 4.5 (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-03-29 [e1ff78048] Document color support
-->

<para>
Document color support (Peter Eisentraut)
</para>

<para>
THIS WAS NOT DOCUMENTED BEFORE?
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-07-02 [2b1394fc2] Add support for Visual Studio 2019 in build scripts
-->

<para>
Add support for building on Visual Studio 2019 (Haribabu Kommi)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-12-19 [e975c1a60] Add support for MSYS2
-->

<para>
Add build support for MSYS2 (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
2019-10-18 [30ee5d17c] For all ppc compilers, implement compare_exchange and fe
-->

<para>
Add compare_exchange and fetch_add assembly language code for Power PC compilers (Noah Misch)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-07-04 [7b925e127] Sync our Snowball stemmer dictionaries with current upst
-->

<para>
Update Snowball stemmer dictionaries used by full text search (Panagiotis Mavrogiorgos)
</para>

<para>
This adds Greek stemming and improves Danish and French stemming.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-07-01 [c72f9b950] Remove support for non-ELF BSD systems
-->

<para>
Remove support for non-ELF BSD systems (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-01-08 [37f21ed13] Remove support for Python older than 2.6
-->

<para>
Remove support for Python versions 2.5.X and earlier (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2020-01-06 [7b283d0e1] Remove support for OpenSSL 0.9.8 and 1.0.0
-->

<para>
Remove support for OpenSSL 0.9.8 and 1.0.0 (Michael Paquier)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-11-27 [4513d8b07] Move configure - -disable-float8-byval to pg_config_manua
-->

<para>
Remove configure option --disable-float8-byval (Peter Eisentraut)
</para>

<para>
This was needed for previously supported version-zero functions.
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-11-21 [2e4db241b] Remove configure - -disable-float4-byval
-->

<para>
Remove configure option --disable-float4-byval (Peter Eisentraut)
</para>

<para>
This was needed for previously supported version-zero functions.
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-03-30 [6aba63ef3] Allow the planner-related functions and hook to accept t
-->

<para>
Add the query string to planner hook functions (Pascal Legrand, Julien Rouhaud)
</para>

</listitem>

<listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
2019-11-23 [f7a2002e8] Add object TRUNCATE hook
-->

<para>
Add TRUNCATE command hook (Yuli Khodorkovskiy)
</para>

</listitem>

<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2020-03-25 [896fcdb23] Provide a TLS init hook
-->

<para>
Add TLS init hook (Andrew Dunstan)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2020-01-31 [a9cff89f7] Allow building without default socket directory
-->

<para>
Allow building with no predefined Unix-domain socket directory (Peter Eisentraut)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-09-05 [7de19fbc0] Use data directory inode number, not port, to select Sys
-->

<para>
Reduce the probability of SysV resource key collision on Unix platforms (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-09-05 [74a308cf5] Use explicit_bzero
-->

<para>
Use operating system functions to cleanly erase memory that contains sensitive information (Peter Eisentraut)
</para>

<para>
For example, this is used for clearing passwords stored in memory.
</para>

</listitem>

<listitem>
<!--
Author: Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-08-19 [55ea10918] Add "headerscheck" script to test header-file compilabil
-->

<para>
Add "headerscheck" script to test C header-file compatibility (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-07-15 [1cff1b95a] Represent Lists as expansible arrays, not chains of cons
-->

<para>
Implement internal lists as arrays, rather than a chain of structures (Tom Lane)
</para>

<para>
This improves performance for queries that access many object.  The internal List API has also been improved.
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-07-13 [39aadc984] Fix some inconsistencies in MSVC scripts
-->

<para>
Update Windows build scripts to use the modern --with-uuid flag for UUID libraries (Kyotaro Horiguchi)
</para>

</listitem>

    </itemizedlist>

   </sect3>

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

    <itemizedlist>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-01-29 [50fc694e4] Invent "trusted" extensions, and remove the pg_pltemplat
-->

<para>
Allow extensions to be specified as trusted (Tom Lane)
</para>

<para>
Such extensions can be installed in a database by users with creation rights, even if they are not superusers.  This change also removes the pg_pltemplate system catalog.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-02-19 [70a773200] Remove support for upgrading extensions from "unpackaged
-->

<para>
Remove support for upgrading "unpackaged" extensions (Tom Lane)
</para>

</listitem>

<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2019-12-20 [6136e94dc] Superuser can permit passwordless connections on postgre
-->

<para>
Allow non-superusers to connect to postgres_fdw foreign servers without using a password (Craig Ringer)
</para>

<para>
Specifically, allow ALTER USER MAPPING to set password_required to false.  Care must still be taken to avoid non-superusers from using superuser credentials to connect to the foreign server.
</para>

</listitem>

<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2020-01-09 [f5fd995a1] Allow 'sslkey' and 'sslcert' in postgres_fdw user mappin
-->

<para>
Allow postgres_fdw to use certificate authentication (Craig Ringer)
</para>

<para>
Different users can use different certificates.
</para>

</listitem>

<listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
2019-11-23 [4f66c93f6] Update sepgsql to add mandatory access control for TRUNC
-->

<para>
Allow sepgsql to control access to the TRUNCATE command (Yuli Khodorkovskiy)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-06 [36058a3c5] Create contrib/bool_plperl to provide a bool transform f
-->

<para>
Add extension bool_plperl which transforms SQL booleans to/from PL/Perl booleans (Ivan Panchenko)
</para>

</listitem>

<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
2019-07-14 [6e74c64bc] Teach pg_stat_statements not to ignore FOR UPDATE clause
-->

<para>
Have pg_stat_statements treat SELECT ... FOR UPDATE  as distinct from those without FOR UPDATE (Andrew Gierth, Vik Fearing)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-04-02 [17e032822] Allow pg_stat_statements to track planning statistics.
-->

<para>
Allow pg_stat_statements to optionally track the planning time of statements (Julien Rouhaud, Pascal Legrand, Thomas Munro, Fujii Masao)
</para>

<para>
Previously only execution time was tracked.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-31 [70dc4c509] Fix lquery's NOT handling, and add ability to quantify n
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-01 [17ca06799] Clean up parsing of ltree and lquery some more.
-->

<para>
Overhaul ltree's lquery syntax to treat NOT (!) more logically (Filip Rembiałkowski, Tom Lane, Nikita Glukhov)
</para>

<para>
Also allow non-* queries to use a numeric range ({}) of matches.
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-04-01 [949a9f043] Add support for binary I/O of ltree, lquery, and ltxtque
-->

<para>
Add support for binary I/O of ltree, lquery, and ltxtquery types (Nino Floris)
</para>

</listitem>

<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2020-03-08 [806eb92c0] Add an "absval" parameter to allow contrib/dict_int to i
-->

<para>
Add option to dict_int extension to ignore the sign of integers (Jeff Janes)
</para>

</listitem>

<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2020-01-24 [d694e0bb7] Add pg_file_sync() to adminpack extension.
-->

<para>
Add adminpack function pg_file_sync() to allow fsync'ing a file (Fujii Masao)
</para>

</listitem>

<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-09-12 [ddbd5d873] Add to pageinspect function to make t_infomask/t_infomas
Author: Author: Michael Paquier <michael@paquier.xyz>
2019-09-19 [58b4cb30a] Redesign pageinspect function printing infomask bits
-->

<para>
Add pageinspect functions to output t_infomask/t_infomask2 values in human-readable format (Craig Ringer, Sawada Masahiko, Michael Paquier)
</para>

</listitem>

<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2020-02-29 [93ee38ead] Teach pageinspect about nbtree deduplication.
-->

<para>
Add btree index deduplication processing columns to pageinspect output (Peter Geoghegan)
</para>

</listitem>


    </itemizedlist>

   </sect3>

  </sect2>

  <sect2 id="release-13-acknowledgements">
   <title>Acknowledgments</title>

   <para>
    The following individuals (in alphabetical order) have contributed to this
    release as patch authors, committers, reviewers, testers, or reporters of
    issues.
   </para>

   <simplelist>
    <member></member>
   </simplelist>
  </sect2>

 </sect1>
