Thread: Patch: doc for pg_logical_emit_message()
Hi, Hackers pg_logical_emit_message() can be used by any user, but the following document says that it can be used by only superuser. > Table 9.88. Replication SQL Functions > Use of these functions is restricted to superusers. I think that pg_logicl_emit_message() should be used by any user. Therefore, I attach the document patch. Ryo Matsumura
Attachment
On Fri, Apr 19, 2019 at 3:21 PM Matsumura, Ryo <matsumura.ryo@jp.fujitsu.com> wrote: > > Hi, Hackers > > pg_logical_emit_message() can be used by any user, > but the following document says that it can be used by only superuser. > > > Table 9.88. Replication SQL Functions > > Use of these functions is restricted to superusers. > > I think that pg_logicl_emit_message() should be used by any user. > Therefore, I attach the document patch. Thanks for the patch! Use of not only pg_logical_emit_message() but also other replication functions in Table 9.88 is not restricted to superuser. For example, replication role can execute pg_create_physical_replication_slot(). So I think that the patch should fix also the description for those replication functions. Thought? Regards, -- Fujii Masao
On Tue. Apr. 23, 2019 at 02:59 AM Masao, Fujii <masao.fujii@gmail.com> wrote: Thank you for the comment. > So I think that the patch should fix also the description for those > replication functions. Thought? I think so too. I attach a new patch. Regards Ryo Matsumura
Attachment
On Wed, Apr 24, 2019 at 11:12 AM Matsumura, Ryo <matsumura.ryo@jp.fujitsu.com> wrote: > > On Tue. Apr. 23, 2019 at 02:59 AM Masao, Fujii > <masao.fujii@gmail.com> wrote: > > Thank you for the comment. > > > So I think that the patch should fix also the description for those > > replication functions. Thought? > > I think so too. > I attach a new patch. Thanks for updating the patch! + Use of functions for replication origin is restricted to superusers. + Use of functions for replication slot is restricted to superusers and replication roles. "replication role" is a bit confusing. For example, we have "replication role" related to session_replication_role. So I think it's better to use something like "users having <literal>REPLICATION</literal> privilege". + Only <function>pg_logical_emit_message</function> can be used by any users. Not any user, I think. For example, what about a user not having EXECUTE privilege on pg_logical_emit_message function? I don't think that this description only for pg_logical_emit_message is necessary. Regards, -- Fujii Masao
On Wed. Apr. 24, 2019 at 11:40 PM Masao, Fujii <masao.fujii@gmail.com> wrote: Thank you for the comment. I understand about REPLICATION privilege and notice my unecessary words. I update the patch. Regards Ryo Matsumura
Attachment
On Fri, Apr 26, 2019 at 10:52 AM Matsumura, Ryo <matsumura.ryo@jp.fujitsu.com> wrote: > > On Wed. Apr. 24, 2019 at 11:40 PM Masao, Fujii > <masao.fujii@gmail.com> wrote: > > Thank you for the comment. > I understand about REPLICATION privilege and notice my unecessary words. > I update the patch. Thanks! Pushed. Regards, -- Fujii Masao
On Thu. May. 9, 2019 at 01:48 AM Masao, Fujii <masao.fujii@gmail.com> wrote: > Thanks! Pushed. Thank you. Regards Ryo Matsumura