pgsql: Bump minimum version of Flex to 2.5.35

2022-09-08 Thread John Naylor
Bump minimum version of Flex to 2.5.35 Since the retirement of some older buildfarm members, the oldest Flex that gets regular testing is 2.5.35. Reviewed by Andres Freund Discussion: https://www.postgresql.org/message-id/1097762.1662145...@sss.pgh.pa.us Branch -- master Details ---

pgsql: Bump minimum version of Bison to 2.3

2022-09-08 Thread John Naylor
Bump minimum version of Bison to 2.3 Since the retirement of some older buildfarm members, the oldest Bison that gets regular testing is 2.3. MacOS ships that version, and will continue doing so for the forseeable future because of Apple's policy regarding GPLv3. While Mac users could use a

pgsql: Add jsonpath_gram.h to list of distprep targets

2022-09-08 Thread John Naylor
Add jsonpath_gram.h to list of distprep targets Oversight in dac048f71e Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/96683db880cab7791006fcc13416d67f6230a2f7 Modified Files -- src/backend/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Tom Lane
Amit Kapila writes: > Fair enough. Do you mind being consistent in this regard for logical > replication-related code? As long as not too many individual changes are involved, sure. But consistency of this sort doesn't seem worth creating a lot of back-patching land mines, IMO. > BTW, is there

pgsql: Replace load of functions by direct calls for some WIN32

2022-09-08 Thread Michael Paquier
Replace load of functions by direct calls for some WIN32 This commit changes the following code paths to do direct system calls to some WIN32 functions rather than loading them from an external library, shaving some code in the process: - Creation of restricted tokens in pg_ctl.c, introduced by

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Amit Kapila
On Thu, Sep 8, 2022 at 7:28 PM Tom Lane wrote: > > Amit Kapila writes: > > I feel it is better to be consistent across the entire code base > > unless there is a reason for doing it differently. Does anyone else > > have any thoughts on this matter? > > That sounds like it would be a pretty

pgsql: Add more error context to RestoreBlockImage() and consume it

2022-09-08 Thread Michael Paquier
Add more error context to RestoreBlockImage() and consume it On failure in restoring a block image, no details were provided, while it is possible to see failure with an inconsistent record state, a failure in processing decompression or a failure in decompression because a build does not support

pgsql: Add more error context to RestoreBlockImage() and consume it

2022-09-08 Thread Michael Paquier
Add more error context to RestoreBlockImage() and consume it On failure in restoring a block image, no details were provided, while it is possible to see failure with an inconsistent record state, a failure in processing decompression or a failure in decompression because a build does not support

Re: pgsql: Fix perltidy breaking perlcritic

2022-09-08 Thread Andrew Dunstan
On Thu, Sep 8, 2022 at 5:23 AM Alvaro Herrera wrote: > Fix perltidy breaking perlcritic > > perltidying a "##no critic" line moves the marker to where it becomes > useless. Put the line back to how it was, and protect it from further > malfeasance. > > > A better way do do this IMNSHO is to put

Re: pgsql: Choose FK name correctly during partition attachment

2022-09-08 Thread Tom Lane
Alvaro Herrera writes: > Choose FK name correctly during partition attachment Some of the buildfarm is unhappy with this, most clearly so here: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing=2022-09-08%2015%3A30%3A25 ore was generated by `postgres: postgres regression [local]

pgsql: Instrument freezing in autovacuum log reports.

2022-09-08 Thread Peter Geoghegan
Instrument freezing in autovacuum log reports. Add a new line to log reports from autovacuum (as well as VACUUM VERBOSE output) that shows information about freezing. Emphasis is placed on the total number of heap pages that had one or more tuples frozen by VACUUM. The total number of tuples

Re: pgsql: doc: clarify recursion internal behavior

2022-09-08 Thread Tom Lane
Robert Haas writes: > On Thu, Sep 8, 2022 at 7:24 AM Peter Eisentraut > wrote: >> On 03.09.22 03:58, Bruce Momjian wrote: >>> +While RECURSIVE allows queries to be specified >>> +recursively, internally all queries are evaluated iteratively. >> Is that true? Surely there is some

Re: pgsql: doc: clarify recursion internal behavior

2022-09-08 Thread Robert Haas
On Thu, Sep 8, 2022 at 7:24 AM Peter Eisentraut wrote: > On 03.09.22 03:58, Bruce Momjian wrote: > > doc: clarify recursion internal behavior > > -Strictly speaking, this process is iteration not recursion, but > -RECURSIVE is the terminology chosen by the SQL > standards > -

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Tom Lane
Amit Kapila writes: > I feel it is better to be consistent across the entire code base > unless there is a reason for doing it differently. Does anyone else > have any thoughts on this matter? That sounds like it would be a pretty massive and unnecessary patch. regards,

pgsql: Temporarily make MemoryContextContains return false

2022-09-08 Thread David Rowley
Temporarily make MemoryContextContains return false 5265e91fd changed MemoryContextContains to update it so that it works correctly with the new MemoryChunk code added in c6e0fe1f2. However, 5265e91fd was done with the assumption that MemoryContextContains would only ever be given pointers to

Re: pgsql: doc: clarify recursion internal behavior

2022-09-08 Thread Peter Eisentraut
On 03.09.22 03:58, Bruce Momjian wrote: doc: clarify recursion internal behavior -Strictly speaking, this process is iteration not recursion, but -RECURSIVE is the terminology chosen by the SQL standards -committee. +While RECURSIVE allows queries to be specified +

pgsql: Choose FK name correctly during partition attachment

2022-09-08 Thread Alvaro Herrera
Choose FK name correctly during partition attachment During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreign key constraint is already used on the partition, the code tries to choose another one before the FK attributes list has been populated, so the resulting constraint name was

pgsql: Choose FK name correctly during partition attachment

2022-09-08 Thread Alvaro Herrera
Choose FK name correctly during partition attachment During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreign key constraint is already used on the partition, the code tries to choose another one before the FK attributes list has been populated, so the resulting constraint name was

pgsql: Choose FK name correctly during partition attachment

2022-09-08 Thread Alvaro Herrera
Choose FK name correctly during partition attachment During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreign key constraint is already used on the partition, the code tries to choose another one before the FK attributes list has been populated, so the resulting constraint name was

pgsql: Choose FK name correctly during partition attachment

2022-09-08 Thread Alvaro Herrera
Choose FK name correctly during partition attachment During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreign key constraint is already used on the partition, the code tries to choose another one before the FK attributes list has been populated, so the resulting constraint name was

pgsql: Choose FK name correctly during partition attachment

2022-09-08 Thread Alvaro Herrera
Choose FK name correctly during partition attachment During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreign key constraint is already used on the partition, the code tries to choose another one before the FK attributes list has been populated, so the resulting constraint name was

pgsql: Fix recovery_prefetch with low maintenance_io_concurrency.

2022-09-08 Thread Thomas Munro
Fix recovery_prefetch with low maintenance_io_concurrency. We should process completed IOs *before* trying to start more, so that it is always possible to decode one more record when the decoded record queue is empty, even if maintenance_io_concurrency is set so low that a single earlier WAL

pgsql: Fix recovery_prefetch with low maintenance_io_concurrency.

2022-09-08 Thread Thomas Munro
Fix recovery_prefetch with low maintenance_io_concurrency. We should process completed IOs *before* trying to start more, so that it is always possible to decode one more record when the decoded record queue is empty, even if maintenance_io_concurrency is set so low that a single earlier WAL

pgsql: Fix perltidy breaking perlcritic

2022-09-08 Thread Alvaro Herrera
Fix perltidy breaking perlcritic perltidying a "##no critic" line moves the marker to where it becomes useless. Put the line back to how it was, and protect it from further malfeasance. Per buildfarm member crake. Branch -- master Details ---

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Amit Kapila
On Thu, Sep 8, 2022 at 2:38 PM Masahiko Sawada wrote: > > On Thu, Sep 8, 2022 at 4:23 PM Amit Kapila wrote: > > > > On Thu, Sep 8, 2022 at 12:22 PM Masahiko Sawada > > wrote: > > > > > > > > > Should the tables and the function in this query be schema-qualified? > > > Looking at other code in

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Masahiko Sawada
On Thu, Sep 8, 2022 at 4:23 PM Amit Kapila wrote: > > On Thu, Sep 8, 2022 at 12:22 PM Masahiko Sawada wrote: > > > > On Thu, Sep 8, 2022 at 10:39 AM Amit Kapila wrote: > > > > > > Raise a warning if there is a possibility of data from multiple origins. > > > > > > This commit raises a warning

pgsql: doc: Fix PL/pgSQL casing to be consistent

2022-09-08 Thread Daniel Gustafsson
doc: Fix PL/pgSQL casing to be consistent Ensure that all mentions of PL/pgSQL is cased equally, a few instances of PL/PgSQL had snuck in. Reviewed-by: Pavel Stehule Discussion: https://postgr.es/m/ddcf61c3-9e25-48a8-97be-6113a93d5...@yesql.se Branch -- master Details ---

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread vignesh C
On Thu, 8 Sept 2022 at 12:22, Masahiko Sawada wrote: > > On Thu, Sep 8, 2022 at 10:39 AM Amit Kapila wrote: > > > > Raise a warning if there is a possibility of data from multiple origins. > > > > This commit raises a warning message for a combination of options > > ('copy_data = true' and

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Amit Kapila
On Thu, Sep 8, 2022 at 12:22 PM Masahiko Sawada wrote: > > On Thu, Sep 8, 2022 at 10:39 AM Amit Kapila wrote: > > > > Raise a warning if there is a possibility of data from multiple origins. > > > > This commit raises a warning message for a combination of options > > ('copy_data = true' and

pgsql: Add b2e6e7682 to .git-blame-ignore-revs

2022-09-08 Thread John Naylor
Add b2e6e7682 to .git-blame-ignore-revs Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b289b86231ad10fb317231ff85596d6272203916 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Run perltidy over Catalog.pm

2022-09-08 Thread John Naylor
Run perltidy over Catalog.pm Commit 69eb643b2 deliberately left indentation unchanged to make the changes more legible. Rather than waiting until next year's perltidy run, do it now to avoid confusion Per suggestion from Álvaro Herrera Discussion:

pgsql: Parse catalog .dat files as a whole when compiling the backend

2022-09-08 Thread John Naylor
Parse catalog .dat files as a whole when compiling the backend Previously Catalog.pm eval'd each individual hash reference so that comments and whitespace can be preserved when running reformat-dat-files. This is unnecessary when building, and we can save ~15% off the run time of genbki.pl by

Re: pgsql: Raise a warning if there is a possibility of data from multiple

2022-09-08 Thread Masahiko Sawada
On Thu, Sep 8, 2022 at 10:39 AM Amit Kapila wrote: > > Raise a warning if there is a possibility of data from multiple origins. > > This commit raises a warning message for a combination of options > ('copy_data = true' and 'origin = none') during CREATE/ALTER subscription > operations if the