Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cormZ-0004TG-3S for pgsql-committers@arkaria.postgresql.org; Fri, 17 Mar 2017 13:19:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cormY-00068D-5C for pgsql-committers@arkaria.postgresql.org; Fri, 17 Mar 2017 13:19:02 +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_2) (envelope-from ) id 1cormX-00064G-QO for pgsql-committers@postgresql.org; Fri, 17 Mar 2017 13:19:01 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cormU-0008NY-Fr; Fri, 17 Mar 2017 13:19:01 +0000 Received: from [192.168.127.1] (port=24612 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1cormS-000JLb-K8; Fri, 17 Mar 2017 13:18:56 +0000 Received: from [127.0.0.1] (port=50319 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1cormR-0002Ac-TR; Fri, 17 Mar 2017 13:18:56 +0000 From: Andrew Gierth To: Tom Lane Cc: Andrew Gierth , pgsql-committers@postgresql.org Subject: Re: pgsql: Avoid having vacuum set reltuples to 0 on non-empty relations in In-Reply-To: <87tw6sayrv.fsf@news-spur.riddles.org.uk> (Andrew Gierth's message of "Fri, 17 Mar 2017 12:21:05 +0000") Message-ID: <87pohgawh3.fsf@news-spur.riddles.org.uk> References: <7981.1489721826@sss.pgh.pa.us> <87tw6sayrv.fsf@news-spur.riddles.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Fri, 17 Mar 2017 13:18:55 +0000 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org >>>>> "Andrew" == Andrew Gierth writes: Tom> I have not looked very closely, but I'm suspicious that the test Tom> case depends on no autovacuum transactions running concurrently Tom> with it. Disabling autovac on the table itself is not enough to Tom> control whether global xmin is being held back by some other Tom> autovac transaction somewhere. Andrew> Aren't vacuum transactions ignored for that? Andrew> vacuum_set_xid_limits is certainly passing ignoreVacuum=true to Andrew> GetOldestXmin. Answering my own question: vacuum transactions are ignored but analyze transactions aren't, and autovacuum will happily kick off an autoanalyze of pg_attribute during the test. Simplest fix seems to just be to remove the delete statement; I've verified that the problem can be reproduced without it, and that should make the result independent of OldestXmin. I'll commit that shortly unless I hear to the contrary. -- Andrew. -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers