Re: Event trigger and CREATE/ALTER ROLE/USER - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Event trigger and CREATE/ALTER ROLE/USER
Date
Msg-id CAMsr+YGo4d4cChjGi5HLoFmL-e2ZnHKoPthG8gHeXG7A6FfOkA@mail.gmail.com
Whole thread Raw
In response to Re: Event trigger and CREATE/ALTER ROLE/USER  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Event trigger and CREATE/ALTER ROLE/USER
Next
From: Tatsuo Ishii
Date:
Subject: Re: Event trigger and CREATE/ALTER ROLE/USER