pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Etsuro Fujita <efujita@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Disable batch insert when BEFORE ROW INSERT trigge
Date: Thu, 21 Apr 2022 06:39:51 +0000
Message-ID: <E1nhQTn-000O7s-1q@gemulon.postgresql.org> (raw)

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
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/89d349b0a0239504325e5f63755f3bc1e1742478

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1nhQTn-000O7s-1q@gemulon.postgresql.org>
Permalink:  ../E1nhQTn-000O7s-1q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nhQTn-000O7s-1q@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: efujita@postgresql.org
  Subject: Re: pgsql: postgres_fdw: Disable batch insert when BEFORE ROW INSERT trigge
  In-Reply-To: <E1nhQTn-000O7s-1q@gemulon.postgresql.org>
  References: <E1nhQTn-000O7s-1q@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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