From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Concurrency bug in UPDATE of partition-key |
Date: | 2018-06-18 12:26:36 |
Message-ID: | CAA4eK1JBnh=K=3Ae3-xBuGKV_sv24g2fTao_y5YPgxf876OmnQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 18, 2018 at 11:28 AM, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> On Mon, Jun 18, 2018 at 10:21 AM, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com> wrote:
>> Attached is v2 version of the patch. It contains the above
>> trigger-related issue fixed.
>>
>> The updated tuple is passed back using the existing newslot parameter
>> of GetTupleForTrigger(). When ExecBRDeleteTriggers() is called using a
>> new epqslot parameter, it means caller wants to skip the trigger
>> execution, because the updated tuple needs to be again checked for
>> constraints. I have added comments of this behaviour in the
>> ExecBRDeleteTriggers() function header.
>>
>
> Thanks for the updated patch. I have verified the BR trigger
> behaviour, its working fine with the patch.
>
> + CREATE FUNCTION func_footrg() RETURNS TRIGGER AS $$
> + BEGIN
> + RETURN OLD;
> + END $$ LANGUAGE PLPGSQL;
> + CREATE TRIGGER footrg_ondel BEFORE DELETE ON footrg1
> + FOR EACH ROW EXECUTE PROCEDURE func_footrg();
>
> Should we also create a test case where we can verify that some
> unnecessary or duplicate triggers are not executed?
>
I am not sure how much value we will add by having such a test. In
general, it is good to have tests that cover various aspects of
functionality, but OTOH, we have to be careful to not overdo it.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2018-06-18 12:29:32 | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS) |
Previous Message | Amit Kapila | 2018-06-18 12:11:01 | Re: Slow planning time for simple query |