pgsql: Fix compilation on Windows with WAL_DEBUG

2023-12-05 Thread Michael Paquier
Fix compilation on Windows with WAL_DEBUG This has been broken since b060dbe0001a that has reworked the callback mechanism of XLogReader, most likely unnoticed because any form of development involving WAL happens on platforms where this compiles fine. Author: Bharath Rupireddy Discussion: https

pgsql: Fix compilation on Windows with WAL_DEBUG

2023-12-05 Thread Michael Paquier
Fix compilation on Windows with WAL_DEBUG This has been broken since b060dbe0001a that has reworked the callback mechanism of XLogReader, most likely unnoticed because any form of development involving WAL happens on platforms where this compiles fine. Author: Bharath Rupireddy Discussion: https

pgsql: Fix compilation on Windows with WAL_DEBUG

2023-12-05 Thread Michael Paquier
Fix compilation on Windows with WAL_DEBUG This has been broken since b060dbe0001a that has reworked the callback mechanism of XLogReader, most likely unnoticed because any form of development involving WAL happens on platforms where this compiles fine. Author: Bharath Rupireddy Discussion: https

pgsql: Fix compilation on Windows with WAL_DEBUG

2023-12-05 Thread Michael Paquier
Fix compilation on Windows with WAL_DEBUG This has been broken since b060dbe0001a that has reworked the callback mechanism of XLogReader, most likely unnoticed because any form of development involving WAL happens on platforms where this compiles fine. Author: Bharath Rupireddy Discussion: https

pgsql: Fix compilation on Windows with WAL_DEBUG

2023-12-05 Thread Michael Paquier
Fix compilation on Windows with WAL_DEBUG This has been broken since b060dbe0001a that has reworked the callback mechanism of XLogReader, most likely unnoticed because any form of development involving WAL happens on platforms where this compiles fine. Author: Bharath Rupireddy Discussion: https

pgsql: Apply filters to dump files all the time in 002_pg_upgrade.pl

2023-12-05 Thread Michael Paquier
Apply filters to dump files all the time in 002_pg_upgrade.pl This commit removes the restriction that would not apply filters to the dumps used for comparison in the TAP test of pg_upgrade when using the same base version for the old and new nodes. The previous logic would fail on Windows if loa

pgsql: Apply filters to dump files all the time in 002_pg_upgrade.pl

2023-12-05 Thread Michael Paquier
Apply filters to dump files all the time in 002_pg_upgrade.pl This commit removes the restriction that would not apply filters to the dumps used for comparison in the TAP test of pg_upgrade when using the same base version for the old and new nodes. The previous logic would fail on Windows if loa

pgsql: Apply filters to dump files all the time in 002_pg_upgrade.pl

2023-12-05 Thread Michael Paquier
Apply filters to dump files all the time in 002_pg_upgrade.pl This commit removes the restriction that would not apply filters to the dumps used for comparison in the TAP test of pg_upgrade when using the same base version for the old and new nodes. The previous logic would fail on Windows if loa

pgsql: Add support for deparsing semi-joins to contrib/postgres_fdw

2023-12-05 Thread Alexander Korotkov
Add support for deparsing semi-joins to contrib/postgres_fdw SEMI-JOIN is deparsed as the EXISTS subquery. It references outer and inner relations, so it should be evaluated as the condition in the upper-level WHERE clause. The signatures of deparseFromExprForRel() and deparseRangeTblRef() are rev

pgsql: Rename pg_verifybackup's JsonManifestParseContext callback funct

2023-12-05 Thread Robert Haas
Rename pg_verifybackup's JsonManifestParseContext callback functions. The old names were too generic, and would have applied to any binary that made use of JsonManifestParseContext. Rename to make the names specific to pg_verifybackup, since there are plans afoot to reuse this infrastructure. Per

pgsql: Rename JsonManifestParseContext callbacks.

2023-12-05 Thread Robert Haas
Rename JsonManifestParseContext callbacks. There is no real reason to just run multiple words together when we can instead punctuate them with marks intended for that purpose. Per suggestion from Álvaro Herrera. Discussion: http://postgr.es/m/202311161021.nisg7imt7kyf@alvherre.pgsql Branch

pgsql: Fix indentation

2023-12-05 Thread Daniel Gustafsson
Fix indentation When preparing commit 98e675ed7af I accidentally forgot to run pgindent, which did produce a diff. Fix by adding the required whitespace per the koel buildfarm failure. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4d0cf0b05defcee985d5af38cb0db2b9c

pgsql: Fix incorrect error message for IDENTIFY_SYSTEM

2023-12-05 Thread Daniel Gustafsson
Fix incorrect error message for IDENTIFY_SYSTEM Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the para

pgsql: Fix incorrect error message for IDENTIFY_SYSTEM

2023-12-05 Thread Daniel Gustafsson
Fix incorrect error message for IDENTIFY_SYSTEM Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the para

pgsql: Fix incorrect error message for IDENTIFY_SYSTEM

2023-12-05 Thread Daniel Gustafsson
Fix incorrect error message for IDENTIFY_SYSTEM Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the para

pgsql: Fix incorrect error message for IDENTIFY_SYSTEM

2023-12-05 Thread Daniel Gustafsson
Fix incorrect error message for IDENTIFY_SYSTEM Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the para

pgsql: Fix incorrect error message for IDENTIFY_SYSTEM

2023-12-05 Thread Daniel Gustafsson
Fix incorrect error message for IDENTIFY_SYSTEM Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the para

pgsql: Fix incorrect error message for IDENTIFY_SYSTEM

2023-12-05 Thread Daniel Gustafsson
Fix incorrect error message for IDENTIFY_SYSTEM Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the para

pgsql: Fix handling of errors in libpq pipelines

2023-12-05 Thread Alvaro Herrera
Fix handling of errors in libpq pipelines The logic to keep the libpq command queue in sync with queries that have been processed had a bug when errors were returned for reasons other than problems in queries -- for example, when a connection is lost. We incorrectly consumed an element from the c

pgsql: Fix handling of errors in libpq pipelines

2023-12-05 Thread Alvaro Herrera
Fix handling of errors in libpq pipelines The logic to keep the libpq command queue in sync with queries that have been processed had a bug when errors were returned for reasons other than problems in queries -- for example, when a connection is lost. We incorrectly consumed an element from the c

pgsql: Fix handling of errors in libpq pipelines

2023-12-05 Thread Alvaro Herrera
Fix handling of errors in libpq pipelines The logic to keep the libpq command queue in sync with queries that have been processed had a bug when errors were returned for reasons other than problems in queries -- for example, when a connection is lost. We incorrectly consumed an element from the c

pgsql: Fix handling of errors in libpq pipelines

2023-12-05 Thread Alvaro Herrera
Fix handling of errors in libpq pipelines The logic to keep the libpq command queue in sync with queries that have been processed had a bug when errors were returned for reasons other than problems in queries -- for example, when a connection is lost. We incorrectly consumed an element from the c