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

Поиск
Список
Период
Сортировка
От Jehan-Guillaume de Rorthais
Тема Re: [BUG v13] Crash with event trigger in extension
Дата
Msg-id 20200909125840.132229b6@firost
обсуждение исходный текст
Ответ на Re: [BUG v13] Crash with event trigger in extension  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
On Tue, 8 Sep 2020 14:32:22 -0300
Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> On 2020-Sep-08, Jehan-Guillaume de Rorthais wrote:
> 
> > I still have a last question in mind though. While running the bellow
> > scenario, the DDL in the extension do not trigger evt_ext_ddl_fnct. Is it
> > normal/expected?  
> 
> Hmm, I think this is intentional; see standard_ProcessUtility and
> ProcessUtilitySlow, noting the value of isCompleteQuery for the
> execution of the extension script.

According to extension.c:execute_sql_string(), queries from
extension script are executed as PROCESS_UTILITY_QUERY context. So
isCompleteQuery is indeed always true in ProcessUtilitySlow. A breakpoint here
while running my test case confirm this.

Maybe you were talking about isTopLevel? But this one doesn't seem considered
while defining if event triggers should trigger or not.

Anyway, if event trigger should not trigger during create/alter extension, I
suppose the original memory context bug that starts this discussion shouldn't
happen in the first place (but need to be fixed anyway), isn't it?

Regards,



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16610: server process was terminated by signal 11: Segmentation fault
Следующее
От: Markus Wanner
Дата:
Сообщение: Re: invalid alloc size error possible in shm_mq