Re: Event trigger and CREATE/ALTER ROLE/USER
От | Craig Ringer |
---|---|
Тема | Re: Event trigger and CREATE/ALTER ROLE/USER |
Дата | |
Msg-id | CAMsr+YGo4d4cChjGi5HLoFmL-e2ZnHKoPthG8gHeXG7A6FfOkA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Event trigger and CREATE/ALTER ROLE/USER (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Список | pgsql-hackers |
<p dir="ltr"><p dir="ltr">On 14 Sep. 2016 9:44 am, "Alvaro Herrera" <<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>wrote:<br /> ><br /> > Tatsuo Ishii wrote:<br/> > > Simple question: Is there any reason for event trigger to not support<br /> > > CREATE/ALTERROLE/USER?<br /> ><br /> > As I understand the issue, the main reason is that event triggers<br /> >execute procedures, and those exist in a single database only. If you<br /> > were to create an event trigger indatabase A, then a user gets created<br /> > in database B, your function would not be invoked, which becomes a<br />> problem.<br /><br /> Yeah... You'd need something at the C level as a hook because you can't rely on pg_proc etc.<pdir="ltr">For BDR I've been thinking of optionally replicating such actions using a ProcessUtility_hook and deparseor simply verbatim sql capture. Then replicating via generic logical wal messages.
В списке pgsql-hackers по дате отправления: