pgsql: Improve and fix some issues in the TAP tests of pg_upgrade

2022-05-20 Thread Michael Paquier
Improve and fix some issues in the TAP tests of pg_upgrade This is based on a set of suggestions from Noah, with the following changes made: - The set of databases created in the tests are now prefixed with "regression" to not trigger any warnings with name restrictions when compiling the code wit

pgsql: Remove portability hazard in unsafe_tests/sql/guc_privs.sql.

2022-05-20 Thread Tom Lane
Remove portability hazard in unsafe_tests/sql/guc_privs.sql. This new-in-v15 test case assumed it could set max_stack_depth as high as 2MB. You might think that'd be true on any modern platform but you'd be wrong, as I found out while experimenting with NetBSD/hppa. This test is about privileges

pgsql: Fix mis-merge of result file

2022-05-20 Thread Alvaro Herrera
Fix mis-merge of result file Failed to "git add" this file in this branch. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8c47622bb36972a95cf3789217bf33b2d18a00ce Modified Files -- src/test/regress/expected/event_trigger.out | 2 ++ 1 file change

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër Discussio

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër Discussio

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër Discussio

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër Discussio

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër Discussio

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër Discussio

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Add pg_version() to PostgreSQL::Test::Cluster

2022-05-20 Thread Michael Paquier
Add pg_version() to PostgreSQL::Test::Cluster _pg_version (version number based on PostgreSQL::Version) is a field private to Cluster.pm but there was no helper routine to retrieve it from a Cluster's node. The same is done for install_path, for example, and the version object becomes handy when

pgsql: doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY

2022-05-20 Thread Alvaro Herrera
doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY It wasn't previously mentioned that the index is created as invalid, which is confusing to new users. Backpatch to 14 (only because of a conflict in 13). Author: Laurenz Albe Reported-by: Lauren Fliksteen Reviewed-by: Rajakavitha

pgsql: doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY

2022-05-20 Thread Alvaro Herrera
doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY It wasn't previously mentioned that the index is created as invalid, which is confusing to new users. Backpatch to 14 (only because of a conflict in 13). Author: Laurenz Albe Reported-by: Lauren Fliksteen Reviewed-by: Rajakavitha

pgsql: pg_waldump: Improve option parsing error messages

2022-05-20 Thread Peter Eisentraut
pg_waldump: Improve option parsing error messages I rephrased the error messages to be more in the style of option_parse_int(), and also made use of the new "detail" message facility. I didn't actually use option_parse_int() (which could be used for -n) because libpgfeutils wasn't used here yet a