Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0D8d-0005HR-Jf for pgsql-odbc@arkaria.postgresql.org; Fri, 19 Jul 2013 16:02:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V0D8d-0004MM-3i for pgsql-odbc@arkaria.postgresql.org; Fri, 19 Jul 2013 16:02:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0D8c-0004MD-Ke; Fri, 19 Jul 2013 16:02:34 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0D8Z-0000PI-I6; Fri, 19 Jul 2013 16:02:34 +0000 Received: from intern.anarazel.de (p5DDC450B.dip0.t-ipconnect.de [93.220.69.11]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id C45014F0001; Fri, 19 Jul 2013 18:02:30 +0200 (CEST) Date: Fri, 19 Jul 2013 18:02:30 +0200 From: Andres Freund To: Hiroshi Inoue Cc: Robert Haas , pgsql-hackers@postgresql.org, pgsql-odbc@postgresql.org Subject: Re: [HACKERS] getting rid of SnapshotNow Message-ID: <20130719160230.GA32534@alap2.anarazel.de> References: <51E95FF7.4000004@tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51E95FF7.4000004@tpf.co.jp> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 2013-07-20 00:49:11 +0900, Hiroshi Inoue wrote: > (2013/07/18 21:46), Robert Haas wrote: > >There seems to be a consensus that we should try to get rid of > >SnapshotNow entirely now that we have MVCC catalog scans, so I'm > >attaching two patches that together come close to achieving that goal: > > ... > > >With that done, the only remaining uses of SnapshotNow in our code > >base will be in currtid_byreloid() and currtid_byrelname(). So far no > >one on this list has been able to understand clearly what the purpose > >of those functions is, so I'm copying this email to pgsql-odbc in case > >someone there can provide more insight. If I were a betting man, I'd > >bet that they are used in contexts where the difference between > >SnapshotNow and SnapshotSelf wouldn't matter there, either. > > 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... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc