postgresql/src/test
Tom Lane d4791ac35c Avoid possible crash while finishing up a heap rewrite.
end_heap_rewrite was not careful to ensure that the target relation
is open at the smgr level before performing its final smgrimmedsync.
In ordinary cases this is no problem, because it would have been
opened earlier during the rewrite.  However a crash can be reproduced
by re-clustering an empty table with CLOBBER_CACHE_ALWAYS enabled.

Although that exact scenario does not crash in v13, I think that's
a chance result of unrelated planner changes, and the problem is
likely still reachable with other test cases.  The true proximate
cause of this failure is commit c6b92041d, which replaced a call to
heap_sync (which was careful about opening smgr) with a direct call
to smgrimmedsync.  Hence, back-patch to v13.

Amul Sul, per report from Neha Sharma; cosmetic changes
and test case by me.

Discussion: https://postgr.es/m/CANiYTQsU7yMFpQYnv=BrcRVqK_3U3mtAzAsJCaqtzsDHfsUbdQ@mail.gmail.com
2021-03-23 11:24:16 -04:00
..
authentication Make new authentication test case more robust. 2020-09-04 21:01:59 -04:00
examples Update copyrights for 2020 2020-01-01 12:21:45 -05:00
isolation Fix permission checks on constraint violation errors on partitions. 2021-02-08 11:01:55 +02:00
kerberos Don't clobber the calling user's credentials cache in Kerberos test. 2021-01-25 14:53:13 -05:00
ldap Fix rare failure in LDAP tests. 2020-08-03 12:43:11 +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 pg_dump for GRANT OPTION among initial privileges. 2021-01-16 12:21:38 -08:00
perl Use fast checkpoint in PostgresNode::backup() 2020-10-21 14:37:26 -03:00
recovery Make a test endure log_error_verbosity=verbose. 2021-03-21 19:09:35 -07:00
regress Avoid possible crash while finishing up a heap rewrite. 2021-03-23 11:24:16 -04:00
ssl Fix test for error message change 2020-11-08 07:50:42 +01:00
subscription Fix error with CREATE PUBLICATION, wal_level=minimal, and new tables. 2021-01-30 00:12:05 -08:00
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

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