Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6kna-0006qF-HC for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2016 20:57:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c6kna-0007ix-43 for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2016 20:57:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c6knX-0007eE-TB for pgsql-hackers@postgresql.org; Tue, 15 Nov 2016 20:57:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c6knV-0001QR-Ks for pgsql-hackers@postgresql.org; Tue, 15 Nov 2016 20:57:42 +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 uAFKvd18002758; Tue, 15 Nov 2016 15:57:39 -0500 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: Something is broken about connection startup In-reply-to: References: <16447.1478818294@sss.pgh.pa.us> <23418.1478819074@sss.pgh.pa.us> <12438.1478895332@sss.pgh.pa.us> <29845.1479136671@sss.pgh.pa.us> <30195.1479137192@sss.pgh.pa.us> <12785.1479159778@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 15 Nov 2016 11:30:33 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2756.1479243459.1@sss.pgh.pa.us> Date: Tue, 15 Nov 2016 15:57:39 -0500 Message-ID: <2757.1479243459@sss.pgh.pa.us> X-Pg-Spam-Score: -4.7 (----) 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 Mon, Nov 14, 2016 at 4:42 PM, Tom Lane wrote: >> ... I'm inclined to hold my nose and stick a call into step (1) of the >> main loop instead. > Seems like a good idea. >> Also, wherever we end up putting those calls, is it worth providing a >> variant invalidation function that only kills the catalog snapshot when >> it's the only one outstanding? (If it isn't, the transaction snapshot >> should be older, so there's no chance of advancing our xmin by killing >> it.) In principle this would save some catalog snapshot rebuilds for >> inside-a-transaction-block cases, but I'm not sure it's worth sweating >> that when we're doing client message exchange anyway. > I think that would be a fairly worthwhile thing to do. >> Lastly, I find myself disliking the separate CatalogSnapshotStale flag >> variable. The other special snapshots in snapmgr.c are managed by setting >> the pointer to NULL when it's not valid, so I wonder why CatalogSnapshot >> wasn't done that way. Since this patch is touching almost every use of >> that flag already, it wouldn't take much to switch it over. > I think I had some reason why I did it that way, but I don't think it > was anything important, so I don't object to you revising it. I've pushed a patch incorporating those changes. I can no longer reproduce piculet's failure on branches back to 9.4. Still need to look at the secondary issues I mentioned upthread. 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