postgresql/src/test/regress
Tom Lane be4b0c0077 Avoid lockup of a parallel worker when reporting a long error message.
Because sigsetjmp() will restore the initial state with signals blocked,
the code path in bgworker.c for reporting an error and exiting would
execute that way.  Usually this is fairly harmless; but if a parallel
worker had an error message exceeding the shared-memory communication
buffer size (16K) it would lock up, because it would wait for a
resume-sending signal from its parallel leader which it would never
detect.

To fix, just unblock signals at the appropriate point.

This can be shown to fail back to 9.6.  The lack of parallel query
infrastructure makes it difficult to provide a simple test case for
9.5; but I'm pretty sure the issue exists in some form there as well,
so apply the code change there too.

Vignesh C, reviewed by Bharath Rupireddy, Robert Haas, and myself

Discussion: https://postgr.es/m/CALDaNm1d1hHPZUg3xU4XjtWBOLCrA+-2cJcLpw-cePZ=GgDVfA@mail.gmail.com
2020-09-03 16:52:09 -04:00
..
data Fix full text search to handle NOT above a phrase search correctly. 2020-04-27 12:21:04 -04:00
expected Avoid lockup of a parallel worker when reporting a long error message. 2020-09-03 16:52:09 -04:00
input Fix typos. 2020-06-11 15:14:09 +05:30
output Fix typos. 2020-06-11 15:14:09 +05:30
sql Avoid lockup of a parallel worker when reporting a long error message. 2020-09-03 16:52:09 -04:00
.gitignore Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
GNUmakefile Make install-tests target work with vpath builds 2020-05-31 18:33:00 -04:00
Makefile Fix non-GNU makefiles for AIX make. 2017-11-30 00:57:22 -08:00
README Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
parallel_schedule Fix crashes with currtid() and currtid2() 2020-06-01 10:32:06 +09:00
pg_regress.c Revert "Remove reset of testtablespace from pg_regress on Windows" 2020-07-10 17:08:13 +09:00
pg_regress.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_regress_main.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
regress.c Fix deadlock danger when atomic ops are done under spinlock. 2020-06-18 14:08:32 -07:00
regressplans.sh Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
resultmap Cygwin and Mingw floating-point fixes. 2019-02-16 01:50:16 +00:00
serial_schedule Fix crashes with currtid() and currtid2() 2020-06-01 10:32:06 +09:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00

README

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".