pgsql: Retire src/backend/utils/misc/check_guc

2022-02-08 Thread Michael Paquier
Retire src/backend/utils/misc/check_guc This script has existed for a long time, and attempting to run it today causes a lot of false positives as an effect of GUCs added in the last couple of years. An equivalent, automatically-run and cross-platform solution is available in the TAP test introdu

pgsql: Add TAP test to automate the equivalent of check_guc

2022-02-08 Thread Michael Paquier
Add TAP test to automate the equivalent of check_guc src/backend/utils/misc/check_guc is a script that cross-checks the consistency of the GUCs with postgresql.conf.sample, making sure that its format is in line with what guc.c has. It has never been run automatically, and has rotten over the yea

pgsql: Remove ppport.h's broken re-implementation of eval_pv().

2022-02-08 Thread Tom Lane
Remove ppport.h's broken re-implementation of eval_pv(). Recent versions of Devel::PPPort try to redefine eval_pv() to dodge a bug in pre-5.31 Perl versions. Unfortunately the redefinition fails on compilers that don't support statements nested within expressions. However, we aren't actually int

pgsql: Remove ppport.h's broken re-implementation of eval_pv().

2022-02-08 Thread Tom Lane
Remove ppport.h's broken re-implementation of eval_pv(). Recent versions of Devel::PPPort try to redefine eval_pv() to dodge a bug in pre-5.31 Perl versions. Unfortunately the redefinition fails on compilers that don't support statements nested within expressions. However, we aren't actually int

pgsql: Remove ppport.h's broken re-implementation of eval_pv().

2022-02-08 Thread Tom Lane
Remove ppport.h's broken re-implementation of eval_pv(). Recent versions of Devel::PPPort try to redefine eval_pv() to dodge a bug in pre-5.31 Perl versions. Unfortunately the redefinition fails on compilers that don't support statements nested within expressions. However, we aren't actually int

pgsql: Remove ppport.h's broken re-implementation of eval_pv().

2022-02-08 Thread Tom Lane
Remove ppport.h's broken re-implementation of eval_pv(). Recent versions of Devel::PPPort try to redefine eval_pv() to dodge a bug in pre-5.31 Perl versions. Unfortunately the redefinition fails on compilers that don't support statements nested within expressions. However, we aren't actually int

pgsql: Remove ppport.h's broken re-implementation of eval_pv().

2022-02-08 Thread Tom Lane
Remove ppport.h's broken re-implementation of eval_pv(). Recent versions of Devel::PPPort try to redefine eval_pv() to dodge a bug in pre-5.31 Perl versions. Unfortunately the redefinition fails on compilers that don't support statements nested within expressions. However, we aren't actually int

pgsql: Remove ppport.h's broken re-implementation of eval_pv().

2022-02-08 Thread Tom Lane
Remove ppport.h's broken re-implementation of eval_pv(). Recent versions of Devel::PPPort try to redefine eval_pv() to dodge a bug in pre-5.31 Perl versions. Unfortunately the redefinition fails on compilers that don't support statements nested within expressions. However, we aren't actually int

Re: pgsql: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURR

2022-02-08 Thread Tomas Vondra
On 10/24/21 03:40, Noah Misch wrote: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. CIC and REINDEX CONCURRENTLY assume backends see their catalog changes no later than each backend's next transaction start. That failed to hold when a backend absorbed a relevant invalida

pgsql: Remove MaxBackends variable in favor of GetMaxBackends() functio

2022-02-08 Thread Robert Haas
Remove MaxBackends variable in favor of GetMaxBackends() function. Previously, it was really easy to write code that accessed MaxBackends before we'd actually initialized it, especially when coding up an extension. To make this less error-prune, introduce a new function GetMaxBackends() which shou

pgsql: Rename create_function_N test scripts for clarity.

2022-02-08 Thread Tom Lane
Rename create_function_N test scripts for clarity. Rename create_function_0 to create_function_c, and create_function_3 to create_function_sql, to establish their charters more clearly. This should also reduce confusion versus our underscore-digit convention for naming variant expected-files. I s

pgsql: Rearrange core regression tests to reduce cross-script dependenc

2022-02-08 Thread Tom Lane
Rearrange core regression tests to reduce cross-script dependencies. The idea behind this patch is to make it possible to run individual test scripts without running the entire core test suite. Making all the scripts completely independent would involve a massive rewrite, and would probably be wo