Re: pgsql: Add more $Test::Builder::Level in the TAP tests

2021-10-13 Thread Peter Geoghegan
On Wed, Oct 13, 2021 at 9:00 PM Michael Paquier wrote: > Even for single psql commands in your environment? That would be > surprising that this does not show the same error about lines 56/57 in > /home/pg/.psqlrc, but I guess that's up to you for this part.. It's doing this: --

Re: pgsql: Add more $Test::Builder::Level in the TAP tests

2021-10-13 Thread Michael Paquier
On Wed, Oct 13, 2021 at 08:54:16PM -0700, Peter Geoghegan wrote: > On Wed, Oct 13, 2021 at 8:51 PM Michael Paquier wrote: >>> # Failed test 'handling of unexpected PQresultStatus: matches' >>> # at t/001_basic.pl line 43. >>> # 'psql:/home/pg/.psqlrc:56: ERROR: syntax error

Re: pgsql: Add more $Test::Builder::Level in the TAP tests

2021-10-13 Thread Peter Geoghegan
On Wed, Oct 13, 2021 at 8:51 PM Michael Paquier wrote: > > # Failed test 'handling of unexpected PQresultStatus: matches' > > # at t/001_basic.pl line 43. > > # 'psql:/home/pg/.psqlrc:56: ERROR: syntax error > > # psql:/home/pg/.psqlrc:57: ERROR: syntax error > > # LOG: re

Re: pgsql: Add more $Test::Builder::Level in the TAP tests

2021-10-13 Thread Michael Paquier
On Wed, Oct 13, 2021 at 08:14:20PM -0700, Peter Geoghegan wrote: > On Mon, Oct 11, 2021 at 7:17 PM Michael Paquier wrote: > > Add more $Test::Builder::Level in the TAP tests > > I saw an issue just now that I suspect is linked with this commit. I > ran my parallel "make check-world" recipe, and s

Re: pgsql: Add more $Test::Builder::Level in the TAP tests

2021-10-13 Thread Peter Geoghegan
On Mon, Oct 11, 2021 at 7:17 PM Michael Paquier wrote: > Add more $Test::Builder::Level in the TAP tests I saw an issue just now that I suspect is linked with this commit. I ran my parallel "make check-world" recipe, and saw this failure: # Failed test 'handling of unexpected PQresultStatus: m

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: Change recently added test code for stability

2021-10-13 Thread Alvaro Herrera
Change recently added test code for stability The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use

pgsql: pg_amcheck: avoid unhelpful verification attempts.

2021-10-13 Thread Peter Geoghegan
pg_amcheck: avoid unhelpful verification attempts. Avoid calling contrib/amcheck functions with relations that are unsuitable for checking. Specifically, don't attempt verification of temporary relations, or indexes whose pg_index entry indicates that the index is invalid, or not ready. These re

pgsql: pg_amcheck: avoid unhelpful verification attempts.

2021-10-13 Thread Peter Geoghegan
pg_amcheck: avoid unhelpful verification attempts. Avoid calling contrib/amcheck functions with relations that are unsuitable for checking. Specifically, don't attempt verification of temporary relations, or indexes whose pg_index entry indicates that the index is invalid, or not ready. These re

pgsql: Refactor some end-of-recovery code out of StartupXLOG().

2021-10-13 Thread Robert Haas
Refactor some end-of-recovery code out of StartupXLOG(). Create a new function PerformRecoveryXLogAction() and move the code which either writes an end-of-recovery record or requests a checkpoint there. Also create a new function CleanupAfterArchiveRecovery() to perform a few tasks that we want t

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean

2021-10-13 Thread Etsuro Fujita
postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5

pgsql: Fix use-after-free with multirange types in CREATE TYPE

2021-10-13 Thread Michael Paquier
Fix use-after-free with multirange types in CREATE TYPE The code was freeing the name of the multirange type function stored in the parse tree but it should not do that. Event triggers could for example look at such a corrupted parsed tree with a ddl_command_end event. Author: Alex Kozhemyakin,

pgsql: Fix use-after-free with multirange types in CREATE TYPE

2021-10-13 Thread Michael Paquier
Fix use-after-free with multirange types in CREATE TYPE The code was freeing the name of the multirange type function stored in the parse tree but it should not do that. Event triggers could for example look at such a corrupted parsed tree with a ddl_command_end event. Author: Alex Kozhemyakin,