Re: pgsql: Avoid having vacuum set reltuples to 0 on non-empty relations in

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Gierth <rhodiumtoad(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Avoid having vacuum set reltuples to 0 on non-empty relations in
Date: 2017-03-17 13:18:55
Message-ID: 87pohgawh3.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

>>>>> "Andrew" == Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> 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.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-17 13:23:56 pgsql: pageinspect: Add test for page_header function
Previous Message Andrew Gierth 2017-03-17 12:21:05 Re: pgsql: Avoid having vacuum set reltuples to 0 on non-empty relations in