Re: pgsql: Add a regression test for allow_system_table_mods

2019-12-02 Thread Peter Eisentraut
On 2019-11-29 17:09, Tom Lane wrote: +WARNING: tablespaces created by regression test cases should have names starting with "regress_" I agree that this is somewhat pointless in the case of an "unsafe" test. But using a different name isn't going to invalidate the test case, so there's not rea

Re: pgsql: Add a regression test for allow_system_table_mods

2019-12-02 Thread Tom Lane
Peter Eisentraut writes: > On 2019-11-29 17:09, Tom Lane wrote: >> But using a different name isn't going to invalidate the test case, > The test case is specifically testing tablespace names starting with "pg_": > -- reserved tablespace name > CREATE TABLESPACE pg_foo LOCATION '/no/suc

pgsql: Make postgres_fdw's "Relations" output agree with the rest of EX

2019-12-02 Thread Tom Lane
Make postgres_fdw's "Relations" output agree with the rest of EXPLAIN. The relation aliases shown in the "Relations" line for a foreign scan didn't always agree with those used in the rest of EXPLAIN's output. The regression test result changes appearing here provide examples. It's really impossi

pgsql: Add a reverse-translation column number array to struct AppendRe

2019-12-02 Thread Tom Lane
Add a reverse-translation column number array to struct AppendRelInfo. This provides for cheaper mapping of child columns back to parent columns. The one existing use-case in examine_simple_variable() would hardly justify this by itself; but an upcoming bug fix will make use of this array in a ma

pgsql: Fix EXPLAIN's column alias output for mismatched child tables.

2019-12-02 Thread Tom Lane
Fix EXPLAIN's column alias output for mismatched child tables. If an inheritance/partitioning parent table is assigned some column alias names in the query, EXPLAIN mapped those aliases onto the child tables' columns by physical position, resulting in bogus output if a child table's columns aren't

pgsql: Fix failures with TAP tests of pg_ctl on Windows

2019-12-02 Thread Michael Paquier
Fix failures with TAP tests of pg_ctl on Windows On Windows, all the hosts spawned by the TAP tests bind to 127.0.0.1. Hence, if there is a port conflict, starting a cluster would immediately fail. One of the test scripts of pg_ctl initializes a node without PostgresNode.pm, using the default por

pgsql: Fix failures with TAP tests of pg_ctl on Windows

2019-12-02 Thread Michael Paquier
Fix failures with TAP tests of pg_ctl on Windows On Windows, all the hosts spawned by the TAP tests bind to 127.0.0.1. Hence, if there is a port conflict, starting a cluster would immediately fail. One of the test scripts of pg_ctl initializes a node without PostgresNode.pm, using the default por

pgsql: Fix failures with TAP tests of pg_ctl on Windows

2019-12-02 Thread Michael Paquier
Fix failures with TAP tests of pg_ctl on Windows On Windows, all the hosts spawned by the TAP tests bind to 127.0.0.1. Hence, if there is a port conflict, starting a cluster would immediately fail. One of the test scripts of pg_ctl initializes a node without PostgresNode.pm, using the default por

Re: pgsql: Add a regression test for allow_system_table_mods

2019-12-02 Thread Michael Paquier
On Mon, Dec 02, 2019 at 10:11:40AM -0500, Tom Lane wrote: > One way would be to provide a variant expected-file, but that's not going > to be fun for future maintenance of the test script. Another simple > answer is to crank up client_min_messages for this one test to hide the > WARNING, but you c

pgsql: Remove XLogFileNameP() from the tree

2019-12-02 Thread Michael Paquier
Remove XLogFileNameP() from the tree XLogFileNameP() is a wrapper routine able to build a palloc'd string for a WAL segment name, which is used for error string generation. There were several code paths where it gets called in a critical section, where memory allocation is not allowed. This resu