Correction of RowMark Removal During Sel-Join Elimination
Andrei Lepikhov <lepihov@gmail.com>
From: Andrei Lepikhov <lepihov@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Alexander Korotkov <aekorotkov@gmail.com>
Date: 2025-08-01T12:32:51Z
Lists: pgsql-hackers
Attachments
- v0-0001-Force-RowMark-Sanity-Checking.patch (text/plain) patch v0-0001
Hi, I've noticed that the code for sel-join elimination incorrectly removes RowMarks. Currently, this doesn't lead to any issues because the optimiser retains pointers to the simple_rte_array. A RowMark refers to an RTE entry that is the same for both the relations being kept and those being removed. I believe it would be beneficial to address this issue now to prevent potential problems in the future. See the patch attached. -- regards, Andrei Lepikhov
Commits
-
Improve RowMark handling during Self-Join Elimination
- 8951941fb8a4 18.0 landed
- 5f6f951f88e5 19 (unreleased) landed
-
Refactor variable names in remove_self_joins_one_group()
- d713cf9b65ae 19 (unreleased) landed
- 8202b0e83d09 18.0 landed
-
Reduce "Var IS [NOT] NULL" quals during constant folding
- e2debb64380e 19 (unreleased) cited
-
Reimplement parsing and storage of default expressions and constraint
- eabc714a916b 7.1.1 cited