pgsql: Fix missing word in nbtree/README.

2023-06-08 Thread Nathan Bossart
Fix missing word in nbtree/README. Reported-by: Daniel Westermann Author: Gurjeet Singh Reviewed-by: Richard Guo Discussion: https://postgr.es/m/ZR0P278MB0427F0E0CE4ED140F52D1923D250A%40ZR0P278MB0427.CHEP278.PROD.OUTLOOK.COM Branch -- master Details --- https://git.postgresql.org/pg/com

pgsql: Refactor routine to find single log content pattern in TAP tests

2023-06-08 Thread Michael Paquier
Refactor routine to find single log content pattern in TAP tests The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains,

pgsql: Refactor routine to find single log content pattern in TAP tests

2023-06-08 Thread Michael Paquier
Refactor routine to find single log content pattern in TAP tests The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains,

pgsql: Refactor routine to find single log content pattern in TAP tests

2023-06-08 Thread Michael Paquier
Refactor routine to find single log content pattern in TAP tests The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains,

pgsql: Refactor routine to find single log content pattern in TAP tests

2023-06-08 Thread Michael Paquier
Refactor routine to find single log content pattern in TAP tests The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains,

pgsql: Refactor routine to find single log content pattern in TAP tests

2023-06-08 Thread Michael Paquier
Refactor routine to find single log content pattern in TAP tests The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains,

pgsql: Refactor routine to find single log content pattern in TAP tests

2023-06-08 Thread Michael Paquier
Refactor routine to find single log content pattern in TAP tests The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains,

pgsql: Honor run_as_owner option in tablesync worker.

2023-06-08 Thread Masahiko Sawada
Honor run_as_owner option in tablesync worker. Commit 482675987 introduced "run_as_owner" subscription option so that subscription runs with either the permissions of the subscription owner or the permission of the table owner. However, tablesync workers did not use this option for the initial dat

pgsql: Refactor log check logic for connect_ok/fails in PostgreSQL::Tes

2023-06-08 Thread Michael Paquier
Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster This commit refactors a bit the code in charge of checking for log patterns when connections fail or succeed, by moving the log pattern checks into their own routine, for clarity. This has come up as something to improve w

pgsql: Refactor log check logic for connect_ok/fails in PostgreSQL::Tes

2023-06-08 Thread Michael Paquier
Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster This commit refactors a bit the code in charge of checking for log patterns when connections fail or succeed, by moving the log pattern checks into their own routine, for clarity. This has come up as something to improve w

pgsql: Refactor log check logic for connect_ok/fails in PostgreSQL::Tes

2023-06-08 Thread Michael Paquier
Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster This commit refactors a bit the code in charge of checking for log patterns when connections fail or succeed, by moving the log pattern checks into their own routine, for clarity. This has come up as something to improve w

pgsql: Fix oversight in outer join removal.

2023-06-08 Thread Tom Lane
Fix oversight in outer join removal. A placeholder that references the outer join's relid in ph_eval_at is logically "above" the join, and therefore we can't remove its PlaceHolderInfo: it might still be used somewhere in the query. This was not an issue pre-v16 because we failed to remove the jo

pgsql: Re-allow INDEX_VAR as rt_index in ChangeVarNodes().

2023-06-08 Thread Tom Lane
Re-allow INDEX_VAR as rt_index in ChangeVarNodes(). Apparently some extensions are in the habit of calling ChangeVarNodes() with INDEX_VAR as the rt_index to replace. That worked before 2489d76c4, at least as long as there were not PlaceHolderVars in the expression; but now it fails because bms_is

pgsql: Fix small overestimation of base64 encoding output length.

2023-06-08 Thread Tom Lane
Fix small overestimation of base64 encoding output length. pg_base64_enc_len() and its clones overestimated the output length by up to 2 bytes, as a result of sloppy thinking about where to divide. No callers require a precise estimate, so this has no consequences worse than palloc'ing a byte or

pgsql: doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS.

2023-06-08 Thread Fujii Masao
doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. In the documentation, previously the example command for ALTER FOREIGN TABLE ... OPTIONS incorrectly included both the option name and value with the DROP operation. The correct syntax for the DROP operation requires only the name of th

pgsql: doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS.

2023-06-08 Thread Fujii Masao
doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. In the documentation, previously the example command for ALTER FOREIGN TABLE ... OPTIONS incorrectly included both the option name and value with the DROP operation. The correct syntax for the DROP operation requires only the name of th

pgsql: doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS.

2023-06-08 Thread Fujii Masao
doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. In the documentation, previously the example command for ALTER FOREIGN TABLE ... OPTIONS incorrectly included both the option name and value with the DROP operation. The correct syntax for the DROP operation requires only the name of th

pgsql: doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS.

2023-06-08 Thread Fujii Masao
doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. In the documentation, previously the example command for ALTER FOREIGN TABLE ... OPTIONS incorrectly included both the option name and value with the DROP operation. The correct syntax for the DROP operation requires only the name of th

pgsql: doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS.

2023-06-08 Thread Fujii Masao
doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. In the documentation, previously the example command for ALTER FOREIGN TABLE ... OPTIONS incorrectly included both the option name and value with the DROP operation. The correct syntax for the DROP operation requires only the name of th

pgsql: doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS.

2023-06-08 Thread Fujii Masao
doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. In the documentation, previously the example command for ALTER FOREIGN TABLE ... OPTIONS incorrectly included both the option name and value with the DROP operation. The correct syntax for the DROP operation requires only the name of th