pgsql: postgres_fdw: Disable batch insert when BEFORE ROW INSERT trigge

From: Etsuro Fujita <efujita(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: postgres_fdw: Disable batch insert when BEFORE ROW INSERT trigge
Date: 2022-04-21 06:39:51
Message-ID: E1nhQTn-000O7r-18@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

postgres_fdw: Disable batch insert when BEFORE ROW INSERT triggers exist.

Previously, we allowed this, but such triggers might query the table to
insert into and act differently if the tuples that have already been
processed and prepared for insertion are not there, so disable it in
such cases.

Back-patch to v14 where batch insert was added.

Discussion: https://postgr.es/m/CAPmGK16_uPqsmgK0-LpLSUk54_BoK13bPrhxhfjSoSTVz414hA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4eea2202beadbba67638bb129149abe5650aaaf6

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 28 ++++++++++++++++++++++++++
contrib/postgres_fdw/postgres_fdw.c | 17 ++++++++++++----
contrib/postgres_fdw/sql/postgres_fdw.sql | 12 +++++++++++
3 files changed, 53 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2022-04-21 13:41:50 pgsql: Support new perl module namespace in stable branches
Previous Message Peter Geoghegan 2022-04-21 01:30:54 pgsql: vacuumlazy.c: MultiXactIds are MXIDs, not XMIDs.