Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEKcY-0001w5-AF for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2016 18:37:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEKcX-0002Sa-Py for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2016 18:37:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEKb8-0000Sa-4H for pgsql-hackers@postgresql.org; Tue, 06 Dec 2016 18:36:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEKb5-0000wA-EZ for pgsql-hackers@postgresql.org; Tue, 06 Dec 2016 18:36:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uB6Ia9MS022873; Tue, 6 Dec 2016 13:36:09 -0500 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Account for catalog snapshot in PGXACT->xmin updates. In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Tue, 06 Dec 2016 09:46:46 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22871.1481049369.1@sss.pgh.pa.us> Date: Tue, 06 Dec 2016 13:36:09 -0500 Message-ID: <22872.1481049369@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) 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 Robert Haas writes: > On Tue, Nov 15, 2016 at 3:55 PM, Tom Lane wrote: >> Account for catalog snapshot in PGXACT->xmin updates. > It seems to me that this makes it possible for > ThereAreNoPriorRegisteredSnapshots() to fail spuriously. The only > core code that calls that function is in copy.c, and apparently we > never reach that point with the catalog snapshot set. But that seems > fragile. Hm. If there were some documentation explaining what ThereAreNoPriorRegisteredSnapshots is supposed to do, it would be possible for us to have a considered argument as to whether this patch broke it or not. As things stand, it is not obvious whether it ought to be ignoring the catalog snapshot or not; one could construct plausible arguments either way. It's not even very obvious why both 0 and 1 registered snapshots should be considered okay; that looks a lot more like a hack than reasoned-out behavior. So I'm satisfied if COPY FREEZE does what it's supposed to do, which it still appears to do. IOW, I'm not interested in touching this unless someone first provides adequate documentation for the pre-existing kluge here. There is no API spec at all on the function itself, and the comment in front of the one call site is too muddle-headed to provide any insight. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers