Re: Old row version in hot chain become visible after a freeze
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: "Wood, Dan" <hexpert@amazon.com>
Cc: "pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>
Date: 2017-09-01T00:07:39Z
Lists: pgsql-bugs
On Thu, Aug 31, 2017 at 4:20 PM, Wood, Dan <hexpert@amazon.com> wrote:
> I was aware of the other one and, in fact, reverted the change just to make sure it wasn’t Involved. A strange coincidence indeed.
FWIW, the enhanced amcheck does actually detect this:
postgres=# select bt_index_check('t_pkey', true);
ERROR: XX000: failed to find parent tuple for heap-only tuple at
(0,3) in table "t"
LOCATION: IndexBuildHeapRangeScan, index.c:2597
The good news is that this happens in a codepath that is also used by REINDEX:
postgres=# reindex index t_pkey ;
ERROR: XX000: failed to find parent tuple for heap-only tuple at
(0,3) in table "t"
LOCATION: IndexBuildHeapRangeScan, index.c:2597
Perhaps the lack of field reports of this error suggests that it's
fairly rare. Very hard to be sure about that, though.
--
Peter Geoghegan
Commits
-
Fix freezing of a dead HOT-updated tuple
- fb6de78a291b 9.5.10 landed
- d149aa762c05 9.3.20 landed
- 46c35116ae1a 10.0 landed
- 3a135bdb1b5e 9.6.6 landed
- 232c7cbcbbc6 9.4.15 landed
- 20b655224249 11.0 landed
-
Fix potential data corruption during freeze
- 31b8db8e6c1f 10.0 cited
-
Clarify the contract of partition_rbound_cmp().
- f1dae097f294 10.0 cited