pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Count the last block of the validation scan in a concurrent inde
Date: Tue, 27 Oct 2026 03:25:12 +0000
Message-ID: <E1xLXoG-00000000vGG-0BEB@gemulon.postgresql.org> (raw)

Count the last block of the validation scan in a concurrent index build

heapam_index_validate_scan() reports PROGRESS_SCAN_BLOCKS_DONE as the
number of the block that the scan starts on, forgetting to count the
last block scanned.

Due to the last block not being counted, the number of blocks_done never
matched blocks_total.  This information could remain on the view for a
long time, depending on the waits done between the phases of CREATE
INDEX CONCURRENTLY or REINDEX CONCURRENTLY.

This is incorrect still purely cosmetic, so no backpatch is done.

Author: Manu <manuelreyesbravo@gmail.com>
Discussion: https://postgr.es/m/179303526069.2212386.7608335332316408826@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/99ea4a55270d5ce48bc33b9daf5d641818e03b89

Modified Files
--------------
src/backend/access/heap/heapam_handler.c | 4 ++++
1 file changed, 4 insertions(+)



Message-ID: <E1xLXoG-00000000vGG-0BEB@gemulon.postgresql.org>
Permalink:  ../E1xLXoG-00000000vGG-0BEB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xLXoG-00000000vGG-0BEB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Count the last block of the validation scan in a concurrent inde
  In-Reply-To: <E1xLXoG-00000000vGG-0BEB@gemulon.postgresql.org>
  References: <E1xLXoG-00000000vGG-0BEB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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