pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Wood, Dan <hexpert@amazon.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Cc: Wong, Yi Wen <yiwong@amazon.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] pgsql: Fix freezing of a dead HOT-updated tuple
Date: Thu, 9 Nov 2017 16:53:09 -0800
Message-ID: <20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de> (raw)
In-Reply-To: <CAH2-WzkXq0iNHVr8uLntaHk080u=gu40jg8rihFsRKUTLST8vQ@mail.gmail.com>
References: <20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de>
	<20171102124947.hshl7znx6ixy62pf@alvherre.pgsql>
	<20171102130551.i2w33sqdw3bdvetn@alap3.anarazel.de>
	<20171103145330.5ycjoje5s6lfwxps@alap3.anarazel.de>
	<20171103193659.GA3404@marmot>
	<20171104131500.w7enyo7olxk7ygca@alap3.anarazel.de>
	<20171109222431.qwj6dtl5chumc6lt@alap3.anarazel.de>
	<CAH2-WzkqA3CwdVBn6me8+_sSzKgEcMRMaLGbkPp_DXScxgXcKw@mail.gmail.com>
	<20171110001718.rpgx4lf6xxi4ge3l@alap3.anarazel.de>
	<CAH2-WzkXq0iNHVr8uLntaHk080u=gu40jg8rihFsRKUTLST8vQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 2017-11-09 16:45:07 -0800, Peter Geoghegan wrote:
> On Thu, Nov 9, 2017 at 4:17 PM, Andres Freund <andres@anarazel.de> wrote:
> >> Actually, on second thought, I take that back -- I don't think that
> >> REINDEXing will even finish once a HOT chain is broken by the bug.
> >> IndexBuildHeapScan() actually does quite a good job of making sure
> >> that HOT chains are sane, which is how the enhanced amcheck notices
> >> the bug here in practice.
> >
> > I think that's too optimistic.
> 
> Why? Because the "find the TID of the root" logic in
> IndexBuildHeapScan()/heap_get_root_tuples() won't reliably find the
> actual root (it might be some other HOT chain root following TID
> recycling by VACUUM)?

Primarily because it's not an anti-corruption tool. I'd be surprised if
there weren't ways to corrupt the page using these corruptions that
aren't detected by it.  But even if it were, I don't think there's
enough information to do so in the general case.  You very well can end
up with pages where subsequent hot pruning has removed a good bit of the
direct evidence of this bug.

But I'm not really sure why the error detection capabilities of matter
much for the principal point I raised, which is how much work we need to
do to not further worsen the corruption.

Greetings,

Andres Freund


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (129+ messages)  latest in thread

Message-ID: <20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de>
Permalink:  ../20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pg@bowt.ie, alvherre@alvh.no-ip.org, hexpert@amazon.com, yiwong@amazon.com, michael.paquier@gmail.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] pgsql: Fix freezing of a dead HOT-updated tuple
  In-Reply-To: <20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de>
  References: <20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de> <20171102124947.hshl7znx6ixy62pf@alvherre.pgsql> <20171102130551.i2w33sqdw3bdvetn@alap3.anarazel.de> <20171103145330.5ycjoje5s6lfwxps@alap3.anarazel.de> <20171103193659.GA3404@marmot> <20171104131500.w7enyo7olxk7ygca@alap3.anarazel.de> <20171109222431.qwj6dtl5chumc6lt@alap3.anarazel.de> <CAH2-WzkqA3CwdVBn6me8+_sSzKgEcMRMaLGbkPp_DXScxgXcKw@mail.gmail.com> <20171110001718.rpgx4lf6xxi4ge3l@alap3.anarazel.de> <CAH2-WzkXq0iNHVr8uLntaHk080u=gu40jg8rihFsRKUTLST8vQ@mail.gmail.com> <20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox