Most of this is new in v15 or doesn't affect user-facing docs so doesn't need to be backpatched.
Feel free to ignore this for now and revisit in April... @Michael: I'm not sure what this is trying to say. 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8 + First, scan the directory where the WAL segment files are written and + find the newest completed segment file, using as starting point the + beginning of the next WAL segment file. This is calculated independently + on the compression method used to compress each segment. I suppose it should say independently *of* the compression method, but then I still don't know what it means. I checked FindStreamingStart(). It that doesn't look like it's "calculated independently" - actually, it takes the compression method into account and explicitly handles each compression method. Is there any reason the user-facing docs need to say anything about this at all?
>From 0804cee992872f4d4bb1c12edf027da3027dcc28 Mon Sep 17 00:00:00 2001 From: Zhihong Yu <z...@yugabyte.com> Date: Fri, 10 Sep 2021 11:28:17 -0700 Subject: [PATCH 01/33] incorrect file names in header comment awk by Justin, patch by Zhihong Yu find src -name '*.[ch]' -type f -print0 |xargs -r0 awk '{fn=gensub(".*/", "", "1", FILENAME)} FILENAME~/scripts/{fn=gensub("\\.c","", 1, fn)} FNR==1 && /---$/{top=1} /\*\//{top=0} !top{next} FNR>1 && FNR<4 && NF==2 && $2!=fn{print FILENAME,"head",fn,$2} /IDENTIFICATION/{getline; if ($0!~FILENAME){print FILENAME,"foot",$2}}' --- src/backend/catalog/pg_publication.c | 2 +- src/backend/commands/publicationcmds.c | 2 +- src/backend/commands/subscriptioncmds.c | 2 +- src/backend/optimizer/util/appendinfo.c | 2 +- src/backend/optimizer/util/inherit.c | 2 +- src/backend/replication/logical/logicalfuncs.c | 2 +- src/backend/replication/logical/reorderbuffer.c | 2 +- src/backend/replication/logical/snapbuild.c | 2 +- src/backend/utils/activity/backend_progress.c | 4 ++-- src/backend/utils/activity/backend_status.c | 2 +- src/backend/utils/activity/wait_event.c | 2 +- src/include/replication/pgoutput.h | 2 +- src/include/utils/dynahash.h | 5 +++-- src/port/pgcheckdir.c | 4 +++- 14 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index cf0700f8ba0..e14ca2f5630 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * pg_publication.c + * src/backend/catalog/pg_publication.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 3ab1bdeae1b..0e4bb97fb73 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * publicationcmds.c + * src/backend/commands/publicationcmds.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index f5eba450ceb..3ef6607d246 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * subscriptioncmds.c + * src/backend/commands/subscriptioncmds.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/util/appendinfo.c b/src/backend/optimizer/util/appendinfo.c index b8039c323b6..2f06fa743c2 100644 --- a/src/backend/optimizer/util/appendinfo.c +++ b/src/backend/optimizer/util/appendinfo.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * src/backend/optimizer/path/appendinfo.c + * src/backend/optimizer/util/appendinfo.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c index 8c5dc659474..7e134822f36 100644 --- a/src/backend/optimizer/util/inherit.c +++ b/src/backend/optimizer/util/inherit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * src/backend/optimizer/path/inherit.c + * src/backend/optimizer/util/inherit.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index 4f633888b4f..4d71e71f686 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -9,7 +9,7 @@ * Copyright (c) 2012-2022, PostgreSQL Global Development Group * * IDENTIFICATION - * src/backend/replication/logicalfuncs.c + * src/backend/replication/logical/logicalfuncs.c *------------------------------------------------------------------------- */ diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index d317a626e1e..19b2ba2000c 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * src/backend/replication/reorderbuffer.c + * src/backend/replication/logical/reorderbuffer.c * * NOTES * This module gets handed individual pieces of transactions in the order diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index ab04e946bc2..83fca8a77d9 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -110,7 +110,7 @@ * Copyright (c) 2012-2022, PostgreSQL Global Development Group * * IDENTIFICATION - * src/backend/replication/snapbuild.c + * src/backend/replication/logical/snapbuild.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c index e5958fa77c5..f29199725b7 100644 --- a/src/backend/utils/activity/backend_progress.c +++ b/src/backend/utils/activity/backend_progress.c @@ -1,11 +1,11 @@ /* ---------- - * progress.c + * backend_progress.c * * Command progress reporting infrastructure. * * Copyright (c) 2001-2022, PostgreSQL Global Development Group * - * src/backend/postmaster/progress.c + * src/backend/utils/activity/backend_progress.c * ---------- */ #include "postgres.h" diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c index 2fecf26a2c3..c7ed1e6d7ac 100644 --- a/src/backend/utils/activity/backend_status.c +++ b/src/backend/utils/activity/backend_status.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * src/backend/postmaster/backend_status.c + * src/backend/utils/activity/backend_status.c * ---------- */ #include "postgres.h" diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c index 0f5f18f02e0..36c4c0fd052 100644 --- a/src/backend/utils/activity/wait_event.c +++ b/src/backend/utils/activity/wait_event.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * src/backend/postmaster/wait_event.c + * src/backend/utils/activity/wait_event.c * * NOTES * diff --git a/src/include/replication/pgoutput.h b/src/include/replication/pgoutput.h index fe1d0892aa6..78aa9151ef5 100644 --- a/src/include/replication/pgoutput.h +++ b/src/include/replication/pgoutput.h @@ -6,7 +6,7 @@ * Copyright (c) 2015-2022, PostgreSQL Global Development Group * * IDENTIFICATION - * pgoutput.h + * src/include/replication/pgoutput.h * *------------------------------------------------------------------------- */ diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h index 28fa58a6629..4564fb2467a 100644 --- a/src/include/utils/dynahash.h +++ b/src/include/utils/dynahash.h @@ -1,13 +1,14 @@ /*------------------------------------------------------------------------- * - * dynahash + * dynahash.h * POSTGRES dynahash.h file definitions * * * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * src/include/utils/dynahash.h + * IDENTIFICATION + * src/include/utils/dynahash.h * *------------------------------------------------------------------------- */ diff --git a/src/port/pgcheckdir.c b/src/port/pgcheckdir.c index 75dbb147d71..6c09cf29810 100644 --- a/src/port/pgcheckdir.c +++ b/src/port/pgcheckdir.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * src/port/pgcheckdir.c + * pgcheckdir.c * * A simple subroutine to check whether a directory exists and is empty or not. * Useful in both initdb and the backend. @@ -8,6 +8,8 @@ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * + * IDENTIFICATION + * src/port/pgcheckdir.c *------------------------------------------------------------------------- */ -- 2.17.1
>From 98a9b6dab9b9554eee90b1b53dfba155d8d8d547 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Mon, 5 Jul 2021 11:16:38 -0500 Subject: [PATCH 02/33] Add some missing newlines after function definitions --- src/backend/access/gin/ginlogic.c | 1 + src/backend/access/rmgrdesc/heapdesc.c | 1 + src/backend/utils/mmgr/freepage.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c index c38c27fbae2..62f98f9cfaf 100644 --- a/src/backend/access/gin/ginlogic.c +++ b/src/backend/access/gin/ginlogic.c @@ -58,6 +58,7 @@ trueConsistentFn(GinScanKey key) key->recheckCurItem = false; return true; } + static GinTernaryValue trueTriConsistentFn(GinScanKey key) { diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c index 6238085d65e..342fb95d869 100644 --- a/src/backend/access/rmgrdesc/heapdesc.c +++ b/src/backend/access/rmgrdesc/heapdesc.c @@ -114,6 +114,7 @@ heap_desc(StringInfo buf, XLogReaderState *record) appendStringInfo(buf, "off %u", xlrec->offnum); } } + void heap2_desc(StringInfo buf, XLogReaderState *record) { diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c index b26a295a4ea..eb281823bc2 100644 --- a/src/backend/utils/mmgr/freepage.c +++ b/src/backend/utils/mmgr/freepage.c @@ -270,6 +270,7 @@ sum_free_pages_recurse(FreePageManager *fpm, FreePageBtree *btp, Size *sum) } } } + static Size sum_free_pages(FreePageManager *fpm) { -- 2.17.1
>From f01579632a3928e482cea8904dcc451bf803dca5 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sun, 31 Oct 2021 18:44:03 -0500 Subject: [PATCH 03/33] Remove extranous blank in function header comment - 3eb77eba5a51780d5cf52cd66a9844cd4d26feb0 --- src/backend/storage/sync/sync.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c index 11fa17ddea2..543f691f2d2 100644 --- a/src/backend/storage/sync/sync.c +++ b/src/backend/storage/sync/sync.c @@ -274,7 +274,6 @@ SyncPostCheckpoint(void) } /* - * ProcessSyncRequests() -- Process queued fsync requests. */ void -- 2.17.1
>From d747320b94896b194f517253242069cfd5659e57 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sun, 10 Oct 2021 19:54:38 -0500 Subject: [PATCH 04/33] Remove cases of comma space space --- src/backend/access/gin/ginget.c | 4 ++-- src/backend/commands/indexcmds.c | 2 +- src/backend/statistics/mcv.c | 2 +- src/pl/plperl/plperl.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c index a1751c86ccd..b4ed5ea6080 100644 --- a/src/backend/access/gin/ginget.c +++ b/src/backend/access/gin/ginget.c @@ -1319,8 +1319,8 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast, GinScanKey key = so->keys + i; /* - * If we're considering a lossy page, skip excludeOnly keys, They - * can't exclude the whole page anyway. + * If we're considering a lossy page, skip excludeOnly keys. + * They can't exclude the whole page anyway. */ if (ItemPointerIsLossyPage(item) && key->excludeOnly) { diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index e5cf1bde13f..42aacc8f0a2 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -2219,7 +2219,7 @@ makeObjectName(const char *name1, const char *name2, const char *label) Assert(availchars > 0); /* else caller chose a bad label */ /* - * If we must truncate, preferentially truncate the longer name. This + * If we must truncate, preferentially truncate the longer name. This * logic could be expressed without a loop, but it's simple and obvious as * a loop. */ diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c index bad1787cfb2..fb51619d88c 100644 --- a/src/backend/statistics/mcv.c +++ b/src/backend/statistics/mcv.c @@ -1620,7 +1620,7 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses, Assert(mcvlist->nitems <= STATS_MCVLIST_MAX_ITEMS); matches = palloc(sizeof(bool) * mcvlist->nitems); - memset(matches, !is_or, sizeof(bool) * mcvlist->nitems); + memset(matches, !is_or, sizeof(bool) * mcvlist->nitems); /* * Loop through the list of clauses, and for each of them evaluate all the diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 1c77211ac45..1ae8195e023 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -334,7 +334,7 @@ hek2cstr(HE *he) SAVETMPS; /*------------------------- - * Unfortunately, while HeUTF8 is true for most things > 256, for values + * Unfortunately, while HeUTF8 is true for most things > 256, for values * 128..255 it's not, but perl will treat them as unicode code points if * the utf8 flag is not set ( see The "Unicode Bug" in perldoc perlunicode * for more) -- 2.17.1
>From 87c2969c991af5a58e58a740839008660f40f68c Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Thu, 28 Oct 2021 19:32:48 -0500 Subject: [PATCH 05/33] Do not end errmsg with period. Since: a8fd13cab0ba815e9925dc9676e6309f699b5f72 --- src/backend/replication/logical/worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index c9af775bc18..34710ed436d 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -3608,7 +3608,7 @@ ApplyWorkerMain(Datum main_arg) } ereport(DEBUG1, - (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s.", + (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s", MySubscription->name, MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_DISABLED ? "DISABLED" : MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_PENDING ? "PENDING" : -- 2.17.1
>From d275b8b16a57a60e7d776fd1dfddb93975ec4ad4 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sat, 4 Dec 2021 16:47:31 -0600 Subject: [PATCH 06/33] libpq: since 2a3f6e368babdac7b586a7d43105af60fc08b1a3 --- doc/src/sgml/libpq.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index e0ab7cd5555..7d8c953497a 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -4987,7 +4987,7 @@ int PQflush(PGconn *conn); <xref linkend="libpq-PQflush"/> returns 0. (It is necessary to check for read-ready and drain the input with <xref linkend="libpq-PQconsumeInput"/>, because the server can block trying to send us data, e.g., NOTICE - messages, and won't read our data until we read its.) Once + messages, and won't read the data we've sent until we read its data.) Once <xref linkend="libpq-PQflush"/> returns 0, wait for the socket to be read-ready and then read the response as described above. </para> -- 2.17.1
>From b112265294d712ef55b8a18839b5f78de7cedd63 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 13:00:00 -0600 Subject: [PATCH 07/33] pg_resetxlog: see 74cf7d46a and 71e74a2f5 --- doc/src/sgml/ref/pg_resetwal.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml index 3e4882cdc65..673f56e2935 100644 --- a/doc/src/sgml/ref/pg_resetwal.sgml +++ b/doc/src/sgml/ref/pg_resetwal.sgml @@ -311,7 +311,7 @@ PostgreSQL documentation and then multiplying by 1048576 (0x100000). Note that the file names are in hexadecimal. It is usually easiest to specify the option value in hexadecimal too. For example, if <filename>0007</filename> is the smallest entry - in <filename>pg_xact</filename>, <literal>-u 0x700000</literal> will work (five + in <filename>pg_xact</filename>, then <literal>-u 0x700000</literal> will work (five trailing zeroes provide the proper multiplier). </para> </listitem> @@ -332,7 +332,7 @@ PostgreSQL documentation and then multiplying by 1048576 (0x100000). Note that the file names are in hexadecimal. It is usually easiest to specify the option value in hexadecimal too. For example, if <filename>0011</filename> is the largest entry - in <filename>pg_xact</filename>, <literal>-x 0x1200000</literal> will work (five + in <filename>pg_xact</filename>, then <literal>-x 0x1200000</literal> will work (five trailing zeroes provide the proper multiplier). </para> </listitem> -- 2.17.1
>From 25c031af484982a4a84ede9f795fb1d0f86e268d Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 13:46:22 -0600 Subject: [PATCH 08/33] version 14 since 06ba4a63b85e5aa47b325c3235c16c05a0b58b96 --- doc/src/sgml/ref/pgbench.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index c71dab644ca..be1896fa99d 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -220,8 +220,8 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d data is generated in <command>pgbench</command> client and then sent to the server. This uses the client/server bandwidth extensively through a <command>COPY</command>. - <command>pgbench</command> uses the FREEZE option with 14 or later - versions of <productname>PostgreSQL</productname> to speed up + <command>pgbench</command> uses the FREEZE option with version 14 or later + of <productname>PostgreSQL</productname> to speed up subsequent <command>VACUUM</command>, unless partitions are enabled. Using <literal>g</literal> causes logging to print one message every 100,000 rows while generating data for the -- 2.17.1
>From 9ff580abda7221f09a88e19ca1285ff6872b644b Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Fri, 24 Dec 2021 13:35:03 -0600 Subject: [PATCH 09/33] typos: sysviews since adc8fc6167aa3f68b951ddd60ea32a62b13f18d6 --- src/test/regress/expected/sysviews.out | 2 +- src/test/regress/sql/sysviews.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out index 2088857615a..442eeb1e3fe 100644 --- a/src/test/regress/expected/sysviews.out +++ b/src/test/regress/expected/sysviews.out @@ -20,7 +20,7 @@ select count(*) >= 0 as ok from pg_available_extensions; (1 row) -- The entire output of pg_backend_memory_contexts is not stable, --- we test only the existance and basic condition of TopMemoryContext. +-- we test only the existence and basic condition of TopMemoryContext. select name, ident, parent, level, total_bytes >= free_bytes from pg_backend_memory_contexts where level = 0; name | ident | parent | level | ?column? diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql index b24816e3d5a..4980f07be25 100644 --- a/src/test/regress/sql/sysviews.sql +++ b/src/test/regress/sql/sysviews.sql @@ -13,7 +13,7 @@ select count(*) >= 0 as ok from pg_available_extension_versions; select count(*) >= 0 as ok from pg_available_extensions; -- The entire output of pg_backend_memory_contexts is not stable, --- we test only the existance and basic condition of TopMemoryContext. +-- we test only the existence and basic condition of TopMemoryContext. select name, ident, parent, level, total_bytes >= free_bytes from pg_backend_memory_contexts where level = 0; -- 2.17.1
>From 8d725e352b58c33899b8912bad64ed17bc858dab Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 14:28:53 -0600 Subject: [PATCH 10/33] spell: description, since 7fc380f83d466b43a8f65bb52c925c1ab19736ea --- src/test/modules/unsafe_tests/expected/alter_system_table.out | 4 ++-- src/test/modules/unsafe_tests/sql/alter_system_table.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/modules/unsafe_tests/expected/alter_system_table.out b/src/test/modules/unsafe_tests/expected/alter_system_table.out index 4b2f63a95ed..be0559503b6 100644 --- a/src/test/modules/unsafe_tests/expected/alter_system_table.out +++ b/src/test/modules/unsafe_tests/expected/alter_system_table.out @@ -53,7 +53,7 @@ ERROR: permission denied: "pg_description" is a system catalog CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_description); ERROR: permission denied: "pg_description" is a system catalog -- RangeVarCallbackOwnsRelation() -CREATE INDEX pg_descripton_test_index ON pg_description (description); +CREATE INDEX pg_description_test_index ON pg_description (description); ERROR: permission denied: "pg_description" is a system catalog -- RangeVarCallbackForAlterRelation() ALTER TABLE pg_description RENAME TO pg_comment; @@ -151,7 +151,7 @@ CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_descr ROLLBACK; -- RangeVarCallbackOwnsRelation() BEGIN; -CREATE INDEX pg_descripton_test_index ON pg_description (description); +CREATE INDEX pg_description_test_index ON pg_description (description); ROLLBACK; -- RangeVarCallbackForAlterRelation() BEGIN; diff --git a/src/test/modules/unsafe_tests/sql/alter_system_table.sql b/src/test/modules/unsafe_tests/sql/alter_system_table.sql index 6bfc896ef9c..b77b68c946a 100644 --- a/src/test/modules/unsafe_tests/sql/alter_system_table.sql +++ b/src/test/modules/unsafe_tests/sql/alter_system_table.sql @@ -55,7 +55,7 @@ ALTER TABLE pg_description ALTER COLUMN description SET STATISTICS -1; CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_description); -- RangeVarCallbackOwnsRelation() -CREATE INDEX pg_descripton_test_index ON pg_description (description); +CREATE INDEX pg_description_test_index ON pg_description (description); -- RangeVarCallbackForAlterRelation() ALTER TABLE pg_description RENAME TO pg_comment; @@ -161,7 +161,7 @@ ROLLBACK; -- RangeVarCallbackOwnsRelation() BEGIN; -CREATE INDEX pg_descripton_test_index ON pg_description (description); +CREATE INDEX pg_description_test_index ON pg_description (description); ROLLBACK; -- RangeVarCallbackForAlterRelation() -- 2.17.1
>From 7e5609ae49732543f603dfbe868e426e7ef26f4d Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:17:26 -0600 Subject: [PATCH 11/33] add missing THE.. See: 49c0864d7ef5227faa24f903902db90e5c9d5d69, 0cc59cc1f38d91587d52b14789e20bdd4c1af70a --- doc/src/sgml/protocol.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 7e59edb1cc5..890b7a58a4b 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -2155,7 +2155,7 @@ The commands accepted in replication mode are: streaming starts on timeline <replaceable class="parameter">tli</replaceable>; otherwise, the server's current timeline is selected. The server can reply with an error, for example if the requested section of WAL has already - been recycled. On success, server responds with a CopyBothResponse + been recycled. On success, the server responds with a CopyBothResponse message, and then starts to stream WAL to the frontend. </para> @@ -2516,7 +2516,7 @@ The commands accepted in replication mode are: <para> The server can reply with an error, for example if the - slot does not exist. On success, server responds with a CopyBothResponse + slot does not exist. On success, the server responds with a CopyBothResponse message, and then starts to stream WAL to the frontend. </para> @@ -6639,7 +6639,7 @@ not line breaks. <para> This section describes the detailed format of each logical replication message. These messages are either returned by the replication slot SQL -interface or are sent by a walsender. In the case of a walsender they are +interface or are sent by a walsender. In the case of a walsender, they are encapsulated inside replication protocol WAL messages as described in <xref linkend="protocol-replication"/>, and generally obey the same message flow as physical replication. -- 2.17.1
>From a95b3506cbf72d85b73be93a642ff1c4165f7694 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:19:15 -0600 Subject: [PATCH 12/33] add missing THE.. See: 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8, f61e1dd2cee6b1a1da75c2bb0ca3bc72f18748c1 --- doc/src/sgml/ref/pg_receivewal.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml index 5de80f8c640..c1d9401c597 100644 --- a/doc/src/sgml/ref/pg_receivewal.sgml +++ b/doc/src/sgml/ref/pg_receivewal.sgml @@ -82,7 +82,7 @@ PostgreSQL documentation <listitem> <para> First, scan the directory where the WAL segment files are written and - find the newest completed segment file, using as starting point the + find the newest completed segment file, using as the starting point the beginning of the next WAL segment file. This is calculated independently on the compression method used to compress each segment. </para> @@ -93,7 +93,7 @@ PostgreSQL documentation If a starting point cannot be calculated with the previous method, and if a replication slot is used, an extra <command>READ_REPLICATION_SLOT</command> command is issued to retrieve - the slot's <literal>restart_lsn</literal> to use as starting point. + the slot's <literal>restart_lsn</literal> to use as the starting point. This option is only available when streaming write-ahead logs from <productname>PostgreSQL</productname> 15 and up. </para> @@ -103,7 +103,7 @@ PostgreSQL documentation <para> If a starting point cannot be calculated with the previous method, the latest WAL flush location is used as reported by the server from - a <literal>IDENTIFY_SYSTEM</literal> command. + an <literal>IDENTIFY_SYSTEM</literal> command. </para> </listitem> </orderedlist> -- 2.17.1
>From 0c4d959e06857b270b685ca76bf04e55a2e4226b Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 5 Jan 2022 20:54:50 -0600 Subject: [PATCH 13/33] XLogWrite: confusing newline since 5ab3af46d --- src/backend/access/transam/xlog.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index c9d4cbf3ff5..58922f7edea 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2706,7 +2706,6 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible) */ if (LogwrtResult.Flush < WriteRqst.Flush && LogwrtResult.Flush < LogwrtResult.Write) - { /* * Could get here without iterating above loop, in which case we might -- 2.17.1
>From 2024b1356f3ec8b0e5fb6ad923bd4bbc4c243668 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sun, 26 Sep 2021 11:13:27 -0500 Subject: [PATCH 14/33] f!stats typos --- doc/src/sgml/perform.sgml | 2 +- src/backend/commands/statscmds.c | 2 +- src/backend/statistics/README | 2 +- src/backend/statistics/extended_stats.c | 2 +- src/backend/statistics/mcv.c | 6 +++--- src/bin/psql/describe.c | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index 89ff58338e5..9cf8ebea808 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -1337,7 +1337,7 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178} <title>Multivariate MCV Lists</title> <para> - Another type of statistics stored for each column are most-common value + Another type of statistic stored for each column are most-common value lists. This allows very accurate estimates for individual columns, but may result in significant misestimates for queries with conditions on multiple columns. diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index f7419b8f562..9b9d50ef32a 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -428,7 +428,7 @@ CreateStatistics(CreateStatsStmt *stmt) * similar to why we don't bother with extracting columns from * expressions. It's either expensive or very easy to defeat for * determined user, and there's no risk if we allow such statistics (the - * statistics is useless, but harmless). + * statistic is useless, but harmless). */ foreach(cell, stxexprs) { diff --git a/src/backend/statistics/README b/src/backend/statistics/README index 13a97a35662..b87ca4734b2 100644 --- a/src/backend/statistics/README +++ b/src/backend/statistics/README @@ -24,7 +24,7 @@ There are currently several kinds of extended statistics: Compatible clause types ----------------------- -Each type of statistics may be used to estimate some subset of clause types. +Each type of statistic may be used to estimate some subset of clause types. (a) functional dependencies - equality clauses (AND), possibly IS NULL diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index 87fe82ed114..ca48395d5c5 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -958,7 +958,7 @@ compare_datums_simple(Datum a, Datum b, SortSupport ssup) * build_attnums_array * Transforms a bitmap into an array of AttrNumber values. * - * This is used for extended statistics only, so all the attribute must be + * This is used for extended statistics only, so all the attributes must be * user-defined. That means offsetting by FirstLowInvalidHeapAttributeNumber * is not necessary here (and when querying the bitmap). */ diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c index fb51619d88c..1ef30344285 100644 --- a/src/backend/statistics/mcv.c +++ b/src/backend/statistics/mcv.c @@ -134,7 +134,7 @@ static int count_distinct_groups(int numrows, SortItem *items, * This bound is at most 25, and approaches 0 as n approaches 0 or N. The * case where n approaches 0 cannot happen in practice, since the sample * size is at least 300. The case where n approaches N corresponds to - * sampling the whole the table, in which case it is reasonable to keep + * sampling the whole table, in which case it is reasonable to keep * the whole MCV list (have no lower bound), so it makes sense to apply * this formula for all inputs, even though the above derivation is * technically only valid when the right hand side is at least around 10. @@ -295,7 +295,7 @@ statext_mcv_build(StatsBuildData *data, double totalrows, int stattarget) /* Copy the first chunk of groups into the result. */ for (i = 0; i < nitems; i++) { - /* just pointer to the proper place in the list */ + /* just point to the proper place in the list */ MCVItem *item = &mcvlist->items[i]; item->values = (Datum *) palloc(sizeof(Datum) * numattrs); @@ -556,7 +556,7 @@ build_column_frequencies(SortItem *groups, int ngroups, /* * statext_mcv_load - * Load the MCV list for the indicated pg_statistic_ext tuple. + * Load the MCV list for the indicated pg_statistic_ext_data tuple. */ MCVList * statext_mcv_load(Oid mvoid, bool inh) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 40433e32fa0..64805789741 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2652,11 +2652,11 @@ describeOneTableDetails(const char *schemaname, /* * When printing kinds we ignore expression statistics, - * which is used only internally and can't be specified by - * user. We don't print the kinds when either none are - * specified (in which case it has to be statistics on a - * single expr) or when all are specified (in which case - * we assume it's expanded by CREATE STATISTICS). + * which are used only internally and can't be specified by + * user. We don't print the kinds when none are specified + * (in which case it has to be statistics on a single expr) + * or when all are specified (in which case we assume it's + * expanded by CREATE STATISTICS). */ has_all = (has_ndistinct && has_dependencies && has_mcv); has_some = (has_ndistinct || has_dependencies || has_mcv); -- 2.17.1
>From d678911106239a842dd5574c5c231b7674b34149 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 17:56:43 -0600 Subject: [PATCH 15/33] typo --- src/backend/access/heap/heapam.c | 2 +- src/backend/replication/logical/worker.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 6ec57f3d8b2..98230aac49c 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8354,7 +8354,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup) /* * Build a heap tuple representing the configured REPLICA IDENTITY to represent - * the old tuple in a UPDATE or DELETE. + * the old tuple in an UPDATE or DELETE. * * Returns NULL if there's no need to log an identity or if there's no suitable * key defined. diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index 34710ed436d..e3a0e34954b 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -2368,7 +2368,7 @@ apply_dispatch(StringInfo s) /* * Set the current command being applied. Since this function can be - * called recusively when applying spooled changes, save the current + * called recursively when applying spooled changes, save the current * command. */ saved_command = apply_error_callback_arg.command; @@ -2587,7 +2587,7 @@ LogicalRepApplyLoop(XLogRecPtr last_received) pgstat_report_activity(STATE_IDLE, NULL); /* - * Push apply error context callback. Fields will be filled during + * Push apply error context callback. Fields will be filled while * applying a change. */ errcallback.callback = apply_error_callback; -- 2.17.1
>From 00fa2c534fabcf09d139e5046a48f75159b5f089 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sun, 9 Jan 2022 23:05:18 -0600 Subject: [PATCH 16/33] vcregress: style --- src/tools/msvc/vcregress.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 6dcd742fa6c..ddce4680a94 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -538,7 +538,6 @@ sub recoverycheck $ENV{REGRESS_OUTPUTDIR} = "$topdir/src/test/recovery/tmp_check"; - my $mstat = 0; my $dir = "$topdir/src/test/recovery"; my $status = tap_check($dir); exit $status if $status; @@ -717,7 +716,6 @@ sub fetchRegressOpts # list is returned if the module does not need to run anything. sub fetchTests { - my $handle; open($handle, '<', "GNUmakefile") || open($handle, '<', "Makefile") @@ -783,7 +781,7 @@ sub InstallTemp sub usage { print STDERR - "Usage: vcregress.pl <mode> [ <arg>]\n\n", + "Usage: vcregress.pl <mode> [<arg>]\n\n", "Options for <mode>:\n", " bincheck run tests of utilities in src/bin/\n", " check deploy instance and run regression tests on it\n", -- 2.17.1
>From 2bce1cf15fdd742974fe7622247cc86a85a2edff Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sat, 1 Jan 2022 19:18:02 -0600 Subject: [PATCH 17/33] doc review for tableam: b73c3a119 "allow to" is fine for internal language, but it's not ideal for public facing documentation. As pointed out here: https://www.postgresql.org/message-id/CA%2BhUKGLJkZ6u61wUHz8Yk9%2BktY%3DzPbkvBe4xhxyuTTf4DRjTRw%40mail.gmail.com --- doc/src/sgml/config.sgml | 4 ++-- doc/src/sgml/ref/select_into.sgml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 4cd9818acf8..692d8a2a178 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -8442,8 +8442,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; This parameter specifies the default table access method to use when creating tables or materialized views if the <command>CREATE</command> command does not explicitly specify an access method, or when - <command>SELECT ... INTO</command> is used, which does not allow to - specify a table access method. The default is <literal>heap</literal>. + <command>SELECT ... INTO</command> is used, which does not allow + specifying a table access method. The default is <literal>heap</literal>. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/select_into.sgml b/doc/src/sgml/ref/select_into.sgml index acc6401485b..82a77784b99 100644 --- a/doc/src/sgml/ref/select_into.sgml +++ b/doc/src/sgml/ref/select_into.sgml @@ -107,7 +107,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac <para> In contrast to <command>CREATE TABLE AS</command>, <command>SELECT - INTO</command> does not allow to specify properties like a table's access + INTO</command> does not allow specifying properties like a table's access method with <xref linkend="sql-createtable-method" /> or the table's tablespace with <xref linkend="sql-createtable-tablespace" />. Use <command>CREATE TABLE AS</command> if necessary. Therefore, the default table -- 2.17.1
>From f7bb6b3244a42fe05787023239f17efeef7e1f90 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:00:42 -0600 Subject: [PATCH 18/33] v15 doc review: doc: Add note about postgres_fdw.application_name. 58e2e6eb67fec14c793c74207407e172d7e0291d --- doc/src/sgml/postgres-fdw.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index 41cdb9ea1b5..1b757102c08 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -955,8 +955,8 @@ postgres=# SELECT postgres_fdw_disconnect_all(); of any length and contain even non-ASCII characters. However when it's passed to and used as <varname>application_name</varname> in a foreign server, note that it will be truncated to less than - <symbol>NAMEDATALEN</symbol> characters and any characters other - than printable ASCII ones in it will be replaced with question + <symbol>NAMEDATALEN</symbol> characters and anything other than + than printable ASCII characters will be replaced with question marks (<literal>?</literal>). See <xref linkend="guc-application-name"/> for details. </para> -- 2.17.1
>From e483e4ec42738f86c72e7b4aa5d3659c97c4393c Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:02:16 -0600 Subject: [PATCH 19/33] v15 doc review: Add option -N/--no-sync to pg_upgrade 3d5ffccb6df323f528cf870c26d0d0517ffe3eaa Or is it intended to say 'unsynchronized' ? --- doc/src/sgml/ref/pgupgrade.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index c5ce732ee98..a1745a2642c 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -139,7 +139,7 @@ PostgreSQL documentation of the upgraded cluster to be written safely to disk. This option causes <command>pg_upgrade</command> to return without waiting, which is faster, but means that a subsequent operating system crash can leave - the synchronized data directory corrupt. Generally, this option is + the data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. </para> -- 2.17.1
>From 08daab3f34d2cfcf30d9454e236711fc9c59bb52 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:09:13 -0600 Subject: [PATCH 20/33] v15 doc review: Allow postgres_fdw.application_name to include escape sequences - 6e0cb3dec10e460288d68a128e3d79d16a230cdb Also, 'escape sequences' should be marked up somehow other than <quote> ? --- doc/src/sgml/postgres-fdw.sgml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index 1b757102c08..2bb31f11255 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -981,19 +981,19 @@ postgres=# SELECT postgres_fdw_disconnect_all(); <tbody> <row> <entry><literal>%a</literal></entry> - <entry>Application name in local server</entry> + <entry>Application name on local server</entry> </row> <row> <entry><literal>%u</literal></entry> - <entry>User name in local server</entry> + <entry>User name on local server</entry> </row> <row> <entry><literal>%d</literal></entry> - <entry>Database name in local server</entry> + <entry>Database name on local server</entry> </row> <row> <entry><literal>%p</literal></entry> - <entry>Process ID of backend in local server</entry> + <entry>Process ID of backend on local server</entry> </row> <row> <entry><literal>%%</literal></entry> -- 2.17.1
>From cad84932532f67e2db2e40f70aa93d741ac8255f Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:13:26 -0600 Subject: [PATCH 21/33] v15 doc review: Add commas for readability.. 8709228775b549a2388e6568f463a4115e5a4c10 Doc: Clarify lock levels taken during ATTACH PARTITION - a5cb4f9829fbfd68655543d2d371a18a8eb43b84 Doc: minor improvements for logical replication protocol documentation. --- doc/src/sgml/ddl.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 22f6c5c7abc..e507954c2d0 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -4044,7 +4044,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02 holding an <literal>ACCESS EXCLUSIVE</literal> lock on that partition. It is recommended to drop the now-redundant <literal>CHECK</literal> constraint after the <command>ATTACH PARTITION</command> is complete. If - the table being attached is itself a partitioned table then each of its + the table being attached is itself a partitioned table, then each of its sub-partitions will be recursively locked and scanned until either a suitable <literal>CHECK</literal> constraint is encountered or the leaf partitions are reached. @@ -4059,7 +4059,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02 the partition being attached. This operation will be performed whilst holding an <literal>ACCESS EXCLUSIVE</literal> lock on the <literal> DEFAULT</literal> partition. If the <literal>DEFAULT</literal> partition - is itself a partitioned table then each of its partitions will be + is itself a partitioned table, then each of its partitions will be recursively checked in the same way as the table being attached, as mentioned above. </para> -- 2.17.1
>From bca98984d15b9b305947bcce91457db916ef5be1 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:21:59 -0600 Subject: [PATCH 22/33] v15 doc review: 185364b161512806d23ca390f5b615666079699b --- doc/src/sgml/ref/alter_publication.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index bb4ef5e5e22..b31d72181c5 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -50,7 +50,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r tables/schemas that were present in the publication will be removed. The <literal>ADD</literal> and <literal>DROP</literal> clauses will add and remove one or more tables/schemas from the publication. Note that adding - tables/schemas to a publication that is already subscribed to will require a + tables/schemas to a publication that is already subscribed to will require an <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> action on the subscribing side in order to become effective. </para> -- 2.17.1
>From 4aaadbe2bdc9eeb8350d7456d670dec6482efed6 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:22:53 -0600 Subject: [PATCH 23/33] v15 doc review: Allow publishing the tables of schema. - 5a2832465fd8984d089e8c44c094e6900d987fcd --- doc/src/sgml/ref/alter_publication.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index b31d72181c5..7c7c27bf7ce 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -82,7 +82,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r <para> Adding/Setting a table that is part of schema specified in <literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a - publication that already has a table that is part of specified schema or + publication that already has a table that is part of the specified schema or adding/setting a table to a publication that already has a table's schema as part of the specified schema is not supported. </para> -- 2.17.1
>From f9828a9e2c9a3e64372f734db95c35fad81ab958 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:31:43 -0600 Subject: [PATCH 24/33] f!longer edit --- doc/src/sgml/ref/alter_publication.sgml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index 7c7c27bf7ce..7b105f6af18 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -80,11 +80,11 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r </para> <para> - Adding/Setting a table that is part of schema specified in - <literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a - publication that already has a table that is part of the specified schema or - adding/setting a table to a publication that already has a table's schema as - part of the specified schema is not supported. + It is not supported to add or set a table that is part of schema specified in + <literal>ALL TABLES IN SCHEMA</literal>, to add or set a schema to a + publication that already has a table that is part of the specified schema, or to + add or set a table to a publication that already has a table's schema as + part of the specified schema. </para> </refsect1> -- 2.17.1
>From cc6dff3ed778f94dc7cd88c6fbfc3efe5277ea67 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:33:38 -0600 Subject: [PATCH 25/33] v15 doc review: Allow publishing the tables of schema. 5a2832465fd8984d089e8c44c094e6900d987fcd --- doc/src/sgml/ref/create_publication.sgml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index d805e8e77a7..385975bfadd 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -131,9 +131,9 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> <para> When a partitioned table is published via schema level publication, all - of its existing and future partitions irrespective of it being from the - publication schema or not are implicitly considered to be part of the - publication. So, even operations that are performed directly on a + of its existing and future partitions are implicitly considered to be part of the + publication, regardless of whether they are from the publication schema or not. + So, even operations that are performed directly on a partition are also published via publications that its ancestors are part of. </para> @@ -195,7 +195,7 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> <para> If <literal>FOR TABLE</literal>, <literal>FOR ALL TABLES</literal> or - <literal>FOR ALL TABLES IN SCHEMA</literal> is not specified, then the + <literal>FOR ALL TABLES IN SCHEMA</literal> are not specified, then the publication starts out with an empty set of tables. That is useful if tables or schemas are to be added later. </para> -- 2.17.1
>From 4acacf56196eb59aa6910752c7d1f1c55c415d54 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:37:47 -0600 Subject: [PATCH 26/33] v15 doc review: Rework compression options of pg_receivewal - d62bcc8b07f921bad105c7a826702c117ea7be58 --- doc/src/sgml/ref/pg_receivewal.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml index c1d9401c597..f38d6f47878 100644 --- a/doc/src/sgml/ref/pg_receivewal.sgml +++ b/doc/src/sgml/ref/pg_receivewal.sgml @@ -268,7 +268,7 @@ PostgreSQL documentation <listitem> <para> Enables compression of write-ahead logs using the specified method. - Supported values <literal>gzip</literal>, <literal>lz4</literal> + Supported values are <literal>gzip</literal>, <literal>lz4</literal> (if <productname>PostgreSQL</productname> was compiled with <option>--with-lz4</option>), and <literal>none</literal>. </para> -- 2.17.1
>From b68fdb10a9b9cd148fbcb0646557e430da8b3952 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:39:50 -0600 Subject: [PATCH 27/33] v15 doc review: Add replication command READ_REPLICATION_SLOT - b4ada4e19fd7bedb433e46516ccd0ca4213d2719 --- doc/src/sgml/protocol.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 890b7a58a4b..c4621e34f43 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -2101,7 +2101,7 @@ The commands accepted in replication mode are: </term> <listitem> <para> - Read some information associated to a replication slot. Returns a tuple + Read some information associated with a replication slot. Returns a tuple with <literal>NULL</literal> values if the replication slot does not exist. This command is currently only supported for physical replication slots. @@ -2133,7 +2133,7 @@ The commands accepted in replication mode are: <term><literal>restart_tli</literal> (<type>int8</type>)</term> <listitem> <para> - The timeline ID associated to <literal>restart_lsn</literal>, + The timeline ID associated with <literal>restart_lsn</literal>, following the current timeline history. </para> </listitem> -- 2.17.1
>From 49f4ad490c14bdedc592466f403615e9cf0e795e Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:40:50 -0600 Subject: [PATCH 28/33] v15 doc review: Ignore BRIN indexes when checking for HOT udpates - commit 5753d4ee320b3f6fb2ff734667a1ce1d9d8615a1 --- doc/src/sgml/indexam.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index 84de9310712..d4163c96e9f 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -253,7 +253,7 @@ typedef struct IndexAmRoutine access method blocks <acronym>HOT</acronym> when an indexed attribute is updated. Access methods without pointers to individual tuples (like <acronym>BRIN</acronym>) may allow <acronym>HOT</acronym> even in this - case. This does not apply to attributes referenced in index predicates, + case. This does not apply to attributes referenced in index predicates; an update of such attribute always disables <acronym>HOT</acronym>. </para> -- 2.17.1
>From 7d1d22a712831ab2199e4a8e818aca4497e71130 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 29 Dec 2021 16:43:08 -0600 Subject: [PATCH 29/33] v15 doc review: Some additional information about when to use referential actions - 5786fe154b53caef8b226ed863312d3608b32a51 --- doc/src/sgml/ddl.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index e507954c2d0..7cf0f0da3b2 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -1071,7 +1071,7 @@ CREATE TABLE order_items ( represent independent objects, then <literal>RESTRICT</literal> or <literal>NO ACTION</literal> is more appropriate; an application that actually wants to delete both objects would then have to be explicit about - this and run two delete options. In the above example, order items are + this and run two delete commands. In the above example, order items are part of an order, and it is convenient if they are deleted automatically if an order is deleted. But products and orders are different things, and so making a deletion of a product automatically cause the deletion of some -- 2.17.1
>From 467aa53aa63c4327d88b2100b6e45c45e6a855f7 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 19 Jan 2022 16:38:21 -0600 Subject: [PATCH 30/33] Alphabetize pg_ls_{tmpdir,archivestatusdir} since: 9cd92d1a33699f86aa53d44ab04cc3eb50c18d1 c48101620151f78ee184e5f81766cbac347d9a11 Could backpatch to v11? --- doc/src/sgml/func.sgml | 76 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 90169a0ce72..29a596233a0 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -27306,6 +27306,31 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size </thead> <tbody> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> + <primary>pg_ls_archive_statusdir</primary> + </indexterm> + <function>pg_ls_archive_statusdir</function> () + <returnvalue>setof record</returnvalue> + ( <parameter>name</parameter> <type>text</type>, + <parameter>size</parameter> <type>bigint</type>, + <parameter>modification</parameter> <type>timestamp with time zone</type> ) + </para> + <para> + Returns the name, size, and last modification time (mtime) of each + ordinary file in the server's WAL archive status directory + (<filename>pg_wal/archive_status</filename>). Filenames beginning + with a dot, directories, and other special files are excluded. + </para> + <para> + This function is restricted to superusers and members of + the <literal>pg_monitor</literal> role by default, but other users can + be granted EXECUTE to run the function. + </para></entry> + </row> + <row> <entry role="func_table_entry"><para role="func_signature"> <indexterm> @@ -27356,33 +27381,9 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size <row> <entry role="func_table_entry"><para role="func_signature"> <indexterm> - <primary>pg_ls_waldir</primary> - </indexterm> - <function>pg_ls_waldir</function> () - <returnvalue>setof record</returnvalue> - ( <parameter>name</parameter> <type>text</type>, - <parameter>size</parameter> <type>bigint</type>, - <parameter>modification</parameter> <type>timestamp with time zone</type> ) - </para> - <para> - Returns the name, size, and last modification time (mtime) of each - ordinary file in the server's write-ahead log (WAL) directory. - Filenames beginning with a dot, directories, and other special files - are excluded. - </para> - <para> - This function is restricted to superusers and members of - the <literal>pg_monitor</literal> role by default, but other users can - be granted EXECUTE to run the function. - </para></entry> - </row> - - <row> - <entry role="func_table_entry"><para role="func_signature"> - <indexterm> - <primary>pg_ls_archive_statusdir</primary> + <primary>pg_ls_tmpdir</primary> </indexterm> - <function>pg_ls_archive_statusdir</function> () + <function>pg_ls_tmpdir</function> ( <optional> <parameter>tablespace</parameter> <type>oid</type> </optional> ) <returnvalue>setof record</returnvalue> ( <parameter>name</parameter> <type>text</type>, <parameter>size</parameter> <type>bigint</type>, @@ -27390,9 +27391,12 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size </para> <para> Returns the name, size, and last modification time (mtime) of each - ordinary file in the server's WAL archive status directory - (<filename>pg_wal/archive_status</filename>). Filenames beginning - with a dot, directories, and other special files are excluded. + ordinary file in the temporary file directory for the + specified <parameter>tablespace</parameter>. + If <parameter>tablespace</parameter> is not provided, + the <literal>pg_default</literal> tablespace is examined. Filenames + beginning with a dot, directories, and other special files are + excluded. </para> <para> This function is restricted to superusers and members of @@ -27403,11 +27407,10 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size <row> <entry role="func_table_entry"><para role="func_signature"> - <indexterm> - <primary>pg_ls_tmpdir</primary> + <primary>pg_ls_waldir</primary> </indexterm> - <function>pg_ls_tmpdir</function> ( <optional> <parameter>tablespace</parameter> <type>oid</type> </optional> ) + <function>pg_ls_waldir</function> () <returnvalue>setof record</returnvalue> ( <parameter>name</parameter> <type>text</type>, <parameter>size</parameter> <type>bigint</type>, @@ -27415,12 +27418,9 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size </para> <para> Returns the name, size, and last modification time (mtime) of each - ordinary file in the temporary file directory for the - specified <parameter>tablespace</parameter>. - If <parameter>tablespace</parameter> is not provided, - the <literal>pg_default</literal> tablespace is examined. Filenames - beginning with a dot, directories, and other special files are - excluded. + ordinary file in the server's write-ahead log (WAL) directory. + Filenames beginning with a dot, directories, and other special files + are excluded. </para> <para> This function is restricted to superusers and members of -- 2.17.1
>From 5ccb006a20a90023d6ed58c34ef77349bc676e4f Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 19 Jan 2022 16:41:45 -0600 Subject: [PATCH 31/33] Alphabetize pg_ls_logical functions Added at 1922d7c6e1a74178bd2f1d5aa5a6ab921b3fcd34 (v15 only) --- doc/src/sgml/func.sgml | 145 +++++++++++++++++++++-------------------- 1 file changed, 73 insertions(+), 72 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 29a596233a0..497eb91eebc 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -27378,6 +27378,79 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size </para></entry> </row> + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> + <primary>pg_ls_logicalmapdir</primary> + </indexterm> + <function>pg_ls_logicalmapdir</function> () + <returnvalue>setof record</returnvalue> + ( <parameter>name</parameter> <type>text</type>, + <parameter>size</parameter> <type>bigint</type>, + <parameter>modification</parameter> <type>timestamp with time zone</type> ) + </para> + <para> + Returns the name, size, and last modification time (mtime) of each + ordinary file in the server's <filename>pg_logical/mappings</filename> + directory. Filenames beginning with a dot, directories, and other + special files are excluded. + </para> + <para> + This function is restricted to superusers and members of + the <literal>pg_monitor</literal> role by default, but other users can + be granted EXECUTE to run the function. + </para></entry> + </row> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> + <primary>pg_ls_logicalsnapdir</primary> + </indexterm> + <function>pg_ls_logicalsnapdir</function> () + <returnvalue>setof record</returnvalue> + ( <parameter>name</parameter> <type>text</type>, + <parameter>size</parameter> <type>bigint</type>, + <parameter>modification</parameter> <type>timestamp with time zone</type> ) + </para> + <para> + Returns the name, size, and last modification time (mtime) of each + ordinary file in the server's <filename>pg_logical/snapshots</filename> + directory. Filenames beginning with a dot, directories, and other + special files are excluded. + </para> + <para> + This function is restricted to superusers and members of + the <literal>pg_monitor</literal> role by default, but other users can + be granted EXECUTE to run the function. + </para></entry> + </row> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> + <primary>pg_ls_replslotdir</primary> + </indexterm> + <function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> ) + <returnvalue>setof record</returnvalue> + ( <parameter>name</parameter> <type>text</type>, + <parameter>size</parameter> <type>bigint</type>, + <parameter>modification</parameter> <type>timestamp with time zone</type> ) + </para> + <para> + Returns the name, size, and last modification time (mtime) of each + ordinary file in the server's <filename>pg_replslot/slot_name</filename> + directory, where <parameter>slot_name</parameter> is the name of the + replication slot provided as input of the function. Filenames beginning + with a dot, directories, and other special files are excluded. + </para> + <para> + This function is restricted to superusers and members of + the <literal>pg_monitor</literal> role by default, but other users can + be granted EXECUTE to run the function. + </para></entry> + </row> + <row> <entry role="func_table_entry"><para role="func_signature"> <indexterm> @@ -27508,78 +27581,6 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); </para></entry> </row> - <row> - <entry role="func_table_entry"><para role="func_signature"> - <indexterm> - <primary>pg_ls_logicalsnapdir</primary> - </indexterm> - <function>pg_ls_logicalsnapdir</function> () - <returnvalue>setof record</returnvalue> - ( <parameter>name</parameter> <type>text</type>, - <parameter>size</parameter> <type>bigint</type>, - <parameter>modification</parameter> <type>timestamp with time zone</type> ) - </para> - <para> - Returns the name, size, and last modification time (mtime) of each - ordinary file in the server's <filename>pg_logical/snapshots</filename> - directory. Filenames beginning with a dot, directories, and other - special files are excluded. - </para> - <para> - This function is restricted to superusers and members of - the <literal>pg_monitor</literal> role by default, but other users can - be granted EXECUTE to run the function. - </para></entry> - </row> - - <row> - <entry role="func_table_entry"><para role="func_signature"> - <indexterm> - <primary>pg_ls_logicalmapdir</primary> - </indexterm> - <function>pg_ls_logicalmapdir</function> () - <returnvalue>setof record</returnvalue> - ( <parameter>name</parameter> <type>text</type>, - <parameter>size</parameter> <type>bigint</type>, - <parameter>modification</parameter> <type>timestamp with time zone</type> ) - </para> - <para> - Returns the name, size, and last modification time (mtime) of each - ordinary file in the server's <filename>pg_logical/mappings</filename> - directory. Filenames beginning with a dot, directories, and other - special files are excluded. - </para> - <para> - This function is restricted to superusers and members of - the <literal>pg_monitor</literal> role by default, but other users can - be granted EXECUTE to run the function. - </para></entry> - </row> - - <row> - <entry role="func_table_entry"><para role="func_signature"> - <indexterm> - <primary>pg_ls_replslotdir</primary> - </indexterm> - <function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> ) - <returnvalue>setof record</returnvalue> - ( <parameter>name</parameter> <type>text</type>, - <parameter>size</parameter> <type>bigint</type>, - <parameter>modification</parameter> <type>timestamp with time zone</type> ) - </para> - <para> - Returns the name, size, and last modification time (mtime) of each - ordinary file in the server's <filename>pg_replslot/slot_name</filename> - directory, where <parameter>slot_name</parameter> is the name of the - replication slot provided as input of the function. Filenames beginning - with a dot, directories, and other special files are excluded. - </para> - <para> - This function is restricted to superusers and members of - the <literal>pg_monitor</literal> role by default, but other users can - be granted EXECUTE to run the function. - </para></entry> - </row> </tbody> </tgroup> </table> -- 2.17.1
>From 0465993d6995360c98306074997a14edff1f7259 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Wed, 19 Jan 2022 18:09:47 -0600 Subject: [PATCH 32/33] Alphabetize glossary: Startup process since: d3014fff4cd4dcaf4b2764d96ad038f3be7413b0 --- doc/src/sgml/glossary.sgml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/src/sgml/glossary.sgml b/doc/src/sgml/glossary.sgml index f23f78c00e4..1835d0e65a3 100644 --- a/doc/src/sgml/glossary.sgml +++ b/doc/src/sgml/glossary.sgml @@ -1489,22 +1489,6 @@ </glossdef> </glossentry> - <glossentry id="glossary-startup-process"> - <glossterm>Startup process</glossterm> - <glossdef> - <para> - An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm> - that replays WAL during crash recovery and in a - <glossterm linkend="glossary-replication">physical replica</glossterm>. - </para> - <para> - (The name is historical: the startup process was named before - replication was implemented; the name refers to its task as it - relates to the server startup following a crash.) - </para> - </glossdef> - </glossentry> - <glossentry id="glossary-sql-object"> <glossterm>SQL object</glossterm> <glossdef> @@ -1563,6 +1547,22 @@ <glosssee otherterm="glossary-replica" /> </glossentry> + <glossentry id="glossary-startup-process"> + <glossterm>Startup process</glossterm> + <glossdef> + <para> + An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm> + that replays WAL during crash recovery and in a + <glossterm linkend="glossary-replication">physical replica</glossterm>. + </para> + <para> + (The name is historical: the startup process was named before + replication was implemented; the name refers to its task as it + relates to the server startup following a crash.) + </para> + </glossdef> + </glossentry> + <glossentry id="glossary-stats-collector"> <glossterm>Stats collector (process)</glossterm> <glossdef> -- 2.17.1