Change assignment rules for PL/pgSQL bound cursor variables (Tom Lane)
</para>
<para>
Previously, the string value of such variables was set to match the variable name during cursor assignment; now it will be assigned during OPEN, and will not match the variable name.
2023-01-11 [8bf6ec3ba] Improve handling of inherited GENERATED expressions.
-->
<listitem>
<para>
Tighten GENERATED expression restrictions on inherited and partitioned tables (Amit Langote, Tom Lane)
</para>
<para>
Columns of parent/partitioned and child/partition tables must all have the same generation status, though now the actual generation expressions can be different.
2023-04-07 [ae78cae3b] Add - -buffer-usage-limit option to vacuumdb
Author: Masahiko Sawada <msawada@postgresql.org>
2023-04-28 [b72f564d8] Add unit to vacuum_buffer_usage_limit value in postgresq
-->
<listitem>
<para>
Allow control of the shared buffer usage by vacuum and analyze (Melanie Plageman)
</para>
<para>
The VACUUM/ANALYZE option is BUFFER_USAGE_LIMIT, and the vacuumdb option is --buffer-usage-limit. The default value is set by server variable vacuum_buffer_usage_limit, which also controls autovacuum.
</para>
</listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2022-07-20 [9430fb407] Add wal_sync_method=fdatasync for Windows.
-->
<listitem>
<para>
Support wal_sync_method=fdatasync on Windows (Thomas Munro)
</para>
</listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2023-03-20 [19d8e2308] Ignore BRIN indexes when checking for HOT updates
-->
<listitem>
<para>
Allow HOT updates if only BRIN-indexed columns are updated (Matthias van de Meent, Josef Simanek, Tomas Vondra)
</para>
</listitem>
<!--
Author: David Rowley <drowley@postgresql.org>
2023-02-20 [2cb82e2ac] Speedup and increase usability of set proc title functio
-->
<listitem>
<para>
Improve the speed of updating the process title (David Rowley)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4 id="release-16-monitoring">
<title>Monitoring</title>
<itemizedlist>
<!--
Author: Andres Freund <andres@anarazel.de>
2023-02-11 [a9c70b46d] Add pg_stat_io view, providing more detailed IO statisti
Author: Andres Freund <andres@anarazel.de>
2023-03-30 [8aaa04b32] Track shared buffer hits in pg_stat_io
Author: Andres Freund <andres@anarazel.de>
2023-04-07 [ac8d53dae] Track IO times in pg_stat_io
Author: Michael Paquier <michael@paquier.xyz>
2023-04-21 [0ecb87e1f] Remove io prefix from pg_stat_io columns
Author: Andres Freund <andres@anarazel.de>
2023-05-17 [093e5c57d] Add writeback to pg_stat_io
-->
<listitem>
<para>
Add system view pg_stat_io view to track IO statistics (Melanie Plageman)
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2022-10-14 [c03747183] pgstat: Track time of the last scan of a relation
-->
<listitem>
<para>
Record statistics on the last sequential and index scans on tables (Dave Page)
</para>
<para>
This information appears in pg_stat_all_tables and pg_stat_all_indexes.
</para>
</listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2023-03-23 [ae4fdde13] Count updates that move row to a new page.
-->
<listitem>
<para>
Record statistics on the occurrence of updated rows moving to new pages (Corey Huinker)
</para>
<para>
The pg_stat_*_tables column is n_tup_newpage_upd.
</para>
</listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2023-01-10 [f74573969] Fix the display of lock information for specktoken.
-->
<listitem>
<para>
Add speculative lock information to the pg_locks system view (Masahiko Sawada, Noriyoshi Shinoda)
</para>
<para>
The transaction id is displayed in the transactionid field and the speculative insertion token is displayed in the objid field.
</para>
</listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2022-07-05 [84ad713cf] Add result_types column to pg_prepared_statements view
Author: Peter Eisentraut <peter@eisentraut.org>
2022-07-05 [6ffff0fd2] Fix pg_prepared_statements.result_types for DML statemen
-->
<listitem>
<para>
Add the display of prepared statement result types to the pg_prepared_statements view (Dagfinn Ilmari Mannsåker)
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2022-10-06 [e0b014295] Create subscription stats entry at CREATE SUBSCRIPTION t
-->
<listitem>
<para>
Create subscription statistics entries at subscription creation time so stats_reset is accurate (Andres Freund)
</para>
<para>
Previously entries were created only created when the first statistics were reported.
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2023-04-07 [704261ecc] Improve IO accounting for temp relation writes
-->
<listitem>
<para>
Correct the IO accounting for temp relation writes shown in pg_stat_database (Melanie Plageman)
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2022-12-19 [10ea0f924] Expose some information about backend subxact status.
-->
<listitem>
<para>
Add function pg_stat_get_backend_subxact() to report on a session's subtransaction cache (Dilip Kumar)
</para>
</listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2022-09-29 [d7e39d72c] Use actual backend IDs in pg_stat_get_backend_idset() an
-->
<listitem>
<para>
Have pg_stat_get_backend_idset(), pg_stat_get_backend_activity(), and related functions use the unchanging backend id (Nathan Bossart)
</para>
<para>
Previously the index values might change during the lifetime of the session.
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2022-08-22 [0c679464a] Add BackendType for standalone backends
-->
<listitem>
<para>
Report stand-alone backends with a special backend type (Melanie Plageman)
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2022-11-21 [92daeca45] Add wait event for pg_usleep() in perform_spin_delay()
2023-03-30 [c3afe8cf5] Add new predefined role pg_create_subscription.
-->
<listitem>
<para>
Add predefined role pg_create_subscription with permission to create subscriptions (Robert Haas)
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2023-03-30 [c3afe8cf5] Add new predefined role pg_create_subscription.
Author: Amit Kapila <akapila@postgresql.org>
2023-04-20 [c1cc4e688] Restart the apply worker if the 'password_required' opti
Author: Amit Kapila <akapila@postgresql.org>
2023-04-24 [19e65dff3] Display 'password_required' option for \dRs+ command.
-->
<listitem>
<para>
Allow subscriptions to not require passwords (Robert Haas)
</para>
<para>
This is accomplished with the option password_required=false.
</para>
</listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
2023-01-13 [c44f6334c] Simplify permissions for LOCK TABLE.
-->
<listitem>
<para>
Simplify permissions for LOCK TABLE (Jeff Davis)
</para>
<para>
Previously the ability to perform LOCK TABLE at various lock levels was bound to specific query-type permissions. For example, UPDATE could could perform all lock levels except ACCESS SHARE, which
required SELECT permissions. Now UPDATE can issue all lock levels. MORE?
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2022-08-22 [ce6b672e4] Make role grant system more consistent with other privil
-->
<listitem>
<para>
Allow "GRANT group_name TO user_name" to be performed with ADMIN OPTION (Robert Haas)
</para>
<para>
Previously CREATEROLE permission was required.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2023-01-10 [cf5eb37c5] Restrict the privileges of CREATEROLE users.
-->
<listitem>
<para>
Restrict the privileges of CREATEROLE roles (Robert Haas)
</para>
<para>
Previously roles with CREATEROLE privileges could change many aspects of any non-superuser role. Such changes, including adding members, are now require the role requesting the change to have ADMIN OPTION
permission.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2023-01-24 [f1358ca52] Adjust interaction of CREATEROLE with role properties.
-->
<listitem>
<para>
Improve logic of CREATEROLE roles ability to control other roles (Robert Haas)
</para>
<para>
For example, they can change the CREATEDB, REPLICATION, and BYPASSRLS properties only if they also have those permissions.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2022-08-25 [e3ce2de09] Allow grant-level control of role inheritance behavior.
-->
<listitem>
<para>
Allow GRANT to control role inheritance behavior (Robert Haas)
</para>
<para>
By default, role inheritance is controlled by the inheritance status of the member role. The new GRANT clauses WITH INHERIT and WITH ADMIN can now override this.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2023-01-10 [e5b8a4c09] Add new GUC createrole_self_grant.
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
2023-02-22 [e00bc6c92] doc: Add default value of createrole_self_grant
-->
<listitem>
<para>
Allow roles that create other roles to automatically inherit the new role's rights or SET ROLE to the new role (Robert Haas, Shi Yu)
</para>
<para>
This is controlled by server variable createrole_self_grant.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2022-09-19 [48a257d44] Make ALTER DEFAULT PRIVILEGES require privileges, not me
-->
<listitem>
<para>
Prevent users from changing the default privileges of non-inherited roles (Robert Haas)
</para>
<para>
This is now only allowed for inherited roles.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2022-08-22 [ce6b672e4] Make role grant system more consistent with other privil
-->
<listitem>
<para>
When granting role membership, require the granted-by role to be a role that has appropriate permissions (Robert Haas)
Previously, while certain variables, like transaction_isolation, were not affected by RESET ALL, they could be individually reset in inappropriate situations.
</para>
</listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2022-08-09 [0b039e3a8] Fix some inconsistencies with GUC categories
-->
<listitem>
<para>
Move various postgresql.conf items into new categories (Shinya Kato)
</para>
<para>
This also affects the categories displayed in the pg_settings view.
</para>
</listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2022-11-25 [d13b68411] Introduce variables for initial and max nesting depth on
While primarily for developers, wal_sync_method=open_sync/open_datasync has been modified to not use direct I/O with wal_level=minimal; this is now enabled with debug_io_direct=wal.
Regular expression patterns are prefixed with a slash. Database and role names that begin with slashes need to be double-quoted if referenced in pg_hba.conf.
Improve user-column handling of pg_ident.conf to match pg_hba.conf (Jelte Fennema)
</para>
<para>
Specifically, add support for "all", role membership with "+", and regular expressions with a leading slash. Any user name that matches these patterns must be double-quoted.
These are controlled by "include", "include_if_exists", and "include_dir". System views pg_hba_file_rules and pg_ident_file_mappings now display the file name.
2023-01-30 [1e8b61735] Rename GUC logical_decoding_mode to logical_replication_
Author: Amit Kapila <akapila@postgresql.org>
2023-02-02 [9f2213a7c] Allow the logical_replication_mode to be used on the sub
-->
<listitem>
<para>
Add server variable to control how logical decoding publishers transfer changes and how subscribers apply them (Shi Yu)
</para>
<para>
The variable is logical_replication_mode.
</para>
</listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2023-03-23 [ecb696527] Allow logical replication to copy tables in binary forma
-->
<listitem>
<para>
Allow logical replication initial table synchronization to copy rows in binary format (Melih Mutlu)
</para>
<para>
This is only possible for subscriptions marked as binary.
</para>
</listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2023-01-09 [216a78482] Perform apply of large transactions by parallel workers.
Author: Amit Kapila <akapila@postgresql.org>
2023-01-10 [cd06ccd78] Document the newly added wait events added by commit 216
Author: Amit Kapila <akapila@postgresql.org>
2023-02-16 [fce003cfd] Add a new wait state and use it when sending data in the
-->
<listitem>
<para>
Allow parallel application of logical replication (Hou Zhijie, Wang Wei, Amit Kapila)
</para>
<para>
The CREATE SUBSCRIPTION "streaming" option now supports "parallel" to enable parallel application. Perform apply of large transactions by parallel workers. The number of parallel workers is controlled by
the new server variable max_parallel_apply_workers_per_subscription. Wait events LogicalParallelApplyMain, LogicalParallelApplyStateChange, and LogicalApplySendData were also added. Column leader_pid was
added to system view pg_stat_subscription to track parallel activity.
</para>
</listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2023-03-15 [89e46da5e] Allow the use of indexes other than PK and REPLICA IDENT
-->
<listitem>
<para>
Improve performance for logical replication apply without a primary key (Onder Kalaci, Amit Kapila)
</para>
<para>
Specifically, REPLICA IDENTITY FULL can now use btree indexes rather than sequentially scanning the table to find matches.
</para>
</listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2022-07-21 [366283961] Allow users to skip logical replication of data having o
Author: Amit Kapila <akapila@postgresql.org>
2022-09-08 [875693019] Raise a warning if there is a possibility of data from m
-->
<listitem>
<para>
Allow logical replication subscribers to process only changes that have no origin (Vignesh C, Amit Kapila)
</para>
<para>
This can be used to avoid replication loops.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2023-04-04 [1e10d49b6] Perform logical replication actions as the table owner.
Author: Robert Haas <rhaas@postgresql.org>
2023-04-04 [482675987] Add a run_as_owner option to subscriptions.
-->
<listitem>
<para>
Perform logical replication SELECT and DML actions as the table owner (Robert Haas)
</para>
<para>
This improves security and now requires subscription owners to be either superusers or to have SET ROLE permissions on all tables in the replication set. The previous behavior of performing all operations
as the subscription owner can be enabled with the subscription run_as_owner option.
</para>
</listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2023-01-22 [5a3a95385] Track logrep apply workers' last start times to avoid us
-->
<listitem>
<para>
Have wal_retrieve_retry_interval operate on a per-subscription basis (Nathan Bossart)
</para>
<para>
Previously the retry time was applied globally. This also adds wait events LogicalRepLauncherDSA and LogicalRepLauncherHash.
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2023-04-07 [be87200ef] Support invalidating replication slots due to horizon an
Author: Andres Freund <andres@anarazel.de>
2023-04-08 [26669757b] Handle logical slot conflicts on standby
-->
<listitem>
<para>
Allow invalidation of replication slots due to row removal, wal_level, and conflicts (Bertrand Drouvot, Andres Freund, Amit Khandekar)
</para>
<para>
Invalidated slots are indicated in the pg_replication_slots.conflicting column.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="release-16-utility">
<title>Utility Commands</title>
<itemizedlist>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2023-03-24 [3c05284d8] Invent GENERIC_PLAN option for EXPLAIN.
Improve pg_basebackup to accept numeric compression options (Georgios Kokolatos, Michael Paquier)
</para>
<para>
Options like "--compress=server-5" are now supported.
</para>
</listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2023-04-18 [363e8f911] Fix pg_basebackup with in-place tablespaces some more.
-->
<listitem>
<para>
Fix pg_basebackup to handle tablespaces stored in the PGDATA directory (Robert Haas)
</para>
</listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2022-12-27 [d497093cb] pg_waldump: Add - -save-fullpage=PATH to save full page i
-->
<listitem>
<para>
Add pg_waldump option --save-fullpage to dump full page images (David Christensen)
</para>
</listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2023-03-21 [4c8044c04] pg_waldump: Allow hexadecimal values for -t/- -timeline o
-->
<listitem>
<para>
Allow pg_waldump options -t/--timeline to accept hexadecimal values (Peter Eisentraut)
</para>
</listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2023-02-06 [d07c2948b] Add support for progress reporting to pg_verifybackup
-->
<listitem>
<para>
Add support for progress reporting to pg_verifybackup (Masahiko Sawada)
</para>
</listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-02-23 [009eeee74] pg_rewind: Fix determining TLI when server was just prom
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-02-27 [0a0500207] pg_rewind: Remove notice in docs about running CHECKPOIN
-->
<listitem>
<para>
Allow pg_rewind to properly track timeline changes (Heikki Linnakangas)
</para>
<para>
Previously if pg_rewind was run after a timeline switch but before a checkpoint was issued, it might incorrectly determine that a rewind was unnecessary.
</para>
</listitem>
<!--
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
2022-09-14 [8b60db774] Handle SIGTERM in pg_receivewal and pg_recvlogical
-->
<listitem>
<para>
Have pg_receivewal and pg_recvlogical cleanly exit on SIGTERM (Christoph Berg)
</para>
<para>
This signal is often used by systemd.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="release-16-source-code">
<title>Source Code</title>
<itemizedlist>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
2023-04-18 [fcb21b3ac] Build ICU support by default.
-->
<listitem>
<para>
Build ICU support by default (Jeff Davis)
</para>
<para>
This removes build flag --with-icu and adds flag --without-icu.
</para>
</listitem>
<!--
Author: John Naylor <john.naylor@postgresql.org>
2022-08-04 [56f2c7b58] Support SSE2 intrinsics where available
-->
<listitem>
<para>
Add support for SSE2 (Streaming SIMD Extensions 2) vector operations on x86-64 architectures (John Naylor)
</para>
</listitem>
<!--
Author: John Naylor <john.naylor@postgresql.org>
2022-08-29 [82739d4a8] Use ARM Advanced SIMD (NEON) intrinsics where available
-->
<listitem>
<para>
Add support for Advanced SIMD (Single Instruction Multiple Data) (NEON) instructions on ARM architectures (Nathan Bossart)
</para>
</listitem>
<!--
Author: John Naylor <john.naylor@postgresql.org>
2022-08-26 [121d2d3d7] Use SSE2 in is_valid_ascii() where available.
-->
<listitem>
<para>
Allow ASCII string detection to use vector operations on x86-64 architectures (John Naylor)
</para>
</listitem>
<!--
Author: John Naylor <john.naylor@postgresql.org>
2022-09-02 [0a8de93a4] Speed up lexing of long JSON strings
-->
<listitem>
<para>
Allow JSON string processing to use vector operations on x86-64 architectures (John Naylor)
</para>
<para>
ARM?
</para>
</listitem>
<!--
Author: John Naylor <john.naylor@postgresql.org>
2022-08-10 [b6ef16756] Introduce optimized routine for linear searches of array
Author: John Naylor <john.naylor@postgresql.org>
2022-08-26 [e813e0e16] Add optimized functions for linear search within byte ar
-->
<listitem>
<para>
Allow arrays searches to use vector operations on x86-64 architectures (John Naylor)
</para>
</listitem>
<!--
Author: John Naylor <john.naylor@postgresql.org>
2022-08-11 [37a6e5df3] Optimize xid/subxid searches in XidInMVCCSnapshot().
-->
<listitem>
<para>
Allow xid/subxid searches to use vector operations on x86-64 architectures (Nathan Bossart)
</para>
</listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2022-08-28 [36389a060] Enable RandomizedBaseAddress (ASLR) on Windows with MSVC
-->
<listitem>
<para>
Have Windows binaries built with MSVC use RandomizedBaseAddress (ASLR) (Michael Paquier)
</para>
<para>
This was already enabled on MinGW builds.
</para>
</listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2022-07-17 [089480c07] Default to hidden visibility for extension libraries whe
Author: Andres Freund <andres@anarazel.de>
2022-07-17 [8cf64d35e] Mark all symbols exported from extension libraries PGDLL
The new options are --show-diff, --silent-diff, --commit, and --help, and allow multiple --exclude options. Also require the typedef file to be explicitly specified. Options --code-base and --build were