mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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 <horikyota.ntt@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200617.101707.1735599255100002667.horikyota.ntt@gmail.com Discussion: https://postgr.es/m/20200407.120905.1507671100168805403.horikyota.ntt@gmail.com
This commit is contained in:
@@ -1226,6 +1226,7 @@ restart:
|
||||
(uint32) restart_lsn)));
|
||||
|
||||
SpinLockAcquire(&s->mutex);
|
||||
s->data.invalidated_at = s->data.restart_lsn;
|
||||
s->data.restart_lsn = InvalidXLogRecPtr;
|
||||
SpinLockRelease(&s->mutex);
|
||||
ReplicationSlotRelease();
|
||||
|
Reference in New Issue
Block a user