a11f330b55
This commit adds a new property called last_inactive_time for slots. It is set to 0 whenever a slot is made active/acquired and set to the current timestamp whenever the slot is inactive/released or restored from the disk. Note that we don't set the last_inactive_time for the slots currently being synced from the primary to the standby because such slots are typically inactive as decoding is not allowed on those. The 'last_inactive_time' will be useful on production servers to debug and analyze inactive replication slots. It will also help to know the lifetime of a replication slot - one can know how long a streaming standby, logical subscriber, or replication slot consumer is down. The 'last_inactive_time' will also be useful to implement inactive timeout-based replication slot invalidation in a future commit. Author: Bharath Rupireddy Reviewed-by: Bertrand Drouvot, Amit Kapila, Shveta Malik Discussion: https://www.postgresql.org/message-id/CALj2ACW4aUe-_uFQOjdWCEN-xXoLGhmvRFnL8SNw_TZ5nJe+aw@mail.gmail.com |
||
---|---|---|
.. | ||
t | ||
.gitignore | ||
Makefile | ||
README | ||
meson.build |
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.