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

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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-09-27 21:02:06
Message-ID: CA+q6zcVnxBachcKS+_xTEhL6sg6pO48+WQJLNnC6h=LKdVxt6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Wed, 26 Sep 2018 at 05:33, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Sep 25, 2018 at 01:39:59PM +0200, Dmitry Dolgov wrote:
> > Shouldn't it be fixed by adding EventTriggerAlterTableStart? Judging from the
> > following call of ATController, we can just pass NULL as parsetree.
>
> Hmm. I don't think that this is correct as this data could always be
> used to fetch a command tag, right? It seems to me instead that we
> should pass down IndexStmt and handle things like the attached.
> Thoughts?

Yes, you're right. Although probably it's not great that the sequence of
EventTriggerAlterTableStart, EventTriggerAlterTableRelid and
EventTriggerAlterTableEnd is distributed between different functions (which
most likely is worth a comment in AlterTableInternal), but it's a minor
concern.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-09-27 21:02:56 Re: Performance of the partitioning in the large scale
Previous Message Alvaro Herrera 2018-09-27 20:59:17 Re: [PATCH] Improve geometric types