From 2b14b5b5d9d5cf2f039a90a670abaf7b2f37bbe6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 23 Sep 2022 18:22:33 -0400 Subject: [PATCH] Doc: make an editorial pass over the v15 release notes. Rearrange, reword, clarify, fix markup, etc etc. Also include commit bd8ac900d. --- doc/src/sgml/release-15.sgml | 1172 ++++++++++++++++++---------------- 1 file changed, 620 insertions(+), 552 deletions(-) diff --git a/doc/src/sgml/release-15.sgml b/doc/src/sgml/release-15.sgml index 26c695155b..0529677c2f 100644 --- a/doc/src/sgml/release-15.sgml +++ b/doc/src/sgml/release-15.sgml @@ -93,16 +93,17 @@ Author: Noah Misch The new default is one of the secure schema usage patterns that has recommended since the security - release for CVE-2018-1058. The change applies to newly-created - databases in existing clusters and for new clusters. Upgrading a - cluster or restoring a database dump will preserve existing permissions. + release for CVE-2018-1058. The change applies to new database + clusters and to newly-created databases in existing clusters. + Upgrading a cluster or restoring a database dump will preserve + public's existing permissions. For existing databases, especially those having multiple users, consider revoking CREATE permission on the public schema to adopt this new default. - For new databases having zero need to defend against insider threats, + For new databases having no need to defend against insider threats, granting CREATE permission will yield the behavior of prior releases. @@ -115,14 +116,22 @@ Author: Noah Misch - Change the owner of the public schema to - pg_database_owner (Noah Misch) + Change the owner of the public schema to be the + new pg_database_owner role (Noah Misch) - Previously it was the literal user name of the bootstrap superuser. - Databases restored from previous Postgres releases will be restored - with their current owner specification. + This allows each database's owner to have ownership privileges on + the public schema within their database. + Previously it was owned by the bootstrap superuser, so that + non-superuser database owners could not do anything with it. + + + + This change applies to new database clusters and to newly-created + databases in existing clusters. + Upgrading a cluster or restoring a database dump will preserve + public's existing ownership specification. @@ -133,15 +142,14 @@ Author: Stephen Frost - Remove long-deprecated exclusive backup mode (David Steele, - Nathan Bossart) + Remove long-deprecated exclusive + backup mode (David Steele, Nathan Bossart) If the database server stops abruptly while in this mode, the - server could fail to start. The non-exclusive backup mode requires - a continuous database connection during the backup. Functions + server could fail to start. The non-exclusive backup mode is + considered superior for all purposes. Functions pg_start_backup()/pg_stop_backup() have been renamed to pg_backup_start()/pg_backup_stop(), @@ -163,9 +171,9 @@ Author: Peter Geoghegan - This allows query hash operations to use double the amount of + This allows query hash operations to use more work_mem - memory as other operations. + memory than other operations. @@ -180,25 +188,12 @@ Author: Andres Freund linkend="plpython">plpython2u and generic Python language plpythonu (Andres Freund) - - - - - - - Mark the interval output - function as stable, not immutable, since it depends on IntervalStyle - (Tom Lane) - - This will cause the creation of indexes relying on the text output - of interval values to fail. + Python 2.x is no longer supported. While the original intent of + plpythonu was that it could eventually refer + to plpython3u, changing it now seems more likely + to cause problems than solve them, so it's just been removed. @@ -211,7 +206,7 @@ Author: Tom Lane Generate an error if array_to_tsvector() - is passed an empty array element (Jean-Christophe Arnu) + is passed an empty-string array element (Jean-Christophe Arnu) @@ -235,23 +230,6 @@ Author: Peter Eisentraut - - - - - Prevent Unicode zero-length identifiers, e.g., U&"" - (Peter Eisentraut) - - - - Non-Unicode zero-length identifiers were already prevented. - - - + + + + Disallow zero-length Unicode identifiers, + e.g., U&"" + (Peter Eisentraut) + + + + Non-Unicode zero-length identifiers were already disallowed. + + + - - - - Improve consistency of interval parsing with trailing - periods (Tom Lane) - - - - Some platforms disallowed trailing periods. - - - + + + + Improve consistency of interval parsing with trailing + periods (Tom Lane) + + + + Numbers with trailing periods were rejected on some platforms. + + + + + + + + Mark the interval output + function as stable, not immutable, since it depends on IntervalStyle + (Tom Lane) + + + + This will, for example, cause creation of indexes relying on the + text output of interval values to fail. @@ -350,9 +366,9 @@ Author: Tom Lane - Specifically, functions justify_interval(), + The affected functions are justify_interval(), justify_hours(), and - justify_days() are affected. + justify_days(). @@ -386,7 +402,7 @@ Author: Robert Haas - Previously, login roles could add/remove members of its own role, + Previously, a login role could add/remove members of its own role, even without ADMIN OPTION privilege. @@ -423,9 +439,10 @@ Author: Jeff Davis - UPDATE and DELETE perform - SELECT, so require the subscription owner to - have table SELECT permission. + UPDATE and DELETE commands + typically involve reading the table as well, so require the + subscription owner to have table SELECT + permission. @@ -437,12 +454,13 @@ Author: Tom Lane When EXPLAIN - references the temporary object schema, refer to it as + references the session's temporary object schema, refer to it as pg_temp (Amul Sul) - Previously the actual schema name was used. + Previously the actual schema name was reported, leading to + inconsistencies across sessions. @@ -460,7 +478,7 @@ Author: Tom Lane - Previously such cases would have one row for each index. + Previously such cases would show one row for each index. @@ -475,14 +493,17 @@ Author: Tom Lane - Disallow setting of server - variables matching the prefixes of installed extension + Disallow setting custom + options that match the name of an installed extension, but + are not one of the extension's declared variables (Florin Irion, Tom Lane) - This also deletes any matching server variables during extension - load. + This change causes any such pre-existing variables to be deleted + during extension load, and then prevents new ones from being created + later in the session. The intent is to prevent confusion about + whether a variable is associated with an extension or not. @@ -493,7 +514,7 @@ Author: Andres Freund - Remove unnecessary server variable + Remove obsolete server variable stats_temp_directory (Andres Freund, Kyotaro Horiguchi) @@ -514,8 +535,47 @@ Author: Tom Lane - This will cause random() to differ from what - was emitted by prior versions for the same seed values. + This will cause random()'s results to differ + from what was emitted by prior versions, even for the same seed + value. + + + + + + + + libpq's PQsendQuery() + function is no longer supported in pipeline mode (Álvaro Herrera) + + + + Applications that are using that combination will need to be + modified to use PQsendQueryParams() instead. + + + + + + + + On non-Windows platforms, consult the HOME environment + variable to find the user's home directory (Anders Kaseorg) + + + + If HOME is empty or unset, fall back to the previous + method of checking the <pwd.h> database. + This change affects libpq (for example, + while looking up ~/.pgpass) as well as various + client application programs. @@ -560,13 +620,13 @@ Author: Tom Lane - Reduce casting of constants in postgres_fdw queries (Dian Fay) + Avoid unnecessary casting of constants in queries sent by postgres_fdw (Dian Fay) - If column types were mismatched between local and remote databases, - such casting could cause errors. + When column types are intentionally different between local and + remote databases, such casts could cause errors. @@ -577,8 +637,8 @@ Author: Tom Lane - Remove xml2's function - xml_is_well_formed() (Tom Lane) + Remove xml2's + xml_is_well_formed() function (Tom Lane) @@ -635,12 +695,13 @@ Author: Peter Eisentraut - This is designed to detect collation version - mismatches to avoid data corruption. Function + This feature is designed to detect collation version + changes to avoid index corruption. Function pg_database_collation_actual_version() reports the underlying operating system collation version, and - ALTER DATABASE ... REFRESH sets the database - to match the operating system collation version. + ALTER DATABASE ... REFRESH sets the recorded + database collation version to match the operating system collation + version. @@ -658,11 +719,9 @@ Author: Peter Eisentraut Previously, only libc-based - collations could be set at the cluster and database levels. - ICU collations were previously limited - to CREATE - COLLATION and referenced by the - COLLATE clause. + collations could be selected at the cluster and database levels. + ICU collations could only be used via explicit + COLLATE clauses. @@ -699,8 +758,7 @@ Author: David Rowley - Specifically this helps if only a small number of the many - partitions are relevant. + This change helps when only a few of many partitions are relevant. @@ -719,7 +777,7 @@ Author: David Rowley Previously, a partitioned table with a DEFAULT partition or a LIST partition containing multiple values could not be used for ordered partition scans. - Now they can be used if these partitions are pruned. + Now they can be used if such partitions are pruned during planning. @@ -735,10 +793,10 @@ Author: Alvaro Herrera - Previously, such updates ran delete actions on the source - partition and insert actions on the target partition. - PostgreSQL will now run update actions - on the referenced partition root. + Previously, such updates ran a delete action on the source + partition and an insert action on the target partition. + PostgreSQL will now run an update action + on the partition root, providing cleaner semantics. @@ -765,7 +823,7 @@ Author: Alvaro Herrera Fix ALTER TRIGGER RENAME on partitioned tables to properly rename - triggers an all partitions (Arne Roland, Álvaro Herrera) + triggers on all partitions (Arne Roland, Álvaro Herrera) @@ -806,9 +864,10 @@ Author: Alexander Korotkov - Improve lookup performance of GiST indexes built using - sorting (Aliaksandr Kalenik, Sergei Shoulbakov, Andrey Borodin) + Improve lookup performance + of GiST indexes + that were built using sorting (Aliaksandr Kalenik, Sergei + Shoulbakov, Andrey Borodin) @@ -824,7 +883,7 @@ Author: Peter Eisentraut - Previously NULL values were always indexed + Previously NULL entries were always treated as distinct values, but this can now be changed by creating constraints and indexes using UNIQUE NULLS NOT DISTINCT. @@ -838,10 +897,10 @@ Author: Tom Lane - Allow ^@ - and starts_with() to use btree indexes if - using a C collation (Tom Lane) + starts-with operator and the starts_with() + function to use btree indexes if using the C collation (Tom Lane) @@ -872,8 +931,8 @@ Author: Tomas Vondra - Regular statistics already tracked parent and parent/all-children - statistics separately. + Regular statistics already tracked parent and + parent-plus-all-children statistics separately. @@ -904,12 +963,9 @@ Author: Tom Lane Add server variable recursive_worktable_factor - to allow the user to specify the expected recursive query worktable - size (Simon Riggs) - - - - WHAT IS A WORKTABLE? NOT DEFINED. + to allow the user to specify the expected size of the working + table of a recursive + query (Simon Riggs) @@ -939,6 +995,18 @@ Author: David Rowley + + + + + Allow SELECT DISTINCT to be parallelized + (David Rowley) + + + - - - - Add two-phase information to the logical replication stream - (Ajin Cherian) - The new - Previously, write transactions would send empty transactions to + Previously, publishers would send empty transactions to subscribers if subscribed tables were not modified. @@ -1689,7 +1761,7 @@ Author: Michael Paquier - Specifically, the functions are pg_ls_logicalsnapdir(), pg_ls_logicalmapdir(), and pg_ls_replslotdir(). They can be run by @@ -1748,7 +1820,7 @@ Author: Amit Kapila The new function pg_stat_reset_subscription_stats() - allows the resetting of subscriber statistics. + allows resetting these statistics counters. @@ -1759,9 +1831,13 @@ Author: Amit Kapila - Remove incorrect duplicate partitions in system view pg_publication_tables - (Hou Zhijie) + system view (Hou Zhijie) + + + + In some cases a partition child table could appear more than once. @@ -1771,27 +1847,6 @@ Author: Amit Kapila - - <link linkend="sql-select"><command>SELECT</command></link>, <link linkend="sql-insert"><command>INSERT</command></link> - - - - - - - - Allow SELECT DISTINCT to be parallelized - (David Rowley) - - - - - - - Utility Commands @@ -1804,9 +1859,10 @@ Author: Alvaro Herrera - Add SQL MERGE command to - adjust one table to match another (Simon Riggs, Pavan Deolasee, - Álvaro Herrera, Amit Langote) + Add SQL MERGE + command to adjust one table to match another (Simon Riggs, Pavan + Deolasee, Álvaro Herrera, Amit Langote) @@ -1847,9 +1903,10 @@ Author: Robert Haas - This is the new default for database creation and avoids the need - for checkpoints during database creation; the old method is still - available. + This is the new default method for copying the template database, + as it avoids the need for checkpoints during database creation. + However, it might be slow if the template database is large, so + the old method is still available. @@ -1927,6 +1984,18 @@ Author: Michael Paquier + + + + + Allow creation of unlogged sequences (Peter Eisentraut) + + + - - - - Allow the creation of unlogged sequences (Peter Eisentraut) - - - - On Unix platforms, have client applications like psql - check HOME environment variable for the user's - home directory before checking the operating system definition - (Anders Kaseorg) + Allow pgbench to + retry after serialization and deadlock failures (Yugo Nagata, + Marina Polyakova) @@ -2313,38 +2377,13 @@ Author: Tom Lane - - - - Improve performance of psql's \copy - command (Heikki Linnakangas) - - - - - Add psql command \getenv - to assign the value of an environment variable to a - psql variable (Tom Lane) - - - - - - - - Add '+' option to psql's - \lo_list/\dl to show object - privileges (Pavel Luzanov) + Improve performance + of psql's \copy + command, by sending data in larger chunks (Heikki Linnakangas) @@ -2359,13 +2398,40 @@ Author: Tom Lane - Add psql \dconfig to report server - variables (Mark Dilger, Tom Lane) + Add \dconfig command to report server variables + (Mark Dilger, Tom Lane) This is similar to the server-side SHOW - command but can process patterns. + command, but it can process patterns to show multiple variables + conveniently. + + + + + + + + Add \getenv command + to assign the value of an environment variable to a + psql variable (Tom Lane) + + + + + + + + Add + option to the + \lo_list and \dl commands to + show large-object privileges (Pavel Luzanov) @@ -2376,13 +2442,13 @@ Author: Thomas Munro - Add pager option for psql's \watch + Add a pager option for the \watch command (Pavel Stehule, Thomas Munro) - This is only supported on Unix, and is controlled by - PSQL_WATCH_PAGER. + This is only supported on Unix, and is controlled by the + PSQL_WATCH_PAGER environment variable. @@ -2395,13 +2461,13 @@ Author: Tom Lane - Have psql send intra-query double-hyphen - comments to the server (Tom Lane, Greg Nancarrow) + Make psql include intra-query double-hyphen + comments in queries sent to the server (Tom Lane, Greg Nancarrow) Previously such comments were removed from the query - before being sent. Double-hyphen comments that are before + before being sent. Double-hyphen comments that are before any query text are not sent, and are not recorded as separate psql history entries. @@ -2414,12 +2480,14 @@ Author: Tom Lane - Adjust psql's readline meta-# to insert - a double-hyphen comment marker (Tom Lane) + Adjust psql so that Readline's + meta-# command will insert a double-hyphen + comment marker (Tom Lane) - Previously an unhelpful pound marker was inserted. + Previously a pound marker was inserted, but that's pretty + unhelpful in SQL. @@ -2430,12 +2498,15 @@ Author: Peter Eisentraut - Have psql output all results if multiple + Make psql output all results when multiple queries are passed to the server at once (Fabien Coelho) - This can be disabled by setting SHOW_ALL_RESULTS. + Previously, only the last query result was displayed. The old + behavior can be restored by setting + the SHOW_ALL_RESULTS psql + variable to off. @@ -2520,8 +2591,99 @@ Author: Tom Lane - Limit support of psql to servers running - PostgreSQL 9.2 and later (Tom Lane) + Limit support of psql's backslash + commands to servers running PostgreSQL + 9.2 or later (Tom Lane) + + + + Remove code that was only used when running with an older server. + Commands that do not require any version-specific adjustments + compared to 9.2 will still work. + + + + + + + + + <link linkend="app-pgdump"><application>pg_dump</application></link> + + + + + + + + Make pg_dump dump + public schema ownership changes and security + labels (Noah Misch) + + + + + + + + Improve performance of dumping databases with many objects + (Tom Lane) + + + + This will also improve the performance of pg_upgrade. + + + + + + + + Improve parallel pg_dump's performance + for tables with large TOAST tables (Tom Lane) + + + + + + + + Add dump/restore option + to force restore to only use the default table access method + (Justin Pryzby) + + + + + + + + Limit support of pg_dump and pg_dumpall + to servers running PostgreSQL 9.2 or + later (Tom Lane) @@ -2550,7 +2712,7 @@ Author: Robert Haas - New output options are server to write the + New options are server to write the backup locally and blackhole to discard the backup (for testing). @@ -2678,122 +2840,45 @@ Author: Michael Paquier - Add pg_rewind option - to simplify use when server + Add pg_rewind + option to simplify use when server configuration files are stored outside the data directory (Gunnar Bluth) - - - - - Allow pgbench to - retry after serialization and deadlock failures (Yugo Nagata, - Marina Polyakova) - - - - - <link linkend="app-pgdump"><application>pg_dump</application></link> - - - - - - - - Have pg_dump dump - public schema ownership changes and security - labels (Noah Misch) - - - - It also dumps public schema comments. - - - - - - - - Improve performance of dumping databases with many objects - (Tom Lane) - - - - This will also improve the performance of pg_upgrade. - - - - - - - - Improve the parallel pg_dump performance - of TOAST tables (Tom Lane) - - - - - - - - Add dump/restore option - to force restore to only use the default table access method - (Justin Pryzby) - - - - - - - - Limit support of pg_dump and pg_dumpall - to servers running PostgreSQL 9.2 and - later (Tom Lane) - - - - - - - <link linkend="pgupgrade"><application>pg_upgrade</application></link> + + + + + Store pg_upgrade's log and + temporary files in a subdirectory of the new cluster called + pg_upgrade_output.d (Justin Pryzby) + + + + Previously such files were left in the current directory, + requiring manual cleanup. It's still necessary to remove them + manually afterwards, but now one can just remove that whole + subdirectory. + + + - - - - Store pg_upgrade's log and - temporary files in a subdirectory of the new cluster called - pg_upgrade_output.d (Justin Pryzby) - - - - Previously such files were left in the current directory, - requiring manual cleanup. - - - - - - - Require OpenSSL to build pgcrypto - binaries (Peter Eisentraut) + Previously, only specific variables were accessible to extensions + on Windows. @@ -3204,6 +3258,19 @@ Author: Tom Lane + + + + + Require OpenSSL to build the pgcrypto + extension (Peter Eisentraut) + + + - - - - Add new module pg_walinspect - (Bharath Rupireddy) - - - - This gives SQL-level output similar to pg_waldump. - - - - - - - - Add module basic_archive - to perform archiving via a library (Nathan Bossart) - - - - - - - - Add module basebackup_to_shell - as a custom backup target (Robert Haas) contrib module. - - - - - - - - Add pg_stat_statements - output for temporary file block I/O (Masahiko Sawada) - - - - - - - - Add JIT counters to pg_stat_statements (Magnus - Hagander) - - - + + + + Add new module basebackup_to_shell + as an example of a custom backup target (Robert Haas) + + + + + + + + Add new module basic_archive + as an example of performing archiving via a library (Nathan Bossart) + + + + + + + Fix pageinspect's + page_header() to handle 32-kilobyte page sizes + (Quan Zongliang) + + + + Previously, improper negative values could be returned in certain + cases. + + + + + + + + Add counters for temporary file block I/O to pg_stat_statements + (Masahiko Sawada) + + + + + + + + Add JIT counters to pg_stat_statements (Magnus + Hagander) + + + + + + + + Add new module pg_walinspect + (Bharath Rupireddy) + + + + This gives SQL-level output similar to pg_waldump. + + + - - - - Fix pageinspect's - page_header() to handle 32 kilobyte page sizes - (Quan Zongliang) - - - - Previously improper negative values could be returned in certain - cases. - - - @@ -3422,12 +3489,13 @@ Author: Fujii Masao - Previously the remote application_name - could only be set on the remote server or via + could only be set on the remote server or via a postgres_fdw connection specification. - postgres_fdw.application_name also supports - escape sequences for customization. + postgres_fdw.application_name supports some + escape sequences for customization, making it easier to tell such + connections apart on the remote server. @@ -3444,7 +3512,7 @@ Author: Etsuro Fujita This is enabled with the CREATE SERVER option - parallel_commit when using postgres_fdw. + parallel_commit.