pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix planner's row-mark code for inheritance from a foreign table 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix planner's row-mark code for inheritance from a foreign table @ 2021-06-02 18:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2021-06-02 18:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/889592344c48d3965567f331b4ea89dfe6447bce Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 86 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 21 +++++++ src/backend/optimizer/util/inherit.c | 21 ++++++- 3 files changed, 126 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix planner's row-mark code for inheritance from a foreign table @ 2021-06-02 18:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2021-06-02 18:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6753a5b7e86cd9bb1eed580b1f9001d5ea1bbdb3 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 86 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 21 +++++++ src/backend/optimizer/util/inherit.c | 21 ++++++- 3 files changed, 126 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix planner's row-mark code for inheritance from a foreign table @ 2021-06-02 18:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2021-06-02 18:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bdd096f1aec040574ff36a16946579b23a0e4879 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 86 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 21 +++++++ src/backend/optimizer/util/inherit.c | 21 ++++++- 3 files changed, 126 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-06-02 18:38 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-06-02 18:38 pgsql: Fix planner's row-mark code for inheritance from a foreign table Tom Lane <tgl@sss.pgh.pa.us> 2021-06-02 18:38 pgsql: Fix planner's row-mark code for inheritance from a foreign table Tom Lane <tgl@sss.pgh.pa.us> 2021-06-02 18:38 pgsql: Fix planner's row-mark code for inheritance from a foreign table Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox