Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5vPv-0003WX-Jn for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Apr 2018 15:42:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5vPu-0003VV-4v for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Apr 2018 15:42:42 +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.89) (envelope-from ) id 1f5vPt-0003VM-Tq for pgsql-hackers@lists.postgresql.org; Tue, 10 Apr 2018 15:42:41 +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.89) (envelope-from ) id 1f5vPq-0001Ji-Ou for pgsql-hackers@lists.postgresql.org; Tue, 10 Apr 2018 15:42:41 +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 w3AFgYQH022914; Tue, 10 Apr 2018 11:42:34 -0400 From: Tom Lane To: Alvaro Herrera cc: Andrew Gierth , David Rowley , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Support partition pruning at execution time In-reply-to: <20180410151417.zphx6l7t5j4vdgmh@alvherre.pgsql> References: <20180410151417.zphx6l7t5j4vdgmh@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 10 Apr 2018 12:14:17 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22912.1523374954.1@sss.pgh.pa.us> Date: Tue, 10 Apr 2018 11:42:34 -0400 Message-ID: <22913.1523374954@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Questions: > 1. Do we want to back-patch this to 10? I suppose (without checking) > that EXPLAIN ANALYZE is already reporting bogus numbers for parallel > index-only scans, so I think we should do that. You can't back-patch a change in struct Instrumentation; that'd be a ABI break. Maybe there are no third parties directly touching that struct, but I wouldn't bet on it. > 2. Do we want to revert Andrew's test stabilization patch? If I > understand correctly, the problem is the inverse of what was diagnosed: > "any running transaction at the time of the test could prevent pages > from being set as all-visible". That's correct, but the test doesn't > depend on pages being all-visible -- quite the contrary, it depends on > the pages NOT being all-visible (which is why the HeapFetches counts are > all non-zero). Since the pages contain very few tuples, autovacuum > should never process the tables anyway. I did not especially like the original test output, because even without the bug at hand, it seemed to me the number of heap fetches might vary depending on BLCKSZ. Given that the point of the test is just to check partition pruning, seems like IOS vs regular indexscan isn't a critical difference. I'd keep Andrew's change but fix the comment. regards, tom lane