pgsql: Revert commit 66c0185a3 and follow-on patches. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Revert commit 66c0185a3 and follow-on patches.
Date
Msg-id E1s98N8-00171o-HW@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Revert commit 66c0185a3 and follow-on patches.

This reverts 66c0185a3 (Allow planner to use Merge Append to
efficiently implement UNION) as well as the follow-on commits
d5d2205c8, 3b1a7eb28, 7487044d6.  In addition to those, 07746a8ef
had to be removed then re-applied in a different place, because
66c0185a3 moved the relevant code.

The reason for this last-minute thrashing is that depesz found a
case in which the patched code creates a completely wrong plan
that silently gives incorrect query results.  It's unclear what
the cause is or how many cases are affected, but with beta1 wrap
staring us in the face, there's no time for closer investigation.
After we figure that out, we can decide whether to un-revert this
for beta2 or hold it for v18.

Discussion: https://postgr.es/m/Zktzf926vslR35Fv@depesz.com
(also some private discussion among pgsql-release)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7204f35919b7e021e8d1bc9f2d76fd6bfcdd2070

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out |   7 -
contrib/postgres_fdw/sql/postgres_fdw.sql      |   9 -
src/backend/optimizer/path/allpaths.c          |   5 +-
src/backend/optimizer/path/equivclass.c        |  61 ---
src/backend/optimizer/path/pathkeys.c          |  19 -
src/backend/optimizer/plan/planner.c           | 116 +---
src/backend/optimizer/plan/subselect.c         |  15 +-
src/backend/optimizer/prep/prepunion.c         | 720 ++++++++-----------------
src/backend/parser/analyze.c                   |   3 +-
src/include/nodes/pathnodes.h                  |   2 -
src/include/optimizer/paths.h                  |   4 -
src/include/optimizer/planner.h                |   3 +-
src/include/optimizer/prep.h                   |   2 +-
src/test/regress/expected/collate.icu.utf8.out |   2 -
src/test/regress/expected/incremental_sort.out |  13 +-
src/test/regress/expected/union.out            |  46 +-
src/test/regress/sql/collate.icu.utf8.sql      |   2 -
src/test/regress/sql/union.sql                 |  19 +-
18 files changed, 287 insertions(+), 761 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: doc PG 17 relnotes: adjust vacuum items
Next
From: Tom Lane
Date:
Subject: pgsql: Doc: remove 66c0185a3 from release notes.