pgsql: Persist slot invalidation correctly - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Persist slot invalidation correctly
Date
Msg-id E1joyvB-0002QJ-CS@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Persist slot invalidation correctly

We failed to save slot to disk after invalidating it, so the state was
lost in case of server restart or crash.  Fix by marking it dirty and
flushing.

Also, if the slot is known invalidated we don't need to reason about the
LSN at all -- it's known invalidated.  Only test the LSN if the slot is
known not invalidated.

Author: Fujii Masao <masao.fujii@oss.nttdata.com>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/17a69cfe-f1c1-a416-ee25-ae15427c69eb@oss.nttdata.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3b4b541777f0b85df7626623ef78df0ea48ca5dc

Modified Files
--------------
src/backend/replication/slot.c      |  9 +++++----
src/backend/replication/slotfuncs.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 12 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: doc: PG 13 relnotes; remove FOREIGN keyword item and clarify
Next
From: Amit Kapila
Date:
Subject: pgsql: Remove duplicate check added by commit b2a5545bd6.