From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Attempt to fix unstable regression tests
Date: Sun, 29 Mar 2020 06:36:46 +0000
Message-ID: <E1jIRYs-0006ns-OK@gemulon.postgresql.org> (raw)
Attempt to fix unstable regression tests
b07642dbc added code to trigger autovacuums based on the number of
inserts into a table. This seems to have caused some regression test
results to destabilize. I suspect this is due to autovacuum triggering a
vacuum sometime after the test's ANALYZE run and perhaps reltuples is
ending up being set to a slightly different value as a result.
Attempt to resolve this by running a VACUUM ANALYZE on the affected table
instead of just ANALYZE. pg_class.reltuples will still get set to whatever
ANALYZE chooses but we should no longer get the proceeding autovacuum
overriding that.
The overhead this adds to each test's runtime seems small enough not to
worry about. I measure 3-4% on stats_ext and can't measure any change in
partition_aggregate.
I'm unable to recreate the issue locally, so this is a bit of a blind
fix.
Discussion: https://postgr.es/m/CAApHDvpWmpqYrKwwDQyeDq8dAyK7GMNaxDhrG69CkSuXoEg%2BVg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2dc16efedc767aec38368d215eb7695b87a054b5
Modified Files
--------------
src/test/regress/expected/partition_aggregate.out | 2 +-
src/test/regress/expected/stats_ext.out | 12 ++++++------
src/test/regress/sql/partition_aggregate.sql | 2 +-
src/test/regress/sql/stats_ext.sql | 13 ++++++-------
4 files changed, 14 insertions(+), 15 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: drowley@postgresql.org
Subject: Re: pgsql: Attempt to fix unstable regression tests
In-Reply-To: <E1jIRYs-0006ns-OK@gemulon.postgresql.org>
References: <E1jIRYs-0006ns-OK@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox