pgsql: Fix use of wrong index in ComputeXidHorizons().

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix use of wrong index in ComputeXidHorizons().
Date: 2020-08-16 21:26:09
Message-ID: E1k7QAL-00024z-HV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix use of wrong index in ComputeXidHorizons().

This bug, recently introduced in 941697c3c1a, at least lead to vacuum
failing because it found tuples inserted by a running transaction, but
below the freeze limit. The freeze limit in turn is directly affected
by the aforementioned bug.

Thanks to Tom Lane figuring how to make the bug reproducible.

We should add a few more assertions to make sure this type of bug
isn't as hard to notice, but it's not yet clear how to best do so.

Co-Diagnosed-By: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Author: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/1013484.1597609043@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f6661d3df228dbbf50efb04f2b760774a6f2bfff

Modified Files
--------------
src/backend/storage/ipc/procarray.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-08-17 01:28:23 pgsql: doc: Fix description about bgwriter and checkpoint in HA section
Previous Message Andres Freund 2020-08-16 19:58:27 pgsql: Make vacuum a bit more verbose to debug BF failure.