agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Fix data checksum progress counter initialization 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix data checksum progress counter initialization @ 2026-07-10 13:35 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-07-10 13:35 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix data checksum progress counter initialization pg_stat_progress_data_checksums uses -1 as a sentinel value that is displayed as NULL for progress counters. However, after pgstat_progress_start_command() initialized all progress counters to zero, data checksum progress did not reset those counters to -1. As a result, some counters could incorrectly appear as zero instead of NULL. For example, workers could report zero database counters, and the disabling launcher could report zero relation and block counters. Also, blocks_done was not reset when a worker started processing a new relation fork. As a result, it could temporarily exceed blocks_total or report a stale value for an empty relation fork. Fix this by initializing the data checksum progress counters to -1 when progress reporting starts for both launcher and worker processes. Also reset blocks_done together with blocks_total when starting each relation fork. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/CAHGQGwEOQyEzW2cqrHEzvwbcsAsuH8MEe7MMidFOFxECy0E1_Q@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e9810253f095f19aab899694f491a1a529f9eb4d Modified Files -------------- doc/src/sgml/monitoring.sgml | 8 ++--- src/backend/catalog/system_views.sql | 2 +- src/backend/postmaster/datachecksum_state.c | 53 ++++++++++++++++++++++------- src/test/regress/expected/rules.out | 5 ++- 4 files changed, 50 insertions(+), 18 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix data checksum progress counter initialization @ 2026-07-10 13:36 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-07-10 13:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix data checksum progress counter initialization pg_stat_progress_data_checksums uses -1 as a sentinel value that is displayed as NULL for progress counters. However, after pgstat_progress_start_command() initialized all progress counters to zero, data checksum progress did not reset those counters to -1. As a result, some counters could incorrectly appear as zero instead of NULL. For example, workers could report zero database counters, and the disabling launcher could report zero relation and block counters. Also, blocks_done was not reset when a worker started processing a new relation fork. As a result, it could temporarily exceed blocks_total or report a stale value for an empty relation fork. Fix this by initializing the data checksum progress counters to -1 when progress reporting starts for both launcher and worker processes. Also reset blocks_done together with blocks_total when starting each relation fork. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/CAHGQGwEOQyEzW2cqrHEzvwbcsAsuH8MEe7MMidFOFxECy0E1_Q@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9d1d91a14335392347e09a6cef2a45d8eafeebbd Modified Files -------------- doc/src/sgml/monitoring.sgml | 8 ++--- src/backend/catalog/system_views.sql | 2 +- src/backend/postmaster/datachecksum_state.c | 53 ++++++++++++++++++++++------- src/test/regress/expected/rules.out | 5 ++- 4 files changed, 50 insertions(+), 18 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-10 13:36 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-10 13:35 pgsql: Fix data checksum progress counter initialization Fujii Masao <fujii@postgresql.org> 2026-07-10 13:36 pgsql: Fix data checksum progress counter initialization Fujii Masao <fujii@postgresql.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox