postgresql/src
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
..
backend Add TAP tests to check replication slot advance during the checkpoint 2025-06-14 03:55:21 +03:00
bin psql: Reword help message and docs for WATCH_INTERVAL 2025-06-13 15:13:09 +02:00
common Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
fe_utils Fix incorrect format placeholders 2025-04-25 16:49:30 +02:00
include Keep WAL segments by slot's last saved restart LSN 2025-06-14 03:36:04 +03:00
interfaces Don't reduce output request size on non-Unix-socket connections. 2025-06-10 18:39:34 -04:00
makefiles oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
pl plpython: Remove obsolete test expected file 2025-06-07 09:04:29 +02:00
port Fix incorrect year in some copyright notices 2025-05-19 09:46:52 +09:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Add TAP tests to check replication slot advance during the checkpoint 2025-06-14 03:55:21 +03:00
timezone Update time zone data files to tzdata release 2025b. 2025-04-30 11:13:49 -04:00
tools Revert function to get memory context stats for processes 2025-05-23 15:44:54 +02:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
Makefile.shlib Use exported symbols list on macOS for loadable modules as well 2025-06-10 07:04:43 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00