From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kevin Grittner <kgrittn@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ants Aasma <ants.aasma@eesti.ee>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Kevin Grittner <kgrittn@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: pgsql-committers@postgresql.org <pgsql-committers@postgresql.org>
Subject: Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Date: Thu, 16 Jun 2016 09:14:26 -0700
Message-ID: <20160616161426.bapgkbh762ktzyhk@alap3.anarazel.de> (raw)
In-Reply-To: <CA+TgmobTQ=71y-c5P9VjWxOREVYWvkKd2ajQ5-J5HRkebdZ8DQ@mail.gmail.com>
References: <20160615192011.eicg7hwkndyx2cmo@alap3.anarazel.de>
<CACjxUsMT+EYP8yJmc2pSJSEW0rkVnVb04-u40ZYFh4i6vZg5Aw@mail.gmail.com>
<20160615202552.32oc3y3zzd5pukbp@alap3.anarazel.de>
<CACjxUsOQCDDGmhEXb0Bh74Nfxhy9gGYnwdKvpn=VK1fR_7UH3g@mail.gmail.com>
<20160615223440.omhksf4senwtfc6q@alap3.anarazel.de>
<CACjxUsNN+Y5WyASrMS+=vL-Bk3QX-vHuYpM2jpS0K2iUp_qkig@mail.gmail.com>
<20160616015730.rtozaq5mmlhci6xy@alap3.anarazel.de>
<CACjxUsN6iCBrrNw7H5BJ7amJRx4AiUzjnpW=35FSuyZ1+Pgq1A@mail.gmail.com>
<20160616153745.upxilwj3spbi43dj@alap3.anarazel.de>
<CA+TgmobTQ=71y-c5P9VjWxOREVYWvkKd2ajQ5-J5HRkebdZ8DQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 2016-06-16 12:02:39 -0400, Robert Haas wrote:
> On Thu, Jun 16, 2016 at 11:37 AM, Andres Freund <andres@anarazel.de> wrote:
> >> If that were really true, why would we not have the problem in
> >> current production versions that the toast table could be vacuumed
> >> before the heap, leading to exactly the issue you are talking
> >> about?
> >
> > The issue isn't there without the feature, because we (should) never
> > access a tuple/detoast a column when it's invisible enough for the
> > corresponding toast tuple to be vacuumed away. But with
> > old_snapshot_timeout that's obviously (intentionally) not the case
> > anymore. Due to old_snapshot_threshold we'll prune tuples which,
> > without it, would still be considered HEAPTUPLE_RECENTLY_DEAD.
>
> Is there really an assumption that the heap and the TOAST heap are
> only ever vacuumed with the same OldestXmin value? Because that seems
> like it would be massively flaky.
There's not. They can be vacuumed days apart. But if we vacuum the toast
table with an OldestXmin, and encounter a dead toast tuple, by the
definition of OldestXmin (excluding STO), there cannot be a session
reading the referencing tuple anymore - so that shouldn't matter.
IIRC we actually reverted a patch that caused significant problems
around this. I think there's a small race condition around
ProcessStandbyHSFeedbackMessage(), and you can restart with a different
vacuum_defer_cleanup_age (we should just remove that), but other than
that we shouldn't run into any issues without STO.
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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, robertmhaas@gmail.com, kgrittn@gmail.com, alvherre@2ndquadrant.com, ants.aasma@eesti.ee, amit.kapila16@gmail.com, noah@leadboat.com, kgrittn@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
In-Reply-To: <20160616161426.bapgkbh762ktzyhk@alap3.anarazel.de>
References: <20160615192011.eicg7hwkndyx2cmo@alap3.anarazel.de> <CACjxUsMT+EYP8yJmc2pSJSEW0rkVnVb04-u40ZYFh4i6vZg5Aw@mail.gmail.com> <20160615202552.32oc3y3zzd5pukbp@alap3.anarazel.de> <CACjxUsOQCDDGmhEXb0Bh74Nfxhy9gGYnwdKvpn=VK1fR_7UH3g@mail.gmail.com> <20160615223440.omhksf4senwtfc6q@alap3.anarazel.de> <CACjxUsNN+Y5WyASrMS+=vL-Bk3QX-vHuYpM2jpS0K2iUp_qkig@mail.gmail.com> <20160616015730.rtozaq5mmlhci6xy@alap3.anarazel.de> <CACjxUsN6iCBrrNw7H5BJ7amJRx4AiUzjnpW=35FSuyZ1+Pgq1A@mail.gmail.com> <20160616153745.upxilwj3spbi43dj@alap3.anarazel.de> <CA+TgmobTQ=71y-c5P9VjWxOREVYWvkKd2ajQ5-J5HRkebdZ8DQ@mail.gmail.com> <20160616161426.bapgkbh762ktzyhk@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