From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: a misbehavior of partition row movement (?)
Date: Sat, 3 Oct 2020 13:15:09 +0200
Message-ID: <20201003111509.hgxgu46uj7hijmvd@development> (raw)
In-Reply-To: <CA+HiwqHnJtavV-4L+wEXK02meAXqk2Nx11Lq8QF5=1cf=T9bdw@mail.gmail.com>
References: <CA+HiwqFvkBCmfwkQX_yBqv2Wz8ugUGiBDxum8=WvVbfU1TXaNg@mail.gmail.com>
<CAKFQuwYyrHRZDQ_stgEkwiZ7zQXOdY2650o660WZxkKVZDPE+w@mail.gmail.com>
<CA+HiwqHnJtavV-4L+wEXK02meAXqk2Nx11Lq8QF5=1cf=T9bdw@mail.gmail.com>
On Sat, Oct 03, 2020 at 11:42:21AM +0900, Amit Langote wrote:
>On Fri, Oct 2, 2020 at 11:32 PM David G. Johnston
><david.g.johnston@gmail.com> wrote:
>> 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?
>
>I was thinking yesterday about making it just work, but considering the
>changes that would need to be made to how the underlying triggers fire,
>it does not seem we would be able to back-port the solution.
>
I think we need to differentiate between master and backbranches. IMO we
should try to make it "just work" in master, and the amount of code
should not be an issue there I think (no opinion on whether insert and
update trigger is the way to go). For backbranches we may need to do
something less intrusive, of course.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, amitlangote09@gmail.com, david.g.johnston@gmail.com
Subject: Re: a misbehavior of partition row movement (?)
In-Reply-To: <20201003111509.hgxgu46uj7hijmvd@development>
* 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