pgsql: doc: Fix some issues in logical replication section

2023-01-18 Thread Michael Paquier
doc: Fix some issues in logical replication section wal_retrieve_retry_interval was mentioned under an incorrect name, and wal_sender_timeout was not listed as affecting WAL senders in logical replication mode. Author: Takamichi Osumi Discussion: https://postgr.es/m/tycpr01mb8373d65e6b0a769ed12e

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Add missing assign hook for GUC checkpoint_completion_target

2023-01-18 Thread Michael Paquier
Add missing assign hook for GUC checkpoint_completion_target This is wrong since 88e9823, that has switched the WAL sizing configuration from checkpoint_segments to min_wal_size and max_wal_size. This missed the recalculation of the internal value of the internal "CheckPointSegments", that works

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_14_STABLE Details -

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_12_STABLE Details -

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- master Details --- http

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_11_STABLE Details -

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_15_STABLE Details -

pgsql: Fix failure with perlcritic in psql's create_help.pl

2023-01-18 Thread Michael Paquier
Fix failure with perlcritic in psql's create_help.pl No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/k...@paquier.xyz Backpatch-through: 11 Branch -- REL_13_STABLE Details -

pgsql: Fix AdjustUpgrade.pm's view conversion list for --with-lz4.

2023-01-18 Thread Tom Lane
Fix AdjustUpgrade.pm's view conversion list for --with-lz4. Turns out the compression.sql test creates a view that needs to be adjusted in the wake of 47bb9db75 --- except that without --with-lz4, it fails to create the view at all, so I'd not noticed this in testing. Per buildfarm member crake.

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Tom Lane
Justin Pryzby writes: > On Wed, Jan 18, 2023 at 02:40:06PM -0600, Justin Pryzby wrote: >> Looks like it failed the last 7 days >> https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/41/4048 > Correction. It failed in the most recent 7 runs, which seem to be ~13 > days ago through

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Justin Pryzby
On Wed, Jan 18, 2023 at 02:40:06PM -0600, Justin Pryzby wrote: > On Wed, Jan 18, 2023 at 03:35:41PM -0500, Tom Lane wrote: > > Andres Freund writes: > > > On 2023-01-18 15:08:38 -0500, Tom Lane wrote: > > >> Huh, I wonder why the cfbot never complained about that when > > >> it was testing this pa

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Justin Pryzby
On Wed, Jan 18, 2023 at 03:35:41PM -0500, Tom Lane wrote: > Andres Freund writes: > > On 2023-01-18 15:08:38 -0500, Tom Lane wrote: > >> Huh, I wonder why the cfbot never complained about that when > >> it was testing this patch ... maybe it doesn't use win1252? > > > This is the same environment

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Tom Lane
Andres Freund writes: > On 2023-01-18 15:08:38 -0500, Tom Lane wrote: >> Huh, I wonder why the cfbot never complained about that when >> it was testing this patch ... maybe it doesn't use win1252? > This is the same environment that cfbot is also using, so this is odd. And > cfbot has been failin

pgsql: Update expected/collate.windows.win1252.out for 47bb9db75.

2023-01-18 Thread Tom Lane
Update expected/collate.windows.win1252.out for 47bb9db75. This delta in expected output wasn't spotted in any previous testing of the patch. Reported by Andres Freund. Discussion: https://postgr.es/m/20230118195855.7yjc4mminmv7i...@awork3.anarazel.de Branch -- master Details --- http

pgsql: Use dlists instead of SHM_QUEUE for syncrep queue

2023-01-18 Thread Andres Freund
Use dlists instead of SHM_QUEUE for syncrep queue Part of a series to remove SHM_QUEUE. ilist.h style lists are more widely used and have an easier to use interface. Reviewed-by: Thomas Munro (in an older version) Discussion: https://postgr.es/m/20221120055930.t6kl3tyivzhlr...@awork3.anarazel.d

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Andres Freund
Hi, On 2023-01-18 15:08:38 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2023-01-18 18:24:45 +, Tom Lane wrote: > >> Get rid of the "new" and "old" entries in a view's rangetable. > > > This seems to have caused a test failure on windows. Looks like it's not > > indicating a real pro

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Tom Lane
Andres Freund writes: > On 2023-01-18 18:24:45 +, Tom Lane wrote: >> Get rid of the "new" and "old" entries in a view's rangetable. > This seems to have caused a test failure on windows. Looks like it's not > indicating a real problem, just that collate.windows.win1252.out needs to be > adapt

Re: pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Andres Freund
Hi, On 2023-01-18 18:24:45 +, Tom Lane wrote: > Get rid of the "new" and "old" entries in a view's rangetable. This seems to have caused a test failure on windows. Looks like it's not indicating a real problem, just that collate.windows.win1252.out needs to be adapted. Here's the regression.

pgsql: Add detached node functions to ilist

2023-01-18 Thread Andres Freund
Add detached node functions to ilist These allow to test whether an element is in a list by checking whether prev/next are NULL. Needed to replace SHMQueueIsDetached() when converting from SHM_QUEUE to ilist.h style lists. Reviewed-by: Thomas Munro Discussion: https://postgr.es/m/20221120055930

pgsql: Use dlist/dclist instead of PROC_QUEUE / SHM_QUEUE for heavyweig

2023-01-18 Thread Andres Freund
Use dlist/dclist instead of PROC_QUEUE / SHM_QUEUE for heavyweight locks Part of a series to remove SHM_QUEUE. ilist.h style lists are more widely used and have an easier to use interface. As PROC_QUEUE is now unused, remove it. Reviewed-by: Thomas Munro (in an older version) Discussion: https

pgsql: Fix ILIST_DEBUG build

2023-01-18 Thread Andres Freund
Fix ILIST_DEBUG build In c8ad4d8166a dlist_member_check()'s arguments were made const. Unfortunately the implementation of dlist_member_check() used dlist_foreach(), which currently doesn't work for const lists. As a workaround, open-code the list iteration. The other check functions already do s

pgsql: Get rid of the "new" and "old" entries in a view's rangetable.

2023-01-18 Thread Tom Lane
Get rid of the "new" and "old" entries in a view's rangetable. The rule system needs "old" and/or "new" pseudo-RTEs in rule actions that are ON INSERT/UPDATE/DELETE. Historically it's put such entries into the ON SELECT rules of views as well, but those are really quite vestigial. The only thing

pgsql: Remove redundant grouping and DISTINCT columns.

2023-01-18 Thread Tom Lane
Remove redundant grouping and DISTINCT columns. Avoid explicitly grouping by columns that we know are redundant for sorting, for example we need group by only one of x and y in SELECT ... WHERE x = y GROUP BY x, y This comes up more often than you might think, as shown by the changes in th