public inbox for [email protected]help / color / mirror / Atom feed
pgsql: Lift shutdown assertion in pgstats for WAL senders 3+ messages / 1 participants [nested] [flat]
* pgsql: Lift shutdown assertion in pgstats for WAL senders @ 2026-06-05 23:53 Michael Paquier <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2026-06-05 23:53 UTC (permalink / raw) To: [email protected] Lift shutdown assertion in pgstats for WAL senders Before v17, WAL senders can shut down after the checkpointer. If a WAL sender still has pending statistics when the checkpointer has already exited, its shutdown callback may attempt to report those statistics and trigger assertions in pgstats. In that case, the pending statistics are lost. This commit adjusts the assertion handling so that attempts to report pending WAL sender statistics after the checkpointer has completed its final stats flush are skipped. Preserving the existing assertion would require backpatching an equivalent of 87a6690cc69, ensuring that the checkpointer is always the last process to exit. Such a change would be considerably more invasive and risky for stable branches because it alters the shutdown sequence, and the consequence is only some loss of stats data for the WAL sender. This assertion failure was periodically detected in the buildfarm, leading to spurious failures. Reported-by: Alexander Lakhin <[email protected]> Reviewed-by: Xuneng Zhou <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15-17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4801610f7c66661f2b8722a2c5561273e210960b Modified Files -------------- src/backend/utils/activity/pgstat.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Lift shutdown assertion in pgstats for WAL senders @ 2026-06-05 23:53 Michael Paquier <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2026-06-05 23:53 UTC (permalink / raw) To: [email protected] Lift shutdown assertion in pgstats for WAL senders Before v17, WAL senders can shut down after the checkpointer. If a WAL sender still has pending statistics when the checkpointer has already exited, its shutdown callback may attempt to report those statistics and trigger assertions in pgstats. In that case, the pending statistics are lost. This commit adjusts the assertion handling so that attempts to report pending WAL sender statistics after the checkpointer has completed its final stats flush are skipped. Preserving the existing assertion would require backpatching an equivalent of 87a6690cc69, ensuring that the checkpointer is always the last process to exit. Such a change would be considerably more invasive and risky for stable branches because it alters the shutdown sequence, and the consequence is only some loss of stats data for the WAL sender. This assertion failure was periodically detected in the buildfarm, leading to spurious failures. Reported-by: Alexander Lakhin <[email protected]> Reviewed-by: Xuneng Zhou <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15-17 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/830b476d0beae290b7f8d29bee6d13884b287b20 Modified Files -------------- src/backend/utils/activity/pgstat.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Lift shutdown assertion in pgstats for WAL senders @ 2026-06-05 23:53 Michael Paquier <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2026-06-05 23:53 UTC (permalink / raw) To: [email protected] Lift shutdown assertion in pgstats for WAL senders Before v17, WAL senders can shut down after the checkpointer. If a WAL sender still has pending statistics when the checkpointer has already exited, its shutdown callback may attempt to report those statistics and trigger assertions in pgstats. In that case, the pending statistics are lost. This commit adjusts the assertion handling so that attempts to report pending WAL sender statistics after the checkpointer has completed its final stats flush are skipped. Preserving the existing assertion would require backpatching an equivalent of 87a6690cc69, ensuring that the checkpointer is always the last process to exit. Such a change would be considerably more invasive and risky for stable branches because it alters the shutdown sequence, and the consequence is only some loss of stats data for the WAL sender. This assertion failure was periodically detected in the buildfarm, leading to spurious failures. Reported-by: Alexander Lakhin <[email protected]> Reviewed-by: Xuneng Zhou <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15-17 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/eeed86523bb9cd7064e540f29e057d123e18914a Modified Files -------------- src/backend/utils/activity/pgstat.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-06-05 23:53 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-05 23:53 pgsql: Lift shutdown assertion in pgstats for WAL senders Michael Paquier <[email protected]> 2026-06-05 23:53 pgsql: Lift shutdown assertion in pgstats for WAL senders Michael Paquier <[email protected]> 2026-06-05 23:53 pgsql: Lift shutdown assertion in pgstats for WAL senders Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox