Add support for regular expression matching of user and database names in <filename>pg_hba.conf</filename>, and user names in <filename>pg_ident.conf</filename>
Previously, the string value of such variables was set to match the variable name during cursor assignment; now it will be assigned during <link linkend="plpgsql-cursor-opening"><command>OPEN</command></link>, and will not match the variable name.
Change <link linkend="sql-reindex"><command>REINDEX DATABASE</command></link> and <link linkend="app-reindexdb"><application>reindexdb</application></link> to not process indexes on system catalogs (Simon Riggs)
Processing such indexes is still possible using <command>REINDEX SYSTEM</command> and <link linkend="app-reindexdb"><command>reindexdb --system</command></link>.
Tighten <link linkend="ddl-generated-columns"><literal>GENERATED</literal></link> expression restrictions on inherited and partitioned tables (Amit Langote, Tom Lane)
Columns of parent/partitioned and child/partition tables must all have the same generation status, though now the actual generation expressions can be different.
Rename server variable <varname>force_parallel_mode</varname> to <link linkend="guc-debug-parallel-query"><varname>debug_parallel_query</varname></link> (David Rowley)
This has been unnecessary since <link linkend="guc-hot-standby-feedback"><varname>hot_standby_feedback</varname></link> and <link linkend="streaming-replication-slots">replication slots</link> were added.
This was used to promote a standby to primary, but is now easier accomplished with <link linkend="app-pg-ctl"><literal>pg_ctl promote</literal></link> or <link linkend="functions-recovery-control-table"><function>pg_promote()</function></link>.
2022-08-25 [e3ce2de09] Allow grant-level control of role inheritance behavior.
-->
<listitem>
<para>
Role inheritance now controls the default inheritance status of member roles added during <link linkend="sql-grant"><command>GRANT</command></link> (Robert Haas)
</para>
<para>
The role's default inheritance behavior can be overridden with the new <command>GRANT ... WITH INHERIT</command> clause.
This allows inheritance of some roles and not others because the members' inheritance status is set at <command>GRANT</command> time.
Previously the inheritance status of member roles was controlled only by the role's inheritance status, and
changes to a role's inheritance status affected all previous and future member roles.
Previously roles with <literal>CREATEROLE</literal> privileges could change many aspects of any non-superuser role. Such changes, including adding members, now require the role requesting the change to have <literal>ADMIN OPTION</literal>
permission. For example, they can now change the <literal>CREATEDB</literal>, <literal>REPLICATION</literal>, and <literal>BYPASSRLS</literal> properties only if they also have those permissions.
The new server variable <link linkend="guc-enable-presorted-aggregate"><varname>enable_presorted_aggregate</varname></link> can be used to disable this.
Allow parallelization of <link linkend="queries-join"><literal>FULL</literal></link> and internal right <literal>OUTER</literal> hash joins (Melanie Plageman, Thomas Munro)
Allow window functions to use <link linkend="syntax-window-functions"><literal>ROWS</literal></link> mode internally when <literal>RANGE</literal> mode is specified but unnecessary (David Rowley)
Allow aggregate functions <link linkend="functions-aggregate-table"><function>string_agg()</function></link> and <function>array_agg()</function> to be parallelized (David Rowley)
The <link linkend="sql-vacuum"><command>VACUUM</command></link>/<link linkend="sql-analyze"><command>ANALYZE</command></link> option is <literal>BUFFER_USAGE_LIMIT</literal>, and the <link linkend="app-vacuumdb"><application>vacuumdb</application></link> option is <option>--buffer-usage-limit</option>. The default value is set by server variable <link linkend="guc-vacuum-buffer-usage-limit"><varname>vacuum_buffer_usage_limit</varname></link>, which also controls autovacuum.
Support <link linkend="guc-wal-sync-method"><literal>wal_sync_method=fdatasync</literal></link> on <systemitem class="osname">Windows</systemitem> (Thomas Munro)
Allow <link linkend="storage-hot"><acronym>HOT</acronym></link> updates if only <literal>BRIN</literal>-indexed columns are updated (Matthias van de Meent, Josef Simanek, Tomas Vondra)
Allow <type>xid</type>/<type>subxid</type> searches and <acronym>ASCII</acronym> string detection to use vector operations (Nathan Bossart, John Naylor)
<acronym>ASCII</acronym> detection is particularly useful for <link linkend="sql-copy"><command>COPY FROM</command></link>. Vector operations are also used for some C array searches.
This information appears in <link linkend="pg-stat-all-tables-view"><structname>pg_stat_all_tables</structname></link> and <link linkend="monitoring-pg-stat-all-indexes-view"><structname>pg_stat_all_indexes</structname></link>.
The <literal>pg_stat_*_tables</literal> column is <link linkend="monitoring-pg-stat-all-tables-view"><structfield>n_tup_newpage_upd</structfield></link>.
Add speculative lock information to the <link linkend="view-pg-locks"><structname>pg_locks</structname></link> system view (Masahiko Sawada, Noriyoshi Shinoda)
The transaction id is displayed in the <structfield>transactionid</structfield> column and the speculative insertion token is displayed in the <structfield>objid</structfield> column.
Add the display of prepared statement result types to the <link linkend="view-pg-prepared-statements"><structname>pg_prepared_statements</structname></link> view (Dagfinn Ilmari Mannsåker)
Create subscription statistics entries at subscription creation time so <link linkend="pg-stat-database-view"><structfield>stats_reset</structfield></link> is accurate (Andres Freund)
Correct the <acronym>I/O</acronym> accounting for temp relation writes shown in <link linkend="pg-stat-database-view"><structname>pg_stat_database</structname></link> (Melanie Plageman)
Add function <link linkend="monitoring-stats-backend-funcs-table"><function>pg_stat_get_backend_subxact()</function></link> to report on a session's subtransaction cache (Dilip Kumar)
Have <link linkend="monitoring-stats-backend-funcs-table"><function>pg_stat_get_backend_idset()</function></link>, <function>pg_stat_get_backend_activity()</function>, and related functions use the unchanging backend id (Nathan Bossart)
Add the database name to the <link linkend="guc-update-process-title">process title</link> of logical <acronym>WAL</acronym> senders (Tatsuhiro Nakamori)
Add checkpoint and <literal>REDO LSN</literal> information to <link linkend="guc-log-checkpoints"><varname>log_checkpoints</varname></link> messages (Bharath Rupireddy, Kyotaro Horiguchi)
Add predefined role <link linkend="predefined-roles"><literal>pg_create_subscription</literal></link> with permission to create subscriptions (Robert Haas)
Previously the ability to perform <command>LOCK TABLE</command> at various lock levels was bound to specific query-type permissions. For example, <link linkend="sql-update"><command>UPDATE</command></link> could perform all lock levels except <literal>ACCESS SHARE</literal>, which
required <link linkend="sql-select"><command>SELECT</command></link> permissions. Now <command>UPDATE</command> can issue all lock levels. MORE?
Allow <link linkend="sql-grant"><literal>GRANT group_name TO user_name</literal></link> to be performed with <literal>ADMIN OPTION</literal> (Robert Haas)
Allow roles that create other roles to automatically inherit the new role's rights or the ability to <link linkend="sql-set-role"><command>SET ROLE</command></link> to the new role (Robert Haas, Shi Yu)
Add <link linkend="sql-grant"><command>GRANT</command></link> to control permission to use <link linkend="sql-set-role"><command>SET ROLE</command></link> (Robert Haas)
For example, removing <literal>ADMIN OPTION</literal> will fail if there are privileges using that option; <literal>CASCADE</literal> must be used to revoke dependent permissions.
This guarantees that <link linkend="catalog-pg-auth-members"><structname>pg_auth_members</structname></link>.<structfield>grantor</structfield> values are always valid.
This is enabled with server variable <link linkend="guc-gss-accept-delegation"><varname>gss_accept_delegation</varname></link> and <application>libpq</application> connection parameter <link linkend="libpq-connect-gssdelegation"><literal>gssdelegation</literal></link>.
Allow the <acronym>SCRAM</acronym> iteration count to be set with server variable <link linkend="guc-scram-iterations"><varname>scram_iterations</varname></link> (Daniel Gustafsson)
Previously, while certain variables, like <link linkend="guc-default-transaction-isolation"><varname>transaction_isolation</varname></link>, were not affected by <link linkend="sql-reset"><command>RESET ALL</command></link>, they could be individually reset in inappropriate situations.
The <link linkend="guc-archive-command"><varname>archive_command</varname></link> command is now more likely to be called with already-archived files after a crash.
Prevent <link linkend="guc-archive-library"><varname>archive_library</varname></link> and <link linkend="guc-archive-command"><varname>archive_command</varname></link> from being set at the same time (Nathan Bossart)
This is controlled by <link linkend="guc-send-abort-for-crash"><varname>send_abort_for_crash</varname></link> and <link linkend="guc-send-abort-for-kill"><varname>send_abort_for_kill</varname></link>.
Allow the server to reserve backend slots for roles with <link linkend="predefined-roles"><literal>pg_use_reserved_connections</literal></link> membership (Nathan Bossart)
While primarily for developers, <link linkend="guc-wal-sync-method"><literal>wal_sync_method=open_sync</literal></link>/<literal>open_datasync</literal> has been modified to not use direct <acronym>I/O</acronym> with <literal>wal_level=minimal</literal>; this is now enabled with <literal>debug_io_direct=wal</literal>.
Add function <link linkend="functions-admin-backup-table"><function>pg_split_walfile_name()</function></link> to report the segment and timeline values of <acronym>WAL</acronym> file names (Bharath Rupireddy)
Regular expression patterns are prefixed with a slash. Database and role names that begin with slashes need to be double-quoted if referenced in <filename>pg_hba.conf</filename>.
Improve user-column handling of <link linkend="runtime-config-file-locations"><filename>pg_ident.conf</filename></link> to match <filename>pg_hba.conf</filename> (Jelte Fennema)
Specifically, add support for <literal>all</literal>, role membership with <literal>+</literal>, and regular expressions with a leading slash. Any user name that matches these patterns must be double-quoted.
These are controlled by <literal>include</literal>, <literal>include_if_exists</literal>, and <literal>include_dir</literal>. System views <link linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</structname></link> and <link linkend="view-pg-ident-file-mappings"><structname>pg_ident_file_mappings</structname></link> now display the file name.
However, <link linkend="locale-providers"><acronym>ICU</acronym></link> doesn't support the C locale so <literal>UTF-8</literal> is used in such cases. Previously the default was always <literal>UTF-8</literal>.
Have <link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link> and <link linkend="sql-createcollation"><command>CREATE COLLATION</command></link>'s <literal>LOCALE</literal> options, and <link linkend="app-initdb"><application>initdb</application></link> and <link linkend="app-createdb"><application>createdb</application></link> <option>--locale</option> options, control non-<application>libc</application> collation providers (Jeff Davis)
This is done using <link linkend="sql-createcollation"><command>CREATE COLLATION</command></link>'s new <literal>RULES</literal> clause, as well as new options for <link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link>, <link linkend="app-createdb"><application>createdb</application></link>, and <link linkend="app-initdb"><application>initdb</application></link>.
To avoid delays, the new function <link linkend="functions-snapshot-synchronization-table"><function>pg_log_standby_snapshot()</function></link> allows creation of such records.
The <link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link> <option>STREAMING</option> option now supports <literal>parallel</literal> to enable application of large transactions by parallel workers. The number of parallel workers is controlled by
the new server variable <link linkend="guc-max-parallel-apply-workers-per-subscription"><varname>max_parallel_apply_workers_per_subscription</varname></link>. Wait events <link linkend="wait-event-activity-table"><literal>LogicalParallelApplyMain</literal></link>, <literal>LogicalParallelApplyStateChange</literal>, and <literal>LogicalApplySendData</literal> were also added. Column <structfield>leader_pid</structfield> was
added to system view <link linkend="monitoring-pg-stat-subscription"><structname>pg_stat_subscription</structname></link> to track parallel activity.
Improve performance for <link linkend="logical-replication-architecture">logical replication apply</link> without a primary key (Onder Kalaci, Amit Kapila)
Perform logical replication <link linkend="sql-select"><command>SELECT</command></link> and <acronym>DML</acronym> actions as the table owner (Robert Haas)
This improves security and now requires subscription owners to be either superusers or to have <link linkend="sql-set-role"><command>SET ROLE</command></link> 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 <link linkend="sql-createsubscription"><option>run_as_owner</option></link> option.
Have <link linkend="guc-wal-retrieve-retry-interval"><varname>wal_retrieve_retry_interval</varname></link> operate on a per-subscription basis (Nathan Bossart)
Previously the retry time was applied globally. This also adds wait events <link linkend="wait-event-lwlock-table">><literal>LogicalRepLauncherDSA</literal></link> and <literal>LogicalRepLauncherHash</literal>.
Add <link linkend="sql-explain"><command>EXPLAIN</command></link> option <literal>GENERIC_PLAN</literal> to display the generic plan for a parameterized query (Laurenz Albe)
This is controlled by the <link linkend="postgres-fdw"><application>postgres_fdw</application></link> option <link linkend="postgres-fdw-options-cost-estimation"><option>batch_size</option></link>.
Allow the <literal>STORAGE</literal> type to be specified by <link linkend="sql-createtable"><command>CREATE TABLE</command></link> (Teodor Sigaev, Aleksander Alekseev)
Allow <link linkend="sql-vacuum"><command>VACUUM</command></link> and <link linkend="app-vacuumdb"><application>vacuumdb</application></link> to only process <link linkend="storage-toast"><literal>TOAST</literal></link> tables (Nathan Bossart)
This is accomplished by having <link linkend="sql-vacuum"><command>VACUUM</command></link> turn off <literal>PROCESS_MAIN</literal> or by <link linkend="app-vacuumdb"><application>vacuumdb</application></link> using the <option>--no-process-main</option> option.
Change <link linkend="sql-reindex"><command>REINDEX DATABASE</command></link> and <link linkend="sql-reindex"><command>REINDEX SYSTEM</command></link> to no longer require an argument (Simon Riggs)
Allow <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link> to generate a statistics name if none is specified (Simon Riggs)
Add functions <link linkend="functions-info-validity-table"><function>pg_input_is_valid()</function></link> and <function>pg_input_error_info()</function> to check for type conversion errors (Tom Lane)
The new functions <link linkend="functions-json-creation-table"><function>JSON_ARRAY()</function></link>, <link linkend="functions-aggregate-table"><function>JSON_ARRAYAGG()</function></link>, <function>JSON_OBJECT()</function>, and <function>JSON_OBJECTAGG()</function> are part of the <acronym>SQL</acronym> standard.
The <link linkend="functions-sqljson-misc"><literal>IS JSON</literal></link> checks include checks for values, arrays, objects, scalars, and unique keys.
Improve the handling of full text highlighting function <link linkend="textsearch-functions-table"><function>ts_headline()</function></link> for <literal>OR</literal> and <literal>NOT</literal> expressions (Tom Lane)
The functions are <link linkend="functions-datetime-table"><function>date_add()</function></link>, <function>date_subtract()</function>, and <link linkend="functions-srf-series"><function>generate_series()</function></link>.
Change <link linkend="functions-datetime-table"><function>date_trunc(unit, timestamptz, time_zone)</function></link> to be an immutable function (Przemyslaw Sztoch)
Add aggregate function <link linkend="functions-aggregate-table"><function>ANY_VALUE()</function></link> which returns any value from a set (Vik Fearing)
Add function <link linkend="functions-math-random-table"><function>random_normal()</function></link> to supply normally-distributed random numbers (Paul Ramsey)
Add error function <link linkend="functions-math-func-table"><function>erf()</function></link> and its complement <function>erfc()</function> (Dean Rasheed)
Change <link linkend="functions-admin-collation"><function>pg_collation_actual_version()</function></link> to return a reasonable value for the default collation (Jeff Davis)
Add <application>libpq</application> connection option <link linkend="libpq-connect-require-auth"><option>require_auth</option></link> to specify a list of acceptable authentication methods (Jacob Champion)
This is enabled with <link linkend="libpq-connect-load-balance-hosts"><literal>load_balance_hosts=random</literal></link> and can be used for load balancing.
Add <application>libpq</application> option <link linkend="libpq-connect-sslcertmode"><option>sslcertmode</option></link> to control transmission of the client certificate (Jacob Champion)
This is enabled with <link linkend="libpq-connect-sslrootcert"><literal>sslrootcert=system</literal></link>, which also enables <link linkend="libpq-connect-sslmode"><literal>sslmode=verify-full</literal></link>.
Allow <link linkend="ecpg"><command>ECPG</command></link> variable declarations to use typedef names that match unreserved <acronym>SQL</acronym> keywords (Tom Lane)
The options are <link linkend="app-psql-meta-command-dp-lc"><command>\dpS</command></link>, <link linkend="app-psql-meta-command-z"><command>\zS</command></link>, and <link linkend="app-psql-meta-command-drg"><command>\drg</command></link>.
Add <literal>FOREIGN</literal> designation to <application>psql</application> <link linkend="app-psql-meta-command-d"><command>\d+</command></link> for foreign table children and partitions (Ian Lawrence Barwick)
Passing arguments to such queries is done using the new <application>psql</application> <link linkend="app-psql-meta-command-bind"><command>\bind</command></link> command.
Allow <application>psql</application> <link linkend="app-psql-meta-command-watch"><command>\watch</command></link> to limit the number of executions (Andrey Borodin)
Detect invalid values for <application>psql</application> <link linkend="app-psql-meta-command-watch"><command>\watch</command></link>, and allow zero to specify no delay (Andrey Borodin)
The new <application>psql</application> control variables are <link linkend="app-psql-variables-shell-error"><literal>SHELL_ERROR</literal></link> and <link linkend="app-psql-variables-shell-exit-code"><literal>SHELL_EXIT_CODE</literal></link>.
Various <application>psql</application> tab completion improvements (Vignesh C, Aleksander Alekseev, Dagfinn Ilmari Mannsåker, Shi Yu, Michael Paquier, Ken Kato, Peter Smith)
The new options are <option>--table-and-children</option>, <option>--exclude-table-and-children</option>, and <option>--exclude-table-data-and-children</option>.
Allow <application>pg_dump</application> and <link linkend="app-pgbasebackup"><application>pg_basebackup</application></link> to use <literal>long</literal> mode for compression (Justin Pryzby)
Add <link linkend="app-initdb"><application>initdb</application></link> option to set server variables for the duration of <application>initdb</application> and all future server starts (Tom Lane)
This option could be easily confused with new <application>createuser</application> role membership options, so option <option>--member-of</option> has been added with the same functionality.
The <option>--role</option> option can still be used.
Use new <link linkend="sql-vacuum"><command>VACUUM</command></link> options to improve the performance of <link linkend="app-vacuumdb"><application>vacuumdb</application></link> (Tom Lane, Nathan Bossart)
Fix <link linkend="app-pgbasebackup"><application>pg_basebackup</application></link> to handle tablespaces stored in the <envar>PGDATA</envar> directory (Robert Haas)
Previously if <application>pg_rewind</application> was run after a timeline switch but before a checkpoint was issued, it might incorrectly determine that a rewind was unnecessary.
Have <link linkend="app-pgreceivewal"><application>pg_receivewal</application></link> and <link linkend="app-pgrecvlogical"><application>pg_recvlogical</application></link> cleanly exit on <literal>SIGTERM</literal> (Christoph Berg)
Have <systemitem class="osname">Windows</systemitem> binaries built with <productname>MSVC</productname> use <literal>RandomizedBaseAddress</literal> (<acronym>ASLR</acronym>) (Michael Paquier)
Remove support for <productname>M68K</productname>, <productname>M88K</productname>, <productname>M32R</productname>, and <productname>SuperH</productname> <acronym>CPU</acronym> architectures (Thomas Munro)
This eventually will replace the <productname>Autoconf</productname> and <systemitem class="osname">Windows</systemitem>-based <productname>MSVC</productname> build systems.
The build options are <link linkend="configure-option-with-segsize"><option>--with-segsize-blocks</option></link> and <option>-Dsegsize_blocks</option>.
The new options are <option>--show-diff</option>, <option>--silent-diff</option>, <option>--commit</option>, and <option>--help</option>, and allow multiple <option>--exclude</option> options. Also require the typedef file to be explicitly specified. Options <option>--code-base</option> and <option>--build</option> were
Allow <link linkend="auto-explain"><application>auto_explain</application></link> to log values passed to parameterized statements (Dagfinn Ilmari Mannsåker)
This affects queries using server-side <link linkend="sql-prepare"><command>PREPARE</command></link>/<link linkend="sql-execute"><command>EXECUTE</command></link> and client-side parse/bind. Logging is controlled by <link linkend="auto-explain-configuration-parameters-log-parameter-max-length"><literal>auto_explain.log_parameter_max_length</literal></link>; by default query parameters will
Have <link linkend="auto-explain"><application>auto_explain</application></link>'s <option>log_verbose</option> mode honor the value of <link linkend="guc-compute-query-id"><varname>compute_query_id</varname></link> (Atsushi Torikoshi)
Previously even if <varname>compute_query_id</varname> was enabled, <link linkend="auto-explain-configuration-parameters-log-verbose"><option>log_verbose</option></link> was not showing the query identifier.
Have <link linkend="pgstatstatements"><structname>pg_stat_statements</structname></link> normalize constants used in utility commands (Michael Paquier)
Previously ending <acronym>LSN</acronym>s which represent nonexistent <acronym>WAL</acronym> locations would generate an error, while they will now be interpreted as the end of the <acronym>WAL</acronym>.
Add detailed descriptions of <acronym>WAL</acronym> records in <link linkend="pgwalinspect"><application>pg_walinspect</application></link> and <link linkend="pgwaldump"><application>pg_waldump</application></link> (Melanie Plageman, Peter Geoghegan)
Add <link linkend="pageinspect"><application>pageinspect</application></link> function <link linkend="pageinspect-b-tree-funcs"><function>bt_multi_page_stats()</function></link> to report statistics on multiple pages (Hamid Akhtar)
Add empty range output column to <link linkend="pageinspect"><application>pageinspect</application></link> function <link linkend="pageinspect-brin-funcs"><function>brin_page_items()</function></link> (Tomas Vondra)
Allow the schemas of required extensions to be referenced in extension scripts using the new syntax <literal>@extschema:referenced_extension_name@</literal> (Regina Obe)
Allow required extensions to be marked as non-relocatable using <link linkend="extend-extensions-files-no-relocate"><literal>no_relocate</literal></link> (Regina Obe)
This is enabled with <application>postgres_fdw</application> option <link linkend="postgres-fdw-options-transaction-management"><option>parallel_abort</option></link>.
Make <link linkend="sql-analyze"><command>ANALYZE</command></link> on foreign <application>postgres_fdw</application> tables more efficient (Tomas Vondra)
The <application>postgres_fdw</application> option <link linkend="postgres-fdw-options-cost-estimation"><option>analyze_sampling</option></link> controls the sampling method.
Restrict shipment of <link linkend="datatype-oid"><type>reg</type></link>* type constants in <application>postgres_fdw</application> to those referencing built-in objects or extensions marked as shippable (Tom Lane)
Have <application>postgres_fdw</application> and <link linkend="dblink"><application>dblink</application></link> handle interrupts during connection establishment (Andres Freund)