a misbehavior of partition row movement (?)

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-10-02T14:32:56Z
Lists: pgsql-hackers
On Friday, October 2, 2020, Amit Langote <amitlangote09@gmail.com> wrote:

>
> Reporter on that thread says that the last update should have failed
> and I don't quite see a workable alternative to that.


To be clear the OP would rather have it just work, the same as the
non-row-movement version.  Maybe insert the new row first, execute the on
update trigger chained from the old row, then delete the old row?

David J.

Commits

  1. Enforce foreign key correctly during cross-partition updates

  2. Create foreign key triggers in partitioned tables too