pgsql: Fix random regression failure in test case "temp"

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

pgsql: Fix random regression failure in test case "temp"

Michael Paquier-2
Fix random regression failure in test case "temp"

This test case could fail because of an incorrect result ordering when
looking up at pg_class entries.  This commit adds an ORDER BY to the
culprit query.  The cause of the failure was likely caused by a plan
switch.  By default, the planner would likely choose an index-only scan
or an index scan, but even a small change in the startup cost could have
caused a bitmap heap scan to be chosen, causing the failure.

While on it, switch some filtering quals to a regular expression as per
an idea of Tom Lane.  As previously shaped, the quals would have
selected any relations whose name begins with "temp".  And that could
cause failures if another test running in parallel began to use similar
relation names.

Per report from buildfarm member anole, though the failure was very
rare.  This test has been introduced by 319a810, so backpatch down to

Backpatch-through: 10



Modified Files
src/test/regress/expected/temp.out | 9 +++++----
src/test/regress/sql/temp.sql      | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)