Re: pgsql: Allow UPDATE to move rows between partitions. - Mailing list pgsql-committers

From Amit Kapila
Subject Re: pgsql: Allow UPDATE to move rows between partitions.
Date
Msg-id CAA4eK1LG01SjT5R48M5CYeHVnMP_qwMMHEhF5y96H2ro=ctdQA@mail.gmail.com
Whole thread Raw
In response to pgsql: Allow UPDATE to move rows between partitions.  (Robert Haas <rhaas@postgresql.org>)
List pgsql-committers
On Sat, Jan 20, 2018 at 2:03 AM, Robert Haas <rhaas@postgresql.org> wrote:
> Allow UPDATE to move rows between partitions.
>

+    If an <command>UPDATE</command> on a partitioned table causes a row to move
+    to another partition, it will be performed as a <command>DELETE</command>
+    from the original partition followed by an <command>INSERT</command> into
+    the new partition. In this case, all row-level <literal>BEFORE</literal>
+    <command>UPDATE</command> triggers and all row-level
+    <literal>BEFORE</literal> <command>DELETE</command> triggers are fired on
+    the original partition.

Do we need to maintain triggers related behavior for logical
replication?  In logical replication, we use ExecSimpleRelationDelete
to perform Delete operation which is not aware of this special
behavior (execute before update trigger for this case).

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Split out documentation of SSL parameters into their ownsection
Next
From: Bruce Momjian
Date:
Subject: pgsql: doc: simplify intermediate certificate mention in libpq docs