]> granicus.if.org Git - postgresql/commit
Fix random regression failure in test case "temp"
authorMichael Paquier <michael@paquier.xyz>
Tue, 13 Aug 2019 01:56:02 +0000 (10:56 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 13 Aug 2019 01:56:02 +0000 (10:56 +0900)
commit72f92549b64176e00dad433f8486e302eab8e9bd
treeb6e24fd5fe81158160a64b9a78d5494813a02b67
parent4f393793f7d637e4ab8e6460e7bb4cd747f01f85
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
v10.

Discussion: https://postgr.es/m/20190807132422.GC15695@paquier.xyz
Backpatch-through: 10
src/test/regress/expected/temp.out
src/test/regress/sql/temp.sql