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: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Date: Thu, 9 Nov 2017 16:17:18 -0800
Message-ID: <20171110001718.rpgx4lf6xxi4ge3l@alap3.anarazel.de> (raw)
In-Reply-To: <CAH2-WzkqA3CwdVBn6me8+_sSzKgEcMRMaLGbkPp_DXScxgXcKw@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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2017-11-09 16:02:17 -0800, Peter Geoghegan wrote:
> > What I'm currently wondering about is how much we need to harden
> > postgres against such existing corruption. If e.g. the hot chains are
> > broken somebody might have reindexed thinking the problem is fixed - but
> > if they then later vacuum everything goes to shit again, with dead rows
> > reappearing.
> 
> I don't follow you here. Why would REINDEXing make the rows that
> should be dead disappear again, even for a short period of time?

It's not the REINDEX that makes them reappear. It's the second
vacuum. The reindex part was about $user trying to fix the problem...
As you need two vacuums with appropriate cutoffs to hit the "rows
revive" problem, that'll often in practice not happen immediately.


> 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.

Greetings,

Andres Freund


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



view thread (129+ messages)  latest in thread

Message-ID: <20171110001718.rpgx4lf6xxi4ge3l@alap3.anarazel.de>
Permalink:  ../20171110001718.rpgx4lf6xxi4ge3l@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20171110001718.rpgx4lf6xxi4ge3l@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: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
  In-Reply-To: <20171110001718.rpgx4lf6xxi4ge3l@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>

* 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