Save slot's restart_lsn when invalidated due to size

We put it aside as invalidated_at, which let us show "lost" in
pg_replication slot.  Prior to this change, the state value was reported
as NULL.

Backpatch to 13.

Author: Kyotaro Horiguchi <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: 
https://postgr.es/m/[email protected]
Discussion: 
https://postgr.es/m/[email protected]

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/12e52ba5a76e56aacdfbbb269e6b45c53d80c477

Modified Files
--------------
src/backend/replication/slot.c            |  1 +
src/backend/replication/slotfuncs.c       | 11 ++++++++++-
src/include/access/xlog.h                 |  2 +-
src/include/replication/slot.h            |  3 +++
src/test/recovery/t/019_replslot_limit.pl |  2 +-
5 files changed, 16 insertions(+), 3 deletions(-)

Reply via email to