pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s 5+ messages / 1 participants [nested] [flat]
* pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s @ 2020-01-26 19:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-01-26 19:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org In postgres_fdw, don't try to ship MULTIEXPR updates to remote server. In a statement like "UPDATE remote_tab SET (x,y) = (SELECT ...)", we'd conclude that the statement could be directly executed remotely, because the sub-SELECT is in a resjunk tlist item that's not examined for shippability. Currently that ends up crashing if the sub-SELECT contains any remote Vars. Prevent the crash by deeming MULTIEXEC Params to be unshippable. This is a bit of a brute-force solution, since if the sub-SELECT *doesn't* contain any remote Vars, the current execution technology would work; but that's not a terribly common use-case for this syntax, I think. In any case, we generally don't try to ship sub-SELECTs, so it won't surprise anybody that this doesn't end up as a remote direct update. I'd be inclined to see if that general limitation can be fixed before worrying about this case further. Per report from Lukáš Sobotka. Back-patch to 9.6. 9.5 had MULTIEXPR, but we didn't try to perform remote direct updates then, so the case didn't arise anyway. Discussion: https://postgr.es/m/CAJif3k+iA_ekBB5Zw2hDBaE1wtiQa4LH4_JUXrrMGwTrH0J01Q@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7294f99a0b2043cf9b34a9a59ecb3dfbfae94f85 Modified Files -------------- contrib/postgres_fdw/deparse.c | 16 +++++++++++++ contrib/postgres_fdw/expected/postgres_fdw.out | 31 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 20 +++++++++++++++++ 3 files changed, 67 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s @ 2020-01-26 19:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-01-26 19:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org In postgres_fdw, don't try to ship MULTIEXPR updates to remote server. In a statement like "UPDATE remote_tab SET (x,y) = (SELECT ...)", we'd conclude that the statement could be directly executed remotely, because the sub-SELECT is in a resjunk tlist item that's not examined for shippability. Currently that ends up crashing if the sub-SELECT contains any remote Vars. Prevent the crash by deeming MULTIEXEC Params to be unshippable. This is a bit of a brute-force solution, since if the sub-SELECT *doesn't* contain any remote Vars, the current execution technology would work; but that's not a terribly common use-case for this syntax, I think. In any case, we generally don't try to ship sub-SELECTs, so it won't surprise anybody that this doesn't end up as a remote direct update. I'd be inclined to see if that general limitation can be fixed before worrying about this case further. Per report from Lukáš Sobotka. Back-patch to 9.6. 9.5 had MULTIEXPR, but we didn't try to perform remote direct updates then, so the case didn't arise anyway. Discussion: https://postgr.es/m/CAJif3k+iA_ekBB5Zw2hDBaE1wtiQa4LH4_JUXrrMGwTrH0J01Q@mail.gmail.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/43a648f57ce3d45fc77b0d18b0829884d8449151 Modified Files -------------- contrib/postgres_fdw/deparse.c | 16 +++++++++++++ contrib/postgres_fdw/expected/postgres_fdw.out | 31 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 20 +++++++++++++++++ 3 files changed, 67 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s @ 2020-01-26 19:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-01-26 19:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org In postgres_fdw, don't try to ship MULTIEXPR updates to remote server. In a statement like "UPDATE remote_tab SET (x,y) = (SELECT ...)", we'd conclude that the statement could be directly executed remotely, because the sub-SELECT is in a resjunk tlist item that's not examined for shippability. Currently that ends up crashing if the sub-SELECT contains any remote Vars. Prevent the crash by deeming MULTIEXEC Params to be unshippable. This is a bit of a brute-force solution, since if the sub-SELECT *doesn't* contain any remote Vars, the current execution technology would work; but that's not a terribly common use-case for this syntax, I think. In any case, we generally don't try to ship sub-SELECTs, so it won't surprise anybody that this doesn't end up as a remote direct update. I'd be inclined to see if that general limitation can be fixed before worrying about this case further. Per report from Lukáš Sobotka. Back-patch to 9.6. 9.5 had MULTIEXPR, but we didn't try to perform remote direct updates then, so the case didn't arise anyway. Discussion: https://postgr.es/m/CAJif3k+iA_ekBB5Zw2hDBaE1wtiQa4LH4_JUXrrMGwTrH0J01Q@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/215824f9188a2b19f870e6a707c5a81e1ac3f1fc Modified Files -------------- contrib/postgres_fdw/deparse.c | 16 +++++++++++++ contrib/postgres_fdw/expected/postgres_fdw.out | 31 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 20 +++++++++++++++++ 3 files changed, 67 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s @ 2020-01-26 19:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-01-26 19:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org In postgres_fdw, don't try to ship MULTIEXPR updates to remote server. In a statement like "UPDATE remote_tab SET (x,y) = (SELECT ...)", we'd conclude that the statement could be directly executed remotely, because the sub-SELECT is in a resjunk tlist item that's not examined for shippability. Currently that ends up crashing if the sub-SELECT contains any remote Vars. Prevent the crash by deeming MULTIEXEC Params to be unshippable. This is a bit of a brute-force solution, since if the sub-SELECT *doesn't* contain any remote Vars, the current execution technology would work; but that's not a terribly common use-case for this syntax, I think. In any case, we generally don't try to ship sub-SELECTs, so it won't surprise anybody that this doesn't end up as a remote direct update. I'd be inclined to see if that general limitation can be fixed before worrying about this case further. Per report from Lukáš Sobotka. Back-patch to 9.6. 9.5 had MULTIEXPR, but we didn't try to perform remote direct updates then, so the case didn't arise anyway. Discussion: https://postgr.es/m/CAJif3k+iA_ekBB5Zw2hDBaE1wtiQa4LH4_JUXrrMGwTrH0J01Q@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5220ced0de5de1b88437c00fffabfac223ee9866 Modified Files -------------- contrib/postgres_fdw/deparse.c | 16 +++++++++++++ contrib/postgres_fdw/expected/postgres_fdw.out | 31 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 20 +++++++++++++++++ 3 files changed, 67 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s @ 2020-01-26 19:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-01-26 19:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org In postgres_fdw, don't try to ship MULTIEXPR updates to remote server. In a statement like "UPDATE remote_tab SET (x,y) = (SELECT ...)", we'd conclude that the statement could be directly executed remotely, because the sub-SELECT is in a resjunk tlist item that's not examined for shippability. Currently that ends up crashing if the sub-SELECT contains any remote Vars. Prevent the crash by deeming MULTIEXEC Params to be unshippable. This is a bit of a brute-force solution, since if the sub-SELECT *doesn't* contain any remote Vars, the current execution technology would work; but that's not a terribly common use-case for this syntax, I think. In any case, we generally don't try to ship sub-SELECTs, so it won't surprise anybody that this doesn't end up as a remote direct update. I'd be inclined to see if that general limitation can be fixed before worrying about this case further. Per report from Lukáš Sobotka. Back-patch to 9.6. 9.5 had MULTIEXPR, but we didn't try to perform remote direct updates then, so the case didn't arise anyway. Discussion: https://postgr.es/m/CAJif3k+iA_ekBB5Zw2hDBaE1wtiQa4LH4_JUXrrMGwTrH0J01Q@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/603e03b4c9e8f853ab15da45e6e72df718ec335c Modified Files -------------- contrib/postgres_fdw/deparse.c | 16 +++++++++++++ contrib/postgres_fdw/expected/postgres_fdw.out | 31 ++++++++++++++++++++++++++ contrib/postgres_fdw/sql/postgres_fdw.sql | 20 +++++++++++++++++ 3 files changed, 67 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-01-26 19:31 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-01-26 19:31 pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s Tom Lane <tgl@sss.pgh.pa.us> 2020-01-26 19:31 pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s Tom Lane <tgl@sss.pgh.pa.us> 2020-01-26 19:31 pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s Tom Lane <tgl@sss.pgh.pa.us> 2020-01-26 19:31 pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s Tom Lane <tgl@sss.pgh.pa.us> 2020-01-26 19:31 pgsql: In postgres_fdw, don't try to ship MULTIEXPR updates to remote s 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