Re: snapshot too old issues, first around wraparound and then more.

Kevin Grittner <kgrittn@gmail.com>

From: Kevin Grittner <kgrittn@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Geoghegan <pg@bowt.ie>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-04-02T16:05:14Z
Lists: pgsql-hackers
On Wed, Apr 1, 2020 at 6:59 PM Andres Freund <andres@anarazel.de> wrote:

> index fetches will never even try to
> detect that tuples it needs actually have already been pruned away.
>

I looked at this flavor of problem today and from what I saw:

(1) This has been a problem all the way back to 9.6.0.
(2) The behavior is correct if the index creation is skipped or if
enable_indexscan is turned off in the transaction, confirming Andres'
analysis.
(3) Pruning seems to happen as intended; the bug found by Peter seems to be
entirely about failing to TestForOldSnapshot() where needed.

-- 
Kevin Grittner
VMware vCenter Server
https://www.vmware.com/

Commits

  1. Remove the "snapshot too old" feature.

  2. Improve timeout.c's handling of repeated timeout set/cancel.

  3. Fix two bugs in MaintainOldSnapshotTimeMapping.