From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Postgres hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix event triggers for partitioned tables |
Date: | 2018-10-08 09:12:58 |
Message-ID: | 20181008091258.GC2754@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Hi Alvaro,
On Sat, Oct 06, 2018 at 10:18:46PM +0000, Alvaro Herrera wrote:
> Fix event triggers for partitioned tables
>
> Index DDL cascading on partitioned tables introduced a way for ALTER
> TABLE to be called reentrantly. This caused an an important deficiency
> in event trigger support to be exposed: on exiting the reentrant call,
> the alter table state object was clobbered, causing a crash when the
> outer alter table tries to finalize its processing. Fix the crash by
> creating a stack of event trigger state objects. There are still ways
> to cause things to misbehave (and probably other crashers) with more
> elaborate tricks, but at least it now doesn't crash in the obvious
> scenario.
This commit is producing a warning with my compiler:
event_trigger.c:1764:9: note: in expansion of macro ‘OidIsValid’
Assert(OidIsValid(currentEventTriggerState->currentCommand));
The fix is obvious because currentCommand is a pointer and not an Oid.
Please see attached. Should I fix it myself?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
event-trigger-warning.patch | text/x-diff | 635 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-10-08 09:26:32 | pgsql: Track procedure calls in pg_stat_user_functions |
Previous Message | Michael Paquier | 2018-10-08 09:02:39 | pgsql: Improve two error messages related to foreign keys on partitione |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-10-08 09:14:51 | Re: out-of-order XID insertion in KnownAssignedXids |
Previous Message | Michael Paquier | 2018-10-08 09:04:55 | Re: Unclear error message |