Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zj82O-0000FP-B6 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Oct 2015 15:50:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zj82M-0003Jq-P9 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Oct 2015 15:50:50 +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) (envelope-from ) id 1Zj82M-0003Jj-6U for pgsql-hackers@postgresql.org; Mon, 05 Oct 2015 15:50:50 +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) (envelope-from ) id 1Zj82A-00039R-Nz for pgsql-hackers@postgresql.org; Mon, 05 Oct 2015 15:50:49 +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 t95FoUsS031123; Mon, 5 Oct 2015 11:50:30 -0400 From: Tom Lane To: Alvaro Herrera cc: Andrew Dunstan , Peter Geoghegan , Jim Nasby , Pg Hackers Subject: Re: Less than ideal error reporting in pg_stat_statements In-reply-to: <20151005154032.GF8531@alvherre.pgsql> References: <5601D354.5000703@BlueTreble.com> <15898.1442965225@sss.pgh.pa.us> <56030E72.9070104@BlueTreble.com> <30112.1444058156@sss.pgh.pa.us> <561296EC.805@dunslane.net> <20151005154032.GF8531@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 05 Oct 2015 12:40:32 -0300" Date: Mon, 05 Oct 2015 11:50:30 -0400 Message-ID: <31122.1444060230@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 Alvaro Herrera writes: > Andrew Dunstan wrote: >> FWIW, (a) and (b) but not (c) is probably the right description for my >> client who has been seeing problems here. > I think the fact that long IN lists are fingerprinted differently > according to the number of elements in the list makes the scenario > rather very likely -- not particularly narrow. That's certainly something worth looking at, but I think it's probably more complicated than that. If you just write "WHERE x IN (1,2,3,4)", that gets folded to a ScalarArrayOp with a single array constant, which the existing code would deal with just fine. We need to identify situations where that's not the case but yet we shouldn't distinguish. In any case, that's just a marginal tweak for one class of query. I suspect the right fix for the core problem is the one Peter mentioned in passing earlier, namely make it possible to do garbage collection without having to slurp the entire file into memory at once. It'd be slower, without a doubt, but we could continue to use the existing code path unless the file gets really large. 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