]> granicus.if.org Git - postgresql/commitdiff
Fix unstable regression test added by commits 59b71c6fe et al.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Nov 2017 05:29:20 +0000 (00:29 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Nov 2017 05:29:20 +0000 (00:29 -0500)
The query didn't really have a preferred index, leading to platform-
specific choices of which one to use.  Adjust it to make sure tenk1_hundred
is always chosen.

Per buildfarm.

src/test/regress/expected/aggregates.out
src/test/regress/sql/aggregates.sql

index f8c42f911b5d8b2a4fd3c140011fd7f14c727aad..dbce7d3e8b7903d8775ae6a62930dfdc1309e68e 100644 (file)
@@ -2013,7 +2013,7 @@ CREATE AGGREGATE balk(
     STYPE = int8,
     "PARALLEL" = SAFE,
     INITCOND = '0');
-SELECT balk(1) FROM tenk1;
+SELECT balk(hundred) FROM tenk1;
  balk 
 ------
      
@@ -2047,17 +2047,17 @@ CREATE AGGREGATE balk(
 ALTER TABLE tenk1 set (parallel_workers = 4);
 SET LOCAL parallel_setup_cost=0;
 SET LOCAL max_parallel_workers_per_gather=4;
-EXPLAIN (COSTS OFF) SELECT balk(1) FROM tenk1;
-                                   QUERY PLAN                                   
---------------------------------------------------------------------------------
+EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1;
+                               QUERY PLAN                                
+-------------------------------------------------------------------------
  Finalize Aggregate
    ->  Gather
          Workers Planned: 4
          ->  Partial Aggregate
-               ->  Parallel Index Only Scan using tenk1_thous_tenthous on tenk1
+               ->  Parallel Index Only Scan using tenk1_hundred on tenk1
 (5 rows)
 
-SELECT balk(1) FROM tenk1;
+SELECT balk(hundred) FROM tenk1;
  balk 
 ------
      
index 1bfc5e649c30bfa17b756a907b6fde58d89641e4..6c9b86a616609afbe6266e03dead56d2ee175a99 100644 (file)
@@ -868,7 +868,7 @@ CREATE AGGREGATE balk(
     "PARALLEL" = SAFE,
     INITCOND = '0');
 
-SELECT balk(1) FROM tenk1;
+SELECT balk(hundred) FROM tenk1;
 
 ROLLBACK;
 
@@ -902,7 +902,7 @@ ALTER TABLE tenk1 set (parallel_workers = 4);
 SET LOCAL parallel_setup_cost=0;
 SET LOCAL max_parallel_workers_per_gather=4;
 
-EXPLAIN (COSTS OFF) SELECT balk(1) FROM tenk1;
-SELECT balk(1) FROM tenk1;
+EXPLAIN (COSTS OFF) SELECT balk(hundred) FROM tenk1;
+SELECT balk(hundred) FROM tenk1;
 
 ROLLBACK;