pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
6+ messages / 1 participants
[nested] [flat]

* pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
@ 2019-06-13 09:15 Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Etsuro Fujita @ 2019-06-13 09:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Account for triggers in non-direct remote UPDATE planning.

Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8b6da83d162cb0ac9f6d21082727bbd45c972c53

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 33 ++++++++++++++++++++------
contrib/postgres_fdw/postgres_fdw.c            | 19 ++++++++++-----
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 ++++
3 files changed, 44 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
@ 2019-06-13 09:15 Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Etsuro Fujita @ 2019-06-13 09:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Account for triggers in non-direct remote UPDATE planning.

Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2144601821618ddd007b4ce6b7f081a8ac6f65c9

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 33 ++++++++++++++++++++------
contrib/postgres_fdw/postgres_fdw.c            | 19 ++++++++++-----
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 ++++
3 files changed, 44 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
@ 2019-06-13 09:15 Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Etsuro Fujita @ 2019-06-13 09:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Account for triggers in non-direct remote UPDATE planning.

Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0f2b234263ef30b059c04dbebd22e166257159d4

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 33 ++++++++++++++++++++------
contrib/postgres_fdw/postgres_fdw.c            | 19 ++++++++++-----
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 ++++
3 files changed, 44 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
@ 2019-06-13 09:15 Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Etsuro Fujita @ 2019-06-13 09:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Account for triggers in non-direct remote UPDATE planning.

Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1ade21e7facc1202dadca4e916f4d5d3723f84b9

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 33 ++++++++++++++++++++------
contrib/postgres_fdw/postgres_fdw.c            | 19 ++++++++++-----
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 ++++
3 files changed, 44 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
@ 2019-06-13 09:15 Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Etsuro Fujita @ 2019-06-13 09:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Account for triggers in non-direct remote UPDATE planning.

Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/eddb79705f652f91ea1984172e5561d0ee05f27a

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 27 ++++++++++++++++++++++----
contrib/postgres_fdw/postgres_fdw.c            | 19 ++++++++++++------
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 +++++
3 files changed, 41 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p
@ 2019-06-13 09:15 Etsuro Fujita <efujita@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Etsuro Fujita @ 2019-06-13 09:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Account for triggers in non-direct remote UPDATE planning.

Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1a3d9f62c1d158585266200b8bbb2d7d757c4eae

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 21 ++++++++++++++++++++-
contrib/postgres_fdw/postgres_fdw.c            | 19 +++++++++++++------
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 +++++
3 files changed, 38 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2019-06-13 09:15 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 09:15 pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p Etsuro Fujita <efujita@postgresql.org>
2019-06-13 09:15 pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p Etsuro Fujita <efujita@postgresql.org>
2019-06-13 09:15 pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p Etsuro Fujita <efujita@postgresql.org>
2019-06-13 09:15 pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p Etsuro Fujita <efujita@postgresql.org>
2019-06-13 09:15 pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p Etsuro Fujita <efujita@postgresql.org>
2019-06-13 09:15 pgsql: postgres_fdw: Account for triggers in non-direct remote UPDATE p 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