Re: [BUG v13] Crash with event trigger in extension

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [BUG v13] Crash with event trigger in extension
Дата
Msg-id 20200908143324.GA11045@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [BUG v13] Crash with event trigger in extension  (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
Ответы Re: [BUG v13] Crash with event trigger in extension  (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
Список pgsql-bugs
On 2020-Sep-08, Jehan-Guillaume de Rorthais wrote:

> It appears that when keeping the event trigger enabled,
> currentEventTriggerState might be initiated multiple times: one for the top
> level "alter extension ... update", then once per DDL query triggering en event
> in the extension update script. I suppose there's no crash because the very
> first currentEventTriggerState initialized at top level is overrode by next
> ones, each being destroyed in their own context. So at the end of the
> extension script, currentEventTriggerState is just destroyed and empty.

Hmm.  I spent a lot of time making sure the event trigger thing worked
correctly in reentrant cases, but I don't think the case of execution of
extension scripts was ever considered.  So you're right that it might be
broken, since it appears not to be thoroughly tested (if at all).

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: [BUG v13] Crash with event trigger in extension
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #15285: Query used index over field with ICU collation in some cases wrongly return 0 rows