Commit d4d48a5e authored by Tom Lane's avatar Tom Lane

Tweak new regression test case for better portability.

Buildfarm says we get different plans on 32-bit and 64-bit platforms,
probably because of MAXALIGN-related differences in memory-consumption
calculations.  Add some dummy WHERE clauses so that the planner estimates
different sizes for the three generate_series() relations; that should
stabilize the choice of join order.
parent 4c8ab1b9
...@@ -70,6 +70,7 @@ SELECT DISTINCT (i || '/' || j)::pg_lsn f ...@@ -70,6 +70,7 @@ SELECT DISTINCT (i || '/' || j)::pg_lsn f
FROM generate_series(1, 10) i, FROM generate_series(1, 10) i,
generate_series(1, 10) j, generate_series(1, 10) j,
generate_series(1, 5) k generate_series(1, 5) k
WHERE i <= 10 AND j > 0 AND j <= 10
ORDER BY f; ORDER BY f;
QUERY PLAN QUERY PLAN
-------------------------------------------------------------------------- --------------------------------------------------------------------------
...@@ -81,14 +82,17 @@ SELECT DISTINCT (i || '/' || j)::pg_lsn f ...@@ -81,14 +82,17 @@ SELECT DISTINCT (i || '/' || j)::pg_lsn f
-> Function Scan on generate_series k -> Function Scan on generate_series k
-> Materialize -> Materialize
-> Nested Loop -> Nested Loop
-> Function Scan on generate_series i
-> Function Scan on generate_series j -> Function Scan on generate_series j
(10 rows) Filter: ((j > 0) AND (j <= 10))
-> Function Scan on generate_series i
Filter: (i <= 10)
(12 rows)
SELECT DISTINCT (i || '/' || j)::pg_lsn f SELECT DISTINCT (i || '/' || j)::pg_lsn f
FROM generate_series(1, 10) i, FROM generate_series(1, 10) i,
generate_series(1, 10) j, generate_series(1, 10) j,
generate_series(1, 5) k generate_series(1, 5) k
WHERE i <= 10 AND j > 0 AND j <= 10
ORDER BY f; ORDER BY f;
f f
------- -------
......
...@@ -30,10 +30,12 @@ SELECT DISTINCT (i || '/' || j)::pg_lsn f ...@@ -30,10 +30,12 @@ SELECT DISTINCT (i || '/' || j)::pg_lsn f
FROM generate_series(1, 10) i, FROM generate_series(1, 10) i,
generate_series(1, 10) j, generate_series(1, 10) j,
generate_series(1, 5) k generate_series(1, 5) k
WHERE i <= 10 AND j > 0 AND j <= 10
ORDER BY f; ORDER BY f;
SELECT DISTINCT (i || '/' || j)::pg_lsn f SELECT DISTINCT (i || '/' || j)::pg_lsn f
FROM generate_series(1, 10) i, FROM generate_series(1, 10) i,
generate_series(1, 10) j, generate_series(1, 10) j,
generate_series(1, 5) k generate_series(1, 5) k
WHERE i <= 10 AND j > 0 AND j <= 10
ORDER BY f; ORDER BY f;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment