Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

postgres_fdw.sql

Blame
    • Etsuro Fujita's avatar
      eddb7970
      postgres_fdw: Account for triggers in non-direct remote UPDATE planning. · eddb7970
      Etsuro Fujita authored
      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 7cbe57c3 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
      eddb7970
      History
      postgres_fdw: Account for triggers in non-direct remote UPDATE planning.
      Etsuro Fujita authored
      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 7cbe57c3 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