Re: [BUGS] BUG #14815: event trigger in extension

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [BUGS] BUG #14815: event trigger in extension
Дата
Msg-id CAB7nPqSvZNtmWD5LEsZvj8vRToWnE=Orv3mWJpxnH4D62D=Uig@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14815: event trigger in extension  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sun, Sep 17, 2017 at 4:52 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think the reason this fails is that on the way out of the CREATE
> EXTENSION command, the event trigger code sees that an event trigger
> exists, so it tries to call it.  But because no event trigger existed
> when we started the CREATE EXTENSION command, the necessary
> infrastructure hasn't been set up --- in particular,
> EventTriggerBeginCompleteQuery did nothing at the time.

That's rather tricky, the failure happens when doing the CREATE EVENT
TRIGGER command within the CREATE EXTENSION command which is done
within ProcessUtilitySlow. I am wondering if a somewhat-elegant way to
solve such problems would be to introduce a function able to
temporarily disable and enable event triggers to happen in the context
of an extension creation, in a design similar to
pg_extension_config_dump.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: [BUGS] Re: Query planner skipping index depending on DISTINCT parameterorder (2)
Следующее
От: drabant@nexgo.de
Дата:
Сообщение: [BUGS] BUG #14840: Issues and bad performance with 9.6.5