From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Persist slot invalidation correctly |
Date: | 2020-06-27 00:42:17 |
Message-ID: | E1joyvB-0002QI-C0@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)fujii(at)oss(dot)nttdata(dot)com>
Author: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Reviewed-by: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Discussion: https://postgr.es/m/17a69cfe-f1c1-a416-ee25-ae15427c69eb@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4ae08cd5fd19d566538005c15e7bf992ebae4c72
Modified Files
--------------
src/backend/replication/slot.c | 9 +++++----
src/backend/replication/slotfuncs.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-06-27 04:32:11 | pgsql: Remove duplicate check added by commit b2a5545bd6. |
Previous Message | Bruce Momjian | 2020-06-26 22:24:23 | pgsql: doc: PG 13 relnotes; remove FOREIGN keyword item and clarify |