Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZipW5-000724-T0 for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Oct 2015 20:04:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZipW5-0006Xx-AI for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Oct 2015 20:04:17 +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) (envelope-from ) id 1ZipTI-0006Sc-2p for pgsql-hackers@postgresql.org; Sun, 04 Oct 2015 20:01:24 +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) (envelope-from ) id 1ZipTF-0005QH-Fs for pgsql-hackers@postgresql.org; Sun, 04 Oct 2015 20:01:23 +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 t94K1DnM026166; Sun, 4 Oct 2015 16:01:13 -0400 From: Tom Lane To: Peter Geoghegan cc: Jim Nasby , Pg Hackers Subject: Re: Less than ideal error reporting in pg_stat_statements In-reply-to: References: <5601D354.5000703@BlueTreble.com> <15898.1442965225@sss.pgh.pa.us> <5913.1443822154@sss.pgh.pa.us> <9935.1443828452@sss.pgh.pa.us> <32385.1443976035@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Sun, 04 Oct 2015 12:41:40 -0700" Date: Sun, 04 Oct 2015 16:01:13 -0400 Message-ID: <26165.1443988873@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Peter Geoghegan writes: > I'm not clear on what you actually propose to do to "make > entry_dealloc's recomputation of mean_query_len sane", but I think you > are talking about something distinct from what I've proposed Ah, right, sorry. I meant to make its result match what gc_texts would get, by not falsely counting entries with dropped texts. That's not what you have in your patch but it seems like an easy enough fix. > I'd be quite happy if you did everything listed, and also left the > extra discrimination against sticky entries within entry_dealloc in -- > consider what happens when a huge malloc() ends up swapping with an > exclusive lock held, and consider that repeated, failed data > integration transactions are implicated in this in a big way when a > problem appears in the wild. A big part of the problem here was that > garbage collection did not run often enough. Hm. The problem I've got with this is that then mean_query_len means something significantly different after entry_dealloc than it does after gc_texts. I'd be okay with changing *both* of those functions to ignore sticky entries in the calculation, if that seems reasonable to you. > In other words, I'd be fine with *not* doing the query size filter > thing for now, since that is something that seems like an extra > defense and not core to the problem. I was kind of ambivalent about > doing that part myself, actually. Agreed on that part. 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