Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d61zj-0004Ea-Us for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2017 21:39:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d61zj-0006HM-Ax for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2017 21:39:35 +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 1d61yC-00023k-KR for pgsql-hackers@postgresql.org; Wed, 03 May 2017 21:38:00 +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 1d61yA-0007c6-7z for pgsql-hackers@postgresql.org; Wed, 03 May 2017 21:37:59 +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 v43LbvYs020804; Wed, 3 May 2017 17:37:57 -0400 From: Tom Lane To: Kevin Grittner cc: "pgsql-hackers@postgresql.org" Subject: Re: How huge does mvtest_huge need to be? In-reply-to: <7281.1493842951@sss.pgh.pa.us> References: <32386.1493831320@sss.pgh.pa.us> <7281.1493842951@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 03 May 2017 16:22:31 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20802.1493847477.1@sss.pgh.pa.us> Date: Wed, 03 May 2017 17:37:57 -0400 Message-ID: <20803.1493847477@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 I wrote: > Kevin Grittner writes: >> Hm. This seems like a particularly useless size. It would test a >> possibly useful corner case if it was over 10MB so that it was over >> vacuum's truncation threshold, but that would obviously be even >> slower. It doesn't seem justified. How about 500 so it at least >> goes to a second page which is then truncated to 1 page. > Yeah, that aspect occurred to me after a bit too. I'll make it so. Umm... but wait. I stuck some "select pg_relation_size()" calls into the test sequence to verify what page counts I was getting, and realized that actually the REFRESH MATERIALIZED VIEW step is leaving the matview with physical size zero. So there's nothing for VACUUM to do anyway, and it doesn't matter what size the matview had been before the DELETE and REFRESH. Maybe we could devise a test that allows VACUUM to be responsible for actually truncating some pages from a matview, but this test case ain't it. I now remember that this test case was intended to exercise the hack we'd had at the time whereby nonzero physical size signified whether the matview was populated or not. We got rid of that on the grounds that it was too fragile, in favor of adding a pg_class.relispopulated column. No released version of PG has ever had the capacity to have the type of bug this test is meant to find. At this point I'm inclined to just delete the whole test. The code that b69ec7cc9 added is long gone, and I don't think the test deserves to be memorialized either. 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