pgsql: Avoid unexpected slowdown in vacuum regression test. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Avoid unexpected slowdown in vacuum regression test.
Date
Msg-id E1YAlNH-0001Qw-Ay@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid unexpected slowdown in vacuum regression test.

I noticed the "vacuum" regression test taking really significantly longer
than it used to on a slow machine.  Investigation pointed the finger at
commit e415b469b33ba328765e39fd62edcd28f30d9c3c, which added creation of
an index using an extremely expensive index function.  That function was
evidently meant to be applied only twice ... but the test re-used an
existing test table, which up till a couple lines before that had had over
two thousand rows.  Depending on timing of the concurrent regression tests,
the intervening VACUUMs might have been unable to remove those
recently-dead rows, and then the index build would need to create index
entries for them too, leading to the wrap_do_analyze() function being
executed 2000+ times not twice.  Avoid this by using a different table
that is guaranteed to have only the intended two rows in it.

Back-patch to 9.0, like the commit that created the problem.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e9f9ebfe65014ff701b3c0712d1036afea161d1f

Modified Files
--------------
src/test/regress/expected/vacuum.out |    8 ++++----
src/test/regress/sql/vacuum.sql      |    6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Tweak heapam's rmgr desc output slightly
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid unexpected slowdown in vacuum regression test.