pgsql: Attempt to fix unstable regression tests

Поиск
Список
Период
Сортировка
От David Rowley
Тема pgsql: Attempt to fix unstable regression tests
Дата
Msg-id E1jIRYs-0006ns-OK@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Make deduplication use number of key attributes.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Update SQL features