pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Persist slot invalidation correctly 2+ messages / 1 participants [nested] [flat]
* pgsql: Persist slot invalidation correctly @ 2020-06-27 00:42 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2020-06-27 00:42 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Persist slot invalidation correctly @ 2020-06-27 00:42 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2020-06-27 00:42 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-06-27 00:42 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-06-27 00:42 pgsql: Persist slot invalidation correctly Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-06-27 00:42 pgsql: Persist slot invalidation correctly Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox