Make replace_relid() leave argument unmodified
Alexander Korotkov <akorotkov@postgresql.org>
Make replace_relid() leave argument unmodified There are a lot of situations when we share the same pointer to a Bitmapset structure across different places. In order to evade undesirable side effects replace_relid() function should always return a copy. Reported-by: Richard Guo Discussion: https://postgr.es/m/CAMbWs4_wJthNtYBL%2BSsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw%40mail.gmail.com Reviewed-by: Richard Guo, Andres Freund, Ashutosh Bapat, Andrei Lepikhov
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/analyzejoins.c | modified | +8 −3 |
| src/test/regress/expected/join.out | modified | +15 −0 |
| src/test/regress/sql/join.sql | modified | +6 −0 |
Discussion
- Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)' 25 messages · 2023-11-14 → 2023-12-27