pgsql: Add nbtree README note on index-only scans in recovery.

Поиск
Список
Период
Сортировка
Искать

pgsql: Add nbtree README note on index-only scans in recovery.

От:
Peter Geoghegan <pg@bowt.ie>
Дата:
Add nbtree README note on index-only scans in recovery.

The nbtree README has long claimed that "the interlocking required to
avoid returning incorrect results from non-MVCC scans is not required on
standby nodes".  A recent test case proved that the underlying reasoning
was faulty.

There are significant practical challenges around fixing this bug, and
no user has complained about it so far.  The old "pin scan" mechanism
prevented the problem but performed very poorly.  Since there seems to
be no appetite for resurrecting that mechanism, and since an acceptable
fix hasn't been forthcoming, make a note of the issue for later.

Discussion: https://postgr.es/m/CAH2-Wzkro678xEDOrsxrq-YDVP4w7nXybhVJV2MxrzTj-5OU4w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9e7d152488f197e96f171f0714459c227c3f7693

Modified Files
--------------
src/backend/access/nbtree/README | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Re: pgsql: Add nbtree README note on index-only scans in recovery.

От:
Matthias van de Meent <boekewurm+postgres@gmail.com>
Дата:
Hi Peter,

On Mon, 12 Oct 2026 at 09:53, Peter Geoghegan  wrote:
>
> Add nbtree README note on index-only scans in recovery.
>
> The nbtree README has long claimed that "the interlocking required to
> avoid returning incorrect results from non-MVCC scans is not required on
> standby nodes".  A recent test case proved that the underlying reasoning
> was faulty.
>
> There are significant practical challenges around fixing this bug, and
> no user has complained about it so far.  The old "pin scan" mechanism
> prevented the problem but performed very poorly.  Since there seems to
> be no appetite for resurrecting that mechanism, and since an acceptable
> fix hasn't been forthcoming, make a note of the issue for later.

Could you elaborate what your acceptance criteria for a fix are?  Your
one and final reply mail of 9 July [0] in the discussion thread
included you mentioning that the fix I produced on 22 June [1] or its
approach was not "appealing", but it said nothing about its
acceptability, its lack thereof, nor did it contain any comments on
its merits.

Is ensuring correctness now playing second fiddle to unqualified
appeal to some committers?  If not, could you elaborate why the patch
is not considered an acceptable fix, and what qualities a fix needs to
have be considered acceptable?


Kind regards,

Matthias van de Meent

[0] https://postgr.es/m/CAH2-Wzm--Yd-wuCURZnunVf_N9awb60pTLrv1La006Yf5zaAhw%40mail.gmail.com
[1] https://postgr.es/m/CAEze2WighSz7jbnw4L0KgQEBg_4%2BHJhDKdYwQTgeyDTXHwFvfQ%40mail.gmail.com


FAQ