postgresql/src/test/recovery
Amit Kapila 6f132ed693 Allow synced slots to have their inactive_since.
This commit does two things:
1) Maintains inactive_since for sync slots whenever the slot is released
just like any other regular slot.

2) Ensures the value is set to the current timestamp during the promotion
of standby to help correctly interpret the time after promotion. We don't
want the slots to appear inactive for a long time after promotion if they
haven't been synchronized recently. This would also avoid the invalidation
of such slots immediately after promotion if tomorrow we have a feature
that invalidates slots based on their inactivity time. Whoever acquires
the slot i.e. makes the slot active will reset it to NULL.

Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Amit Kapila, Shveta Malik, Masahiko Sawada
Discussion: https://postgr.es/m/CAA4eK1KrPGwfZV9LYGidjxHeW+rxJ=E2ThjXvwRGLO=iLNuo=Q@mail.gmail.com
Discussion: https://postgr.es/m/CALj2ACW4aUe-_uFQOjdWCEN-xXoLGhmvRFnL8SNw_TZ5nJe+aw@mail.gmail.com
Discussion: https://postgr.es/m/CA+Tgmob_Ta-t2ty8QrKHBGnNLrf4ZYcwhGHGFsuUoFrAEDw4sA@mail.gmail.com
2024-04-05 09:48:49 +05:30
..
t Allow synced slots to have their inactive_since. 2024-04-05 09:48:49 +05:30
.gitignore Minor tweaks for new src/test/recovery 2016-02-29 18:16:59 -03:00
Makefile Add regression test for restart points during promotion 2024-03-04 09:49:03 +09:00
README Force testing of query jumbling in 027_stream_regress.pl 2023-03-03 10:41:51 +09:00
meson.build Implement pg_wal_replay_wait() stored procedure 2024-04-02 22:48:03 +03:00

README

src/test/recovery/README

Regression tests for recovery and replication
=============================================

This directory contains a test suite for recovery and replication.

Running the tests
=================

NOTE: You must have given the --enable-tap-tests argument to configure.
Also, to use "make installcheck", you must have built and installed
contrib/pg_prewarm, contrib/pg_stat_statements and contrib/test_decoding
in addition to the core code.

Run
    make check
or
    make installcheck
You can use "make installcheck" if you previously did "make install".
In that case, the code in the installation tree is tested.  With
"make check", a temporary installation tree is built from the current
sources and then tested.

Either way, this test initializes, starts, and stops several test Postgres
clusters.

If you want to test WAL consistency checking, add
PG_TEST_EXTRA=wal_consistency_checking
to the "make" command.  This is resource-intensive, so it's not done
by default.

See src/test/perl/README for more info about running these tests.