postgresql/src/test
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
..
authentication Allow records to span multiple lines in pg_hba.conf and pg_ident.conf. 2020-09-03 12:16:48 -04:00
examples Update copyrights for 2020 2020-01-01 12:21:45 -05:00
isolation Improve handling of dropped relations for REINDEX DATABASE/SCHEMA/SYSTEM 2020-09-02 09:08:12 +09:00
kerberos Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
ldap Fix rare failure in LDAP tests. 2020-08-03 12:49:36 +12:00
locale Use perl warnings pragma consistently 2020-04-13 11:55:45 -04:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Fix handling of CREATE TABLE LIKE with inheritance. 2020-08-21 15:00:47 -04:00
perl Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
recovery Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
regress Avoid lockup of a parallel worker when reporting a long error message. 2020-09-03 16:52:09 -04:00
ssl Correct several behavior descriptions in comments. 2020-08-15 20:21:52 -07:00
subscription Add support for streaming to built-in logical replication. 2020-09-03 07:54:07 +05:30
thread Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
README Add TAP tests for password-based authentication methods. 2017-03-17 11:34:16 +02:00

README

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication

thread/
  A thread-safety-testing utility used by configure