1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-04 12:42:24 +03:00

Fix unstable regression test added by commits 59b71c6fe et al.

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.
This commit is contained in:
Tom Lane 2017-11-24 00:29:20 -05:00
parent f16a0958d0
commit 292661e152
2 changed files with 9 additions and 9 deletions

View File

@ -2003,7 +2003,7 @@ CREATE AGGREGATE balk(
STYPE = int8,
"PARALLEL" = SAFE,
INITCOND = '0');
SELECT balk(1) FROM tenk1;
SELECT balk(hundred) FROM tenk1;
balk
------
@ -2037,17 +2037,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
------

View File

@ -862,7 +862,7 @@ CREATE AGGREGATE balk(
"PARALLEL" = SAFE,
INITCOND = '0');
SELECT balk(1) FROM tenk1;
SELECT balk(hundred) FROM tenk1;
ROLLBACK;
@ -896,7 +896,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;