pgsql: Simplify more checks related to set-returning functions

2022-02-23 Thread Michael Paquier
Simplify more checks related to set-returning functions This makes more consistent the SRF-related checks in the area of PL/pgSQL, PL/Perl, PL/Tcl, pageinspect and some of the JSON worker functions, making it easier to grep for the same error patterns through the code, reducing a bit the translati

pgsql: Clean up and simplify code in a couple of set-returning function

2022-02-23 Thread Michael Paquier
Clean up and simplify code in a couple of set-returning functions The following set-returning functions have their logic simplified, to be more consistent with other in-core areas: - pg_prepared_statement()'s tuple descriptor is now created with get_call_result_type() instead of being created from

pgsql: postgres_fdw: Add support for parallel commit.

2022-02-23 Thread Etsuro Fujita
postgres_fdw: Add support for parallel commit. postgres_fdw commits remote (sub)transactions opened on remote server(s) in a local (sub)transaction one by one when the local (sub)transaction commits. This patch allows it to commit the remote (sub)transactions in parallel to improve performance.

pgsql: Fix one of the tests introduced in commit 52e4f0cd47.

2022-02-23 Thread Amit Kapila
Fix one of the tests introduced in commit 52e4f0cd47. In the Publisher-Subscriber setup, after performing a DML operation on the publisher, we need to wait for it to be replayed on the subscriber before querying the same data on the subscriber. One of the tests missed the wait step. As per buildf

pgsql: Re-allow underscore as first character of custom GUC names.

2022-02-23 Thread Tom Lane
Re-allow underscore as first character of custom GUC names. Commit 3db826bd5 intended that valid_custom_variable_name's rules for valid identifiers match those of scan.l. However, I (tgl) had some kind of brain fade and put "_" in the wrong list. Fix by Japin Li, per bug #17415 from Daniel Polsk

pgsql: Re-allow underscore as first character of custom GUC names.

2022-02-23 Thread Tom Lane
Re-allow underscore as first character of custom GUC names. Commit 3db826bd5 intended that valid_custom_variable_name's rules for valid identifiers match those of scan.l. However, I (tgl) had some kind of brain fade and put "_" in the wrong list. Fix by Japin Li, per bug #17415 from Daniel Polsk

pgsql: Quick exit on log stream child exit in pg_basebackup

2022-02-23 Thread Daniel Gustafsson
Quick exit on log stream child exit in pg_basebackup If the log streaming child process (thread on Windows) dies during backup then the whole backup will be aborted at the end of the backup. Instead, trap ungraceful termination of the log streaming child and exit early. This also adds a TAP test

pgsql: Remove duplicated word in comment

2022-02-23 Thread Daniel Gustafsson
Remove duplicated word in comment Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c7d7e1203958952e0ef67d336c58f1e7094e7634 Modified Files -- src/

pgsql: Add function to pump IPC process until string match

2022-02-23 Thread Daniel Gustafsson
Add function to pump IPC process until string match Refactor the recovery tests to not carry a local duplicated copy of the pump_until function which pumps a process until a defined string is seen on a stream. This reduces duplication, and is in preparation for another patch which will also use th

pgsql: Use test functions in pg_rewind test module

2022-02-23 Thread Daniel Gustafsson
Use test functions in pg_rewind test module Commit 61081e75c introduced pg_rewind along with the test suite, which ensured that subroutines didn't incur more than one test to plan. Now that we no longer explicitly plan tests (since 549ec201d), we can use the usual Test::More functions. Reviewed

pgsql: Fix statenames in mergejoin comments

2022-02-23 Thread Daniel Gustafsson
Fix statenames in mergejoin comments The names in the comments were on a few states not consistent with the documented state. Author: Zhihong Yu Discussion: https://postgr.es/m/CALNJ-vQVthfQXVqmrHR8BKHtC4fMGbhM1xbvJNJAPexTq_dH=w...@mail.gmail.com Branch -- master Details --- https://g