Fix planner's row-mark code for inheritance from a foreign table.
Tom Lane <tgl@sss.pgh.pa.us>
Fix planner's row-mark code for inheritance from a foreign table. Commit 428b260f8 broke planning of cases where row marks are needed (SELECT FOR UPDATE, etc) and one of the query's tables is a foreign table that has regular table(s) as inheritance children. We got the reverse case right, but apparently were thinking that foreign tables couldn't be inheritance parents. Not so; so we need to be able to add a CTID junk column while adding a new child, not only a wholerow junk column. Back-patch to v12 where the faulty code came in. Amit Langote Discussion: https://postgr.es/m/CA+HiwqEmo3FV1LAQ4TVyS2h1WM=kMkZUmbNuZSCnfHvMcUcPeA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/postgres_fdw/expected/postgres_fdw.out | modified | +86 −0 |
| contrib/postgres_fdw/sql/postgres_fdw.sql | modified | +21 −0 |
| src/backend/optimizer/util/inherit.c | modified | +19 −2 |
Discussion
- parent foreign tables and row marks 4 messages · 2021-06-01 → 2021-06-03