Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0Key-0003aP-8i for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Jul 2013 00:04:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V0Kex-0004IL-Ll for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Jul 2013 00:04:27 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0Kew-0004I5-2h for pgsql-hackers@postgresql.org; Sat, 20 Jul 2013 00:04:26 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by makus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V0Ker-0006Xy-RL for pgsql-hackers@postgresql.org; Sat, 20 Jul 2013 00:04:25 +0000 Received: (qmail 428 invoked by uid 512); 20 Jul 2013 00:04:19 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 20 Jul 2013 00:04:19 -0000 Received: from unknown (HELO ?192.168.1.3?) (110.5.25.94) by sd.tpf.co.jp with SMTP; 20 Jul 2013 00:04:19 -0000 Message-ID: <51E9D3F6.4040203@tpf.co.jp> Date: Sat, 20 Jul 2013 09:04:06 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Lane CC: Andres Freund , Robert Haas , pgsql-hackers@postgresql.org, pgsql-odbc@postgresql.org Subject: Re: [ODBC] getting rid of SnapshotNow References: <51E95FF7.4000004@tpf.co.jp> <20130719160230.GA32534@alap2.anarazel.de> <25211.1374250283@sss.pgh.pa.us> In-Reply-To: <25211.1374250283@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org (2013/07/20 1:11), Tom Lane wrote: > Andres Freund 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