pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Keep WAL segments by the flushed value of the slot's restart LSN 5+ messages / 1 participants [nested] [flat]
* pgsql: Keep WAL segments by the flushed value of the slot's restart LSN @ 2025-06-14 01:29 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at the end of the checkpoint. The idea of the patch is to get the minimal restart_lsn at the beginning of checkpoint (or restart point) creation and use this value when calculating the oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Unlike 291221c46575, this fix doesn't affect ABI and is intended for back branches. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 13 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2090edc6f32f652a2c995ca5f7e65748ae1e4c5d Modified Files -------------- src/backend/access/transam/xlog.c | 55 ++++++++++++++++++++++++++----- src/backend/replication/logical/logical.c | 10 +++++- src/backend/replication/walsender.c | 4 +++ 3 files changed, 60 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Keep WAL segments by the flushed value of the slot's restart LSN @ 2025-06-14 01:29 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at the end of the checkpoint. The idea of the patch is to get the minimal restart_lsn at the beginning of checkpoint (or restart point) creation and use this value when calculating the oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Unlike 291221c46575, this fix doesn't affect ABI and is intended for back branches. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 13 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cea8f2c3e44b5fac59a7298c6b9045c5cbb0eaeb Modified Files -------------- src/backend/access/transam/xlog.c | 55 ++++++++++++++++++++++++++----- src/backend/replication/logical/logical.c | 10 +++++- src/backend/replication/walsender.c | 4 +++ 3 files changed, 60 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Keep WAL segments by the flushed value of the slot's restart LSN @ 2025-06-14 01:30 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at the end of the checkpoint. The idea of the patch is to get the minimal restart_lsn at the beginning of checkpoint (or restart point) creation and use this value when calculating the oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Unlike 291221c46575, this fix doesn't affect ABI and is intended for back branches. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 13 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dd3df0b85009cd736c6cb0582b503fdee844bce2 Modified Files -------------- src/backend/access/transam/xlog.c | 55 ++++++++++++++++++++++++++----- src/backend/replication/logical/logical.c | 10 +++++- src/backend/replication/walsender.c | 4 +++ 3 files changed, 60 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Keep WAL segments by the flushed value of the slot's restart LSN @ 2025-06-14 01:30 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at the end of the checkpoint. The idea of the patch is to get the minimal restart_lsn at the beginning of checkpoint (or restart point) creation and use this value when calculating the oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Unlike 291221c46575, this fix doesn't affect ABI and is intended for back branches. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 13 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e2832bd961103a17e281919de7151f80f518cf24 Modified Files -------------- src/backend/access/transam/xlog.c | 55 ++++++++++++++++++++++++++----- src/backend/replication/logical/logical.c | 10 +++++- src/backend/replication/walsender.c | 4 +++ 3 files changed, 60 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Keep WAL segments by the flushed value of the slot's restart LSN @ 2025-06-14 01:30 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2025-06-14 01:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at the end of the checkpoint. The idea of the patch is to get the minimal restart_lsn at the beginning of checkpoint (or restart point) creation and use this value when calculating the oldest LSN for WAL segments removal at the end of checkpoint. This idea was proposed by Tomas Vondra in the discussion. Unlike 291221c46575, this fix doesn't affect ABI and is intended for back branches. Discussion: https://postgr.es/m/flat/1d12d2-67235980-35-19a406a0%4063439497 Author: Vitaly Davydov <v.davydov@postgrespro.ru> Reviewed-by: Tomas Vondra <tomas@vondra.me> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 13 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dd9bc1a17d0324448c45c6fc0a2d258b9134bfc3 Modified Files -------------- src/backend/access/transam/xlog.c | 55 ++++++++++++++++++++++++++----- src/backend/replication/logical/logical.c | 10 +++++- src/backend/replication/walsender.c | 4 +++ 3 files changed, 60 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-06-14 01:30 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-06-14 01:29 pgsql: Keep WAL segments by the flushed value of the slot's restart LSN Alexander Korotkov <akorotkov@postgresql.org> 2025-06-14 01:29 pgsql: Keep WAL segments by the flushed value of the slot's restart LSN Alexander Korotkov <akorotkov@postgresql.org> 2025-06-14 01:30 pgsql: Keep WAL segments by the flushed value of the slot's restart LSN Alexander Korotkov <akorotkov@postgresql.org> 2025-06-14 01:30 pgsql: Keep WAL segments by the flushed value of the slot's restart LSN Alexander Korotkov <akorotkov@postgresql.org> 2025-06-14 01:30 pgsql: Keep WAL segments by the flushed value of the slot's restart LSN Alexander Korotkov <akorotkov@postgresql.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