mirror of https://github.com/citusdata/citus.git
PG18 - Adjust columnar path tests for PG18 OR clause optimization (#8337)
fixes #8264 PostgreSQL 18 introduced a planner improvement (commit `ae4569161`) that rewrites simple `OR` equality clauses into `= ANY(...)` forms, allowing the use of a single index scan instead of multiple scans or a custom scan. This change affects the columnar path tests where queries like `a=0 OR a=5` previously chose a Columnar or Seq Scan plan. In this PR: * Updated test expectations for `uses_custom_scan` and `uses_seq_scan` to reflect the new index scan plan. This keeps the test output consistent with PostgreSQL 18’s updated planner behavior.pull/8332/head^2
parent
4244bc8516
commit
f80fa1c83b
|
|
@ -204,18 +204,24 @@ $$
|
|||
t
|
||||
(1 row)
|
||||
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
$$
|
||||
);
|
||||
BEGIN;
|
||||
SET LOCAL enable_indexscan TO 'OFF';
|
||||
SET LOCAL enable_bitmapscan TO 'OFF';
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
$$
|
||||
);
|
||||
uses_custom_scan
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
SET LOCAL columnar.enable_custom_scan TO 'OFF';
|
||||
SET LOCAL enable_indexscan TO 'OFF';
|
||||
SET LOCAL enable_bitmapscan TO 'OFF';
|
||||
SELECT columnar_test_helpers.uses_seq_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
|
|
|
|||
|
|
@ -204,18 +204,24 @@ $$
|
|||
t
|
||||
(1 row)
|
||||
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
$$
|
||||
);
|
||||
BEGIN;
|
||||
SET LOCAL enable_indexscan TO 'OFF';
|
||||
SET LOCAL enable_bitmapscan TO 'OFF';
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
$$
|
||||
);
|
||||
uses_custom_scan
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
SET LOCAL columnar.enable_custom_scan TO 'OFF';
|
||||
SET LOCAL enable_indexscan TO 'OFF';
|
||||
SET LOCAL enable_bitmapscan TO 'OFF';
|
||||
SELECT columnar_test_helpers.uses_seq_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
|
|
|
|||
|
|
@ -141,14 +141,21 @@ SELECT a FROM full_correlated WHERE a>200;
|
|||
$$
|
||||
);
|
||||
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
$$
|
||||
);
|
||||
|
||||
BEGIN;
|
||||
SET LOCAL enable_indexscan TO 'OFF';
|
||||
SET LOCAL enable_bitmapscan TO 'OFF';
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
$$
|
||||
);
|
||||
ROLLBACK;
|
||||
|
||||
BEGIN;
|
||||
SET LOCAL columnar.enable_custom_scan TO 'OFF';
|
||||
SET LOCAL enable_indexscan TO 'OFF';
|
||||
SET LOCAL enable_bitmapscan TO 'OFF';
|
||||
SELECT columnar_test_helpers.uses_seq_scan (
|
||||
$$
|
||||
SELECT a FROM full_correlated WHERE a=0 OR a=5;
|
||||
|
|
|
|||
Loading…
Reference in New Issue