Re: Resetting snapshots during the first phase of [CREATE |RE]INDEX CONCURRENTLY

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Antonin Houska <ah(at)cybertec(dot)at>, Sergey Sargsyan <sergey(dot)sargsyan(dot)2001(at)gmail(dot)com>, Hannu Krosing <hannuk(at)google(dot)com>
Subject: Re: Resetting snapshots during the first phase of [CREATE |RE]INDEX CONCURRENTLY
Date: 2026-11-24 18:08:41
Message-ID: awXPu0zNVHQC8zCC@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I'm not really sure that we want need to have a setting for how
frequently to reset the snapshot. For testing I agree that it's okay to
make it very frequent, but otherwise I think we'd rather the user not
have to be concerned with a setting for this. Just make it happen on a
regular enough basis, so that the user can forget it.

100ms sounds a bit too frequent for my taste. But why do we need to
measure it in wall-clock time? In the REPACK proposed patches, Antonin
does it every 1024 pages (the value to be tuned, per the XXX comment in
the patch). I think a page-measured operation is good enough, and maybe
something like once every 128 MB (so every 16k pages?)

Thanks

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"We have labored long to build a heaven, only (Prof. Milton Glass)
to find it populated with horrors" (Watchmen, Alan Moore)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haoyu Huang 2026-11-24 18:17:08 Re: Better shared data structure management and resizable shared data structures
Previous Message Antonin Houska 2026-11-24 17:49:59 Re: Table AM callback for logical decoding support (REPACK CONCURRENTLY)