Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 17d6a8f

Browse files
committed
Improve stability of recently-added regression test case.
Commit b5febc1 added a contrib/btree_gist test case that has been observed to fail in the buildfarm as a result of background auto-analyze updating stats and changing the selected plan. Forestall that by forcibly analyzing in foreground, instead. The new plan choice is just as good for our purposes, since we really only care that an index-only plan does not get selected. Back-patch to 9.5, like the previous patch. Discussion: https://postgr.es/m/14643.1539629304@sss.pgh.pa.us
1 parent 3dfef0c commit 17d6a8f

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

contrib/btree_gist/expected/inet.out

+11-15
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,16 @@ SELECT count(*) FROM inettmp WHERE a > '89.225.196.191'::inet;
6464
386
6565
(1 row)
6666

67-
VACUUM inettmp;
67+
VACUUM ANALYZE inettmp;
6868
-- gist_inet_ops lacks a fetch function, so this should not be index-only scan
6969
EXPLAIN (COSTS OFF)
7070
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
71-
QUERY PLAN
72-
--------------------------------------------------------
71+
QUERY PLAN
72+
--------------------------------------------------
7373
Aggregate
74-
-> Bitmap Heap Scan on inettmp
75-
Recheck Cond: (a = '89.225.196.191'::inet)
76-
-> Bitmap Index Scan on inetidx
77-
Index Cond: (a = '89.225.196.191'::inet)
78-
(5 rows)
74+
-> Index Scan using inetidx on inettmp
75+
Index Cond: (a = '89.225.196.191'::inet)
76+
(3 rows)
7977

8078
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
8179
count
@@ -88,14 +86,12 @@ CREATE INDEX ON inettmp USING gist (a gist_inet_ops, a inet_ops);
8886
-- likewise here (checks for core planner bug)
8987
EXPLAIN (COSTS OFF)
9088
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
91-
QUERY PLAN
92-
--------------------------------------------------------
89+
QUERY PLAN
90+
----------------------------------------------------
9391
Aggregate
94-
-> Bitmap Heap Scan on inettmp
95-
Recheck Cond: (a = '89.225.196.191'::inet)
96-
-> Bitmap Index Scan on inettmp_a_a1_idx
97-
Index Cond: (a = '89.225.196.191'::inet)
98-
(5 rows)
92+
-> Index Scan using inettmp_a_a1_idx on inettmp
93+
Index Cond: (a = '89.225.196.191'::inet)
94+
(3 rows)
9995

10096
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
10197
count

contrib/btree_gist/sql/inet.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SELECT count(*) FROM inettmp WHERE a >= '89.225.196.191'::inet;
3030

3131
SELECT count(*) FROM inettmp WHERE a > '89.225.196.191'::inet;
3232

33-
VACUUM inettmp;
33+
VACUUM ANALYZE inettmp;
3434

3535
-- gist_inet_ops lacks a fetch function, so this should not be index-only scan
3636
EXPLAIN (COSTS OFF)

0 commit comments

Comments
 (0)