Re: [PATCH] Btree BackwardScan race condition on Standby during VACUUM

Michail Nikolaev <michail.nikolaev@gmail.com>

From: Michail Nikolaev <michail.nikolaev@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-07-10T20:25:15Z
Lists: pgsql-hackers
Hello, Peter.

Thanks for the update.

Yes, it is the right decision.
I have started to spot that bug only while working on a faster scan
using hint bits on replicas [1], so it is unlikely to hit it in
production at the moment.

Thanks,
Michail.

[1]: https://www.postgresql.org/message-id/CANtu0ojmkN_6P7CQWsZ%3DuEgeFnSmpCiqCxyYaHnhYpTZHj7Ubw%40mail.gmail.com



Commits

  1. Fix replica backward scan race condition.

  2. Justify nbtree page split locking in code comment.

  3. Remove unneeded "pin scan" nbtree VACUUM code.

  4. Compute XID horizon for page level index vacuum on primary.

  5. Make heap TID a tiebreaker nbtree index column.