1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00
Files
postgres/src/backend
Alexander Korotkov 8951941fb8 Improve RowMark handling during Self-Join Elimination
The Self-Join Elimination SJE feature messes up keeping and removing RowMark's
in remove_self_joins_one_group().  That didn't lead to user-level error,
because the planned RowMark is only used to reference a rtable entry in later
execution stages.  An RTE entry for keeping and removing relations is
identical and refers to the same relation OID.

To reduce confusion and prevent future issues, this commit cleans up the code
and fixes the incorrect behaviour.  Furthermore, it includes sanity checks in
setrefs.c on existing non-null RTE and RelOptInfo entries for each RowMark.

Discussion: https://postgr.es/m/18c6bd6c-6d2a-419a-b0da-dfedef34b585%40gmail.com
Author: Andrei Lepikhov <lepihov@gmail.com>
Reviewed-by: Greg Sabino Mullane <htamfids@gmail.com>
Backpatch-through: 18
2025-08-26 13:23:53 +03:00
..
2025-01-01 11:21:55 -05:00
2025-08-25 22:59:00 +02:00
2025-08-11 14:38:06 +02:00
2025-08-25 22:59:00 +02:00
2025-07-17 17:40:22 +02:00
2025-03-26 19:45:32 -04:00
2025-01-01 11:21:55 -05:00