Re: Fix pg_stat_progress_data_checksums counter initialization - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Fix pg_stat_progress_data_checksums counter initialization
Date
Msg-id A0818CBB-8BBE-404E-94D7-15471BE85271@yesql.se
Whole thread
List pgsql-hackers
> On 10 Jul 2026, at 09:13, Fujii Masao <masao.fujii@gmail.com> wrote:

> The attached patch fixes this by initializing all data checksum progress
> counters to -1 immediately after progress reporting starts for both
> launcher and worker processes.
> 
> While looking at this code, I also found that blocks_done is not reset
> when a worker starts processing a new relation fork. As a result,
> blocks_done can temporarily exceed blocks_total, or a stale blocks_done
> value can remain visible for an empty relation fork. The attached patch
> resets blocks_done together with blocks_total when starting each
> relation fork.

LGTM, thanks!

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: [PATCH] Preserve replication origin OIDs in pg_upgrade
Next
From: Daniel Gustafsson
Date:
Subject: Re: Fix data checksum processing for temp relations and dropped databases