postgresql/src/test
Alexander Korotkov eb124c3d6d Add TAP tests to check replication slot advance during the checkpoint
The new tests verify that logical and physical replication slots are still
valid after an immediate restart on checkpoint completion when the slot was
advanced during the checkpoint.

This commit introduces two new injection points to make these tests possible:

* checkpoint-before-old-wal-removal - triggered in the checkpointer process
  just before old WAL segments cleanup;
* logical-replication-slot-advance-segment - triggered in
  LogicalConfirmReceivedLocation() when restart_lsn was changed enough to
  point to the next WAL segment.

Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497
Author: Vitaly Davydov <v.davydov@postgrespro.ru>
Author: Tomas Vondra <tomas@vondra.me>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Backpatch-through: 17
2025-06-14 03:55:21 +03:00
..
authentication Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
examples libpq: Deprecate pg_int64. 2025-03-25 21:40:00 +13:00
icu Update copyright for 2025 2025-01-01 11:21:55 -05:00
isolation Change the names generated for child foreign key constraints. 2025-04-23 12:03:02 -04:00
kerberos Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
ldap Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
locale Update copyright for 2025 2025-01-01 11:21:55 -05:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Fixed signed/unsigned mismatch in test_dsm_registry. 2025-06-06 11:40:52 -05:00
perl Fix cross-version upgrade test failure 2025-05-20 10:39:14 +03:00
postmaster Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
recovery Add TAP tests to check replication slot advance during the checkpoint 2025-06-14 03:55:21 +03:00
regress psql: Forbid use of COPY and \copy while in a pipeline 2025-06-13 10:15:17 +09:00
ssl Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
subscription Fix race condition in subscription TAP test 021_twophase 2025-05-26 17:28:37 +09:00
Makefile Add PG_TEST_EXTRA configure option to the Make builds 2024-11-04 14:09:38 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
README Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04: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 (but see also below)

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

isolation/
  Tests for concurrent behavior at the SQL level

kerberos/
  Tests for Kerberos/GSSAPI authentication and encryption

ldap/
  Tests for LDAP-based authentication

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