Re: Segfault when creating partition with a primary key and sql_drop trigger exists

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Marco Slot <marco(at)citusdata(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Onder Kalaci <onder(at)citusdata(dot)com>
Subject: Re: Segfault when creating partition with a primary key and sql_drop trigger exists
Date: 2018-10-03 07:53:19
Message-ID: 20181003075319.GH2609@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 28, 2018 at 12:17:00PM +0900, Michael Paquier wrote:
> I think that Alvaro should definitely look at this patch to be sure, or
> I could do it, but I would need to spend way more time on this and check
> event trigger interactions.
>
> Anyway, I was struggling a bit regarding the location where adding a
> regression test. event_trigger.sql makes the most sense but in tests
> for drops the objects are created before the event trigger is defined,
> so that would need to move around so as the original problem is
> reproducible. Perhaps you have an idea for that?

Okay. I have spent more time on this issue, and I have been able to
integrate a test in the existing event_trigger.sql which is able to
reproduce the reported failure. Attached is what I am finishing with.

I still want to do more testing on it, and the day is ending here.

Thoughts?
--
Michael

Attachment Content-Type Size
event-partition-v2.patch text/x-diff 6.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-10-03 07:55:10 Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru
Previous Message Chris Travers 2018-10-03 07:40:11 Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2