pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: getting rid of SnapshotNow
Date: Fri, 26 Jul 2013 16:16:49 +0200
Message-ID: <20130726141649.GA11678@alap2.anarazel.de> (raw)
In-Reply-To: <CA+TgmoZfnK9zgK2YfrCLYaR0izo5qQb6C5fr1GP7QfPPNhZznA@mail.gmail.com>
References: <2812.1374596914@sss.pgh.pa.us>
	<CA+TgmobKTMoRzaJ5iAUiHhta-qvi9eYgqC_fvs4m7JznFfhh5g@mail.gmail.com>
	<4668.1374603872@sss.pgh.pa.us>
	<CA+TgmoZEw3U2sNY7Ry5mO6wMxLmqaxyjxdiYhMSAA2W-UkTH8g@mail.gmail.com>
	<5175.1374605629@sss.pgh.pa.us>
	<CA+TgmoYrnryX2NHrGMXcz-casMBh-Jdnb3nTjLMHFtSwH1Sq7w@mail.gmail.com>
	<13646.1374842978@sss.pgh.pa.us>
	<CA+TgmobJ+vGoLdc00_4K0aWMpVgW0n2zd1SWG73MdkGApV_BgA@mail.gmail.com>
	<14297.1374844687@sss.pgh.pa.us>
	<CA+TgmoZfnK9zgK2YfrCLYaR0izo5qQb6C5fr1GP7QfPPNhZznA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2013-07-26 09:50:32 -0400, Robert Haas wrote:
> sepgsql is using SnapshotSelf to find the old version of a tuple that
> was updated by the core code just before.  That should be safe in the
> sense that there can't be a currently-committing transaction somewhere
> else that's updated that tuple, if we know that our own uncommitted
> transaction has done a transactional update.  There was a recent
> thread discussing whether another API might be better, and I'd be
> prepared to concede that it might be.  But I don't think it's
> drop-dead broken.

It's safe for the tuples updated in that transaction, but it's not safe
to look at anything else if you expect results without the SnapshotNow
problems. E.g. looking at a newly created attribute is fine, but
iterating over all attributes not necessarily.

I am more concerned about the care needed when placing
CommandCounterIncrement()'s somewhere though. It seems more than likely
that this will get repeatedly broken, even if it's not atm (which I
doubt). E.g. inheritance handling seems to be rather wonky WRT this.

> Not that I really object if someone wants to have a go at getting rid
> of SnapshotSelf, but I think it'd be worth articulating what we hope
> to accomplish by so doing.

Agreed. From the internal usages there doesn't seem to be too much
pressure.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Message-ID: <20130726141649.GA11678@alap2.anarazel.de>
Permalink:  ../20130726141649.GA11678@alap2.anarazel.de/
Also on:    postgresql.org/message-id/20130726141649.GA11678@alap2.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-odbc@postgresql.org
  Cc: andres@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: getting rid of SnapshotNow
  In-Reply-To: <20130726141649.GA11678@alap2.anarazel.de>
  References: <2812.1374596914@sss.pgh.pa.us> <CA+TgmobKTMoRzaJ5iAUiHhta-qvi9eYgqC_fvs4m7JznFfhh5g@mail.gmail.com> <4668.1374603872@sss.pgh.pa.us> <CA+TgmoZEw3U2sNY7Ry5mO6wMxLmqaxyjxdiYhMSAA2W-UkTH8g@mail.gmail.com> <5175.1374605629@sss.pgh.pa.us> <CA+TgmoYrnryX2NHrGMXcz-casMBh-Jdnb3nTjLMHFtSwH1Sq7w@mail.gmail.com> <13646.1374842978@sss.pgh.pa.us> <CA+TgmobJ+vGoLdc00_4K0aWMpVgW0n2zd1SWG73MdkGApV_BgA@mail.gmail.com> <14297.1374844687@sss.pgh.pa.us> <CA+TgmoZfnK9zgK2YfrCLYaR0izo5qQb6C5fr1GP7QfPPNhZznA@mail.gmail.com> <20130726141649.GA11678@alap2.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