pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] getting rid of SnapshotNow
Date: Sat, 20 Jul 2013 09:04:06 +0900
Message-ID: <51E9D3F6.4040203@tpf.co.jp> (raw)
In-Reply-To: <25211.1374250283@sss.pgh.pa.us>
References: <CA+TgmoaLeu7wKtfPA0v=iQNMKOJZqg4TZf1Gyxn=7mbwa=Mxag@mail.gmail.com>
	<51E95FF7.4000004@tpf.co.jp>
	<20130719160230.GA32534@alap2.anarazel.de>
	<25211.1374250283@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

(2013/07/20 1:11), Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
>> On 2013-07-20 00:49:11 +0900, Hiroshi Inoue wrote:
>>> Using SnapshotSelf instead of SnapshotNow for currtid_ () wouldn't
>>> matter.
> 
>> I think it actually might. You could get into dicey situations if you
>> use currtid_ in a query performing updates or inserts because it would
>> see the to-be-inserted tuple...
> 
> I'm pretty sure Hiroshi-san was only opining about whether it would
> matter for ODBC's usage.  IIUC, ODBC is using this function to re-fetch
> rows that it inserted, updated, or at least selected-for-update in a
> previous command of the current transaction, so actually any snapshot
> would do fine.
> 
> In any case, since I moved the goalposts by suggesting that SnapshotSelf
> is just as dangerous as SnapshotNow, what we need to know is whether
> it'd be all right to change this code to use a fresh MVCC snapshot;
> and if not, why not.  It's pretty hard to see a reason why client-side
> code would want to make use of the results of a non-MVCC snapshot.

OK I agree to replace SnapshotNow for currtid_xx() by a MVCC-snapshot.

regards,
Hiroshi Inoue



-- 
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: <51E9D3F6.4040203@tpf.co.jp>
Permalink:  ../51E9D3F6.4040203@tpf.co.jp/
Also on:    postgresql.org/message-id/51E9D3F6.4040203@tpf.co.jp

 · 

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: inoue@tpf.co.jp, tgl@sss.pgh.pa.us, andres@2ndquadrant.com, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [ODBC] getting rid of SnapshotNow
  In-Reply-To: <51E9D3F6.4040203@tpf.co.jp>
  References: <CA+TgmoaLeu7wKtfPA0v=iQNMKOJZqg4TZf1Gyxn=7mbwa=Mxag@mail.gmail.com> <51E95FF7.4000004@tpf.co.jp> <20130719160230.GA32534@alap2.anarazel.de> <25211.1374250283@sss.pgh.pa.us> <51E9D3F6.4040203@tpf.co.jp>

* 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