pgsql: Fix handling of default option values in createuser

2023-03-06 Thread Daniel Gustafsson
Fix handling of default option values in createuser Add description of which one is the default between two complementary options of --bypassrls and --replication in the help text and docs. In correspondence let the command always include the tokens corresponding to every options of that kind in t

pgsql: In basebackup.c, perform end-of-file test after checksum validat

2023-03-06 Thread Robert Haas
In basebackup.c, perform end-of-file test after checksum validation. We read blocks of data from files that we're backing up in chunks, some multiple of BLCKSZ for each read. If checksum verification fails, we then try rereading just the one block for which validation failed. If that block happene

pgsql: In basebackup.c, perform end-of-file test after checksum validat

2023-03-06 Thread Robert Haas
In basebackup.c, perform end-of-file test after checksum validation. We read blocks of data from files that we're backing up in chunks, some multiple of BLCKSZ for each read. If checksum verification fails, we then try rereading just the one block for which validation failed. If that block happene

pgsql: Remove an old comment that doesn't seem especially useful.

2023-03-06 Thread Robert Haas
Remove an old comment that doesn't seem especially useful. The functions that follow are concerned with various things, of which the tar format is only one, so this comment doesn't really seem helpful. The file isn't really divided into sections in the way that this comment seems to contemplate --

pgsql: Reword overly-optimistic comment about backup checksum verificat

2023-03-06 Thread Robert Haas
Reword overly-optimistic comment about backup checksum verification. The comment implies that a single retry is sufficient to avoid spurious checksum failures, but in fact no number of retries is sufficient for that purpose. Update the comment accordingly. Patch by me, reviewed by Michael Paquier

pgsql: Fill EState.es_rteperminfos more systematically.

2023-03-06 Thread Tom Lane
Fill EState.es_rteperminfos more systematically. While testing a fix for bug #17823, I discovered that EvalPlanQualStart failed to copy es_rteperminfos from the parent EState, resulting in failure if anything in EPQ execution wanted to consult that information. This led me to conclude that commit

pgsql: Silence -Wmissing-braces complaints in file_utils.c

2023-03-06 Thread Michael Paquier
Silence -Wmissing-braces complaints in file_utils.c Per buildfarm member lapwing, coupled with an offline poke from Julien Rouhaud. 6392f2a was a similar case. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d937904cce6a3d82e4f9c2127de7b59105a134b3 Modified Files

pgsql: Fix some more cases of missed GENERATED-column updates.

2023-03-06 Thread Tom Lane
Fix some more cases of missed GENERATED-column updates. If UPDATE is forced to retry after an EvalPlanQual check, it neglected to repeat GENERATED-column computations, even though those might well have changed since we're dealing with a different tuple than before. Fixing this is mostly a matter o

pgsql: Fix some more cases of missed GENERATED-column updates.

2023-03-06 Thread Tom Lane
Fix some more cases of missed GENERATED-column updates. If UPDATE is forced to retry after an EvalPlanQual check, it neglected to repeat GENERATED-column computations, even though those might well have changed since we're dealing with a different tuple than before. Fixing this is mostly a matter o

pgsql: Fix some more cases of missed GENERATED-column updates.

2023-03-06 Thread Tom Lane
Fix some more cases of missed GENERATED-column updates. If UPDATE is forced to retry after an EvalPlanQual check, it neglected to repeat GENERATED-column computations, even though those might well have changed since we're dealing with a different tuple than before. Fixing this is mostly a matter o

pgsql: Fix some more cases of missed GENERATED-column updates.

2023-03-06 Thread Tom Lane
Fix some more cases of missed GENERATED-column updates. If UPDATE is forced to retry after an EvalPlanQual check, it neglected to repeat GENERATED-column computations, even though those might well have changed since we're dealing with a different tuple than before. Fixing this is mostly a matter o

pgsql: Fix some more cases of missed GENERATED-column updates.

2023-03-06 Thread Tom Lane
Fix some more cases of missed GENERATED-column updates. If UPDATE is forced to retry after an EvalPlanQual check, it neglected to repeat GENERATED-column computations, even though those might well have changed since we're dealing with a different tuple than before. Fixing this is mostly a matter o

pgsql: Improve cleanup phases in regression tests of pg_stat_statements

2023-03-06 Thread Michael Paquier
Improve cleanup phases in regression tests of pg_stat_statements As shaped, two DROP ROLE queries included in "user_activity" were showing in the reports for "wal". The intention is to keep each test isolated and independent, so this is incorrect. This commit adds some calls to pg_stat_statement

pgsql: Fix incorrect comment in pg_get_partkeydef()

2023-03-06 Thread David Rowley
Fix incorrect comment in pg_get_partkeydef() The comment claimed the output of the function was prefixed by "PARTITION BY". This is incorrect. Author: Japin Li Reviewed-by: Ashutosh Bapat Discussion: https://postgr.es/m/meyp282mb166923b446ff5fe55b9dacb7b6...@meyp282mb1669.ausp282.prod.outlook.c

pgsql: Make get_extension_schema() available

2023-03-06 Thread Michael Paquier
Make get_extension_schema() available This routine is able to retrieve the OID of the schema used with an extension (pg_extension.extnamespace), or InvalidOid if this information is not available. plpgsql_check embeds a copy of this code when performing checks on functions, as one out-of-core exa