From: Andres Freund <andres@anarazel.de>
To: Kevin Grittner <kgrittn@gmail.com>
Cc: Robert Haas <robertmhaas@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: Wed, 15 Jun 2016 15:34:40 -0700
Message-ID: <20160615223440.omhksf4senwtfc6q@alap3.anarazel.de> (raw)
In-Reply-To: <CACjxUsOQCDDGmhEXb0Bh74Nfxhy9gGYnwdKvpn=VK1fR_7UH3g@mail.gmail.com>
References: <CA+TgmoYewY=tYAgqcB9vM+z1LADHa7tovPQ1axK0W7NHGPhCSQ@mail.gmail.com>
<20160615184537.GA20738@alvherre.pgsql>
<CA+TgmoY2p=BUKtFOJiJN74s2eiD5jn5ZragbUw=i-D3U1O0pgQ@mail.gmail.com>
<20160615192011.eicg7hwkndyx2cmo@alap3.anarazel.de>
<CACjxUsMT+EYP8yJmc2pSJSEW0rkVnVb04-u40ZYFh4i6vZg5Aw@mail.gmail.com>
<20160615202552.32oc3y3zzd5pukbp@alap3.anarazel.de>
<CACjxUsOQCDDGmhEXb0Bh74Nfxhy9gGYnwdKvpn=VK1fR_7UH3g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 2016-06-15 16:58:25 -0500, Kevin Grittner wrote:
> On Wed, Jun 15, 2016 at 3:25 PM, Andres Freund <andres@anarazel.de> wrote:
> > On 2016-06-15 14:24:58 -0500, Kevin Grittner wrote:
> >> On Wed, Jun 15, 2016 at 2:20 PM, Andres Freund <andres@anarazel.de> wrote:
> >>
> >> > We might fetch a toast tuple which
> >> > since have been re-purposed for a datum of a different type.
> >>
> >> How would that happen?
> >
> > Autovac vacuums toast and heap tables independently. Once a toast datum
> > isn't used anymore, the oid used can be reused (because it doesn't
> > conflict via GetNewOidWithIndex() anymore. If analyze then detoasts a
> > datum, which hasn't been removed, the contents of that toast id, might
> > actually be for something different.
>
> What prevents that from happening now, without STO?
Afaics we shouldn't ever look (i.e. detoast) at a "dead for everyone"
tuple in autovacuum (or anywhere else). There's one minor exception to
that, and that's enum datums in indexes, which is why we currently have
weird transactional requirements for them. I'm not entirely sure this
can be hit, but it's worth checking.
Andres
--
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, kgrittn@gmail.com, robertmhaas@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: <20160615223440.omhksf4senwtfc6q@alap3.anarazel.de>
References: <CA+TgmoYewY=tYAgqcB9vM+z1LADHa7tovPQ1axK0W7NHGPhCSQ@mail.gmail.com> <20160615184537.GA20738@alvherre.pgsql> <CA+TgmoY2p=BUKtFOJiJN74s2eiD5jn5ZragbUw=i-D3U1O0pgQ@mail.gmail.com> <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>
* 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