pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' 7+ messages / 1 participants [nested] [flat]
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9320cfdd06e5975b7bf60ab4c3d03195bf3fb5ff Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 79 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 ++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++ 3 files changed, 141 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/64387c540805e392d051cf484ebcf937a9bd8b1b Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 79 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 ++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++ 3 files changed, 141 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b53d104ae3b9cb0acfc6bb429261005bd07d3b3e Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 79 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 ++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++ 3 files changed, 141 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6749d4e8c71bac9cd06f9c923d38e34d07211f15 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 79 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 ++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++ 3 files changed, 141 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/87fd3c9025da2db0f35b3c898126f32ed35bb15c Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 79 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 ++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++ 3 files changed, 141 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/07d81d1e5b7516c5784ec598d362a848b5c9ee55 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 83 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 +++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 18 ++++++ 3 files changed, 150 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' @ 2022-09-14 09:54 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Etsuro Fujita @ 2022-09-14 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Avoid 'variable not found in subplan target list' error. The tlist of the EvalPlanQual outer plan for a ForeignScan node is adjusted to produce a tuple whose descriptor matches the scan tuple slot for the ForeignScan node. But in the case where the outer plan contains an extra Sort node, if the new tlist contained columns required only for evaluating PlaceHolderVars or columns required only for evaluating local conditions, this would cause setrefs.c to fail with the error. The cause of this is that when creating the outer plan by injecting the Sort node into an alternative local join plan that could emit such extra columns as well, we fail to arrange for the outer plan to propagate them up through the Sort node, causing setrefs.c to fail to match up them in the new tlist to what is available from the outer plan. Repair. Per report from Alexander Pyhalov. Richard Guo and Etsuro Fujita, reviewed by Alexander Pyhalov and Tom Lane. Backpatch to all supported versions. Discussion: http://postgr.es/m/cfb17bf6dfdf876467bd5ef533852d18%40postgrespro.ru Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d4adff0e97f08fdb9e8844376419a271da7599ed Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 83 ++++++++++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 49 +++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 18 ++++++ 3 files changed, 150 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2022-09-14 09:54 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org> 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org> 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org> 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org> 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org> 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org> 2022-09-14 09:54 pgsql: postgres_fdw: Avoid 'variable not found in subplan target list' Etsuro Fujita <efujita@postgresql.org>
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