Skip to content

Stabilize PG19 ORDER BY pushdown regression plan#8680

Open
ihalatci wants to merge 2 commits into
pg19-supportfrom
ihalatci-pg19-pr8-orderby
Open

Stabilize PG19 ORDER BY pushdown regression plan#8680
ihalatci wants to merge 2 commits into
pg19-supportfrom
ihalatci-pg19-pr8-orderby

Conversation

@ihalatci

@ihalatci ihalatci commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Stabilize PostgreSQL 19 ORDER BY pushdown plan assertions ## Context PostgreSQL BUG #19517 caused eager aggregation on semi/antijoin inner relations to return incorrect results on 19beta1 (5|130). Upstream commit ffeda04259bb fixes that bug, and the same reproducer returns the correct 5|26 on 19beta2. This PR therefore does not disable enable_eager_aggregate or enable_hashagg globally or in the regression harness. The H4 case in multi_orderby_pushdown is independent of that correctness fix. On 19beta2, with eager aggregation at its default, it still chooses a worker Nested Loop plan instead of the asserted Sort -> Hash Semi Join shape. Both Citus Sorted Merge Adaptive nodes remain, so pushdown itself is intact. This change stabilizes only the H4 EXPLAIN by wrapping it in a transaction and propagating transaction-local planner settings: sql BEGIN; SET LOCAL citus.propagate_set_commands TO 'local'; SET LOCAL enable_nestloop TO off; -- existing H4 EXPLAIN COMMIT; The expected plan is otherwise unchanged and continues to assert sorted-merge pushdown and the worker hash semi-join shape. There are no production-code or regression-harness changes. ## Validation - PostgreSQL 17.10: -Werror build and focused multi_orderby_pushdown path, 15/15 passed. - PostgreSQL 18.4: -Werror build and focused path, 15/15 passed. - PostgreSQL 19beta2: -Werror build and focused path, 15/15 passed with default enable_eager_aggregate=on. - PostgreSQL 19beta2 upstream regression suite: 245/245 passed, including eager_aggregate. - PostgreSQL 19beta2 Citus semi/antijoin path: multi_subquery_in_where_reference_clause, 15/15 passed with eager aggregation enabled. - Perl syntax, style, and diff whitespace checks passed. Closes #8666 > This draft targets the non-default pg19-support branch. GitHub may defer automatic issue closure until the change reaches the default branch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: bd1ff9e9-2f27-43d3-b9d7-f7d167e7e3c4
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: bd1ff9e9-2f27-43d3-b9d7-f7d167e7e3c4
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.80%. Comparing base (cfb4063) to head (355419b).

Additional details and impacted files
@@              Coverage Diff              @@
##           pg19-support    #8680   +/-   ##
=============================================
  Coverage         88.79%   88.80%           
=============================================
  Files               288      288           
  Lines             64416    64416           
  Branches           8101     8101           
=============================================
+ Hits              57201    57205    +4     
+ Misses             4877     4874    -3     
+ Partials           2338     2337    -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ihalatci
ihalatci marked this pull request as ready for review July 17, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants