pgsql: Persist slot invalidation correctly

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

pgsql: Persist slot invalidation correctly

Álvaro Herrera
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

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 <[hidden email]>
Author: Kyotaro Horiguchi <[hidden email]>
Reviewed-by: Álvaro Herrera <[hidden email]>



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