diff options
author | Robert Haas <rhaas@postgresql.org> | 2024-05-21 12:42:27 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2024-05-21 12:44:51 -0400 |
commit | 12933dc6048902ba891f9572cab96981f50ef669 (patch) | |
tree | 3e14dabda4e36866611d8e2627b3925b011c00e3 /contrib/postgres_fdw/sql/postgres_fdw.sql | |
parent | 3bd7b2f465deb48c0d37ed6a41bd864771f44390 (diff) | |
download | postgresql-12933dc6048902ba891f9572cab96981f50ef669.tar.gz postgresql-12933dc6048902ba891f9572cab96981f50ef669.zip |
Re-allow planner to use Merge Append to efficiently implement UNION.
This reverts commit 7204f35919b7e021e8d1bc9f2d76fd6bfcdd2070,
thus restoring 66c0185a3 (Allow planner to use Merge Append to
efficiently implement UNION) as well as the follow-on commits
d5d2205c8, 3b1a7eb28, 7487044d6.
Per further discussion on pgsql-release, we wish to ship beta1 with
this feature, and patch the bug that was found just before wrap,
rather than shipping beta1 with the feature reverted.
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 1f31ac14df0..09ba234e43d 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -3885,6 +3885,11 @@ DROP INDEX base_tbl2_idx; DROP INDEX async_p3_idx; -- UNION queries +SET enable_sort TO off; +SET enable_incremental_sort TO off; +-- Adjust fdw_startup_cost so that we get an unordered path in the Append. +ALTER SERVER loopback2 OPTIONS (ADD fdw_startup_cost '0.00'); + EXPLAIN (VERBOSE, COSTS OFF) INSERT INTO result_tbl (SELECT a, b, 'AAA' || c FROM async_p1 ORDER BY a LIMIT 10) @@ -3911,6 +3916,10 @@ UNION ALL SELECT * FROM result_tbl ORDER BY a; DELETE FROM result_tbl; +RESET enable_incremental_sort; +RESET enable_sort; +ALTER SERVER loopback2 OPTIONS (DROP fdw_startup_cost); + -- Disable async execution if we use gating Result nodes for pseudoconstant -- quals EXPLAIN (VERBOSE, COSTS OFF) |