pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Date: Wed, 15 Jun 2016 13:25:52 -0700
Message-ID: <20160615202552.32oc3y3zzd5pukbp@alap3.anarazel.de> (raw)
In-Reply-To: <CACjxUsMT+EYP8yJmc2pSJSEW0rkVnVb04-u40ZYFh4i6vZg5Aw@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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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.

That's not super likely to happen (given how rare oid wraparounds
usually are), but it appears to be possible.

Regards,

Andres


-- 
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 (195+ messages)  latest in thread

Message-ID: <20160615202552.32oc3y3zzd5pukbp@alap3.anarazel.de>
Permalink:  ../20160615202552.32oc3y3zzd5pukbp@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160615202552.32oc3y3zzd5pukbp@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, 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: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
  In-Reply-To: <20160615202552.32oc3y3zzd5pukbp@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>

* 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