| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Additional info for CREATE ROLE with REPLICATION |
| Date: | 2025-11-26 02:21:44 |
| Message-ID: | 8B56D47F-6310-46FE-AF8B-1E58C7399D51@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Nov 26, 2025, at 05:45, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> wrote:
>
> When a logical replication is created and a ROLE with REPLICATION clause is used for that, there is no info on [0] that that role needs to have read permission on those tables. CREATE PUBLICATION and CREATE SUBSCRIPTION commands works as expected but replication doesn't work, only a "access denied" is added on logs.
>
> So it would be good to explain that a GRANT is needed.
>
> [0] - https://www.postgresql.org/docs/current/sql-createrole.html
>
> regards
> Marcos
>
> <0001-Master - Additional info for create role with REPLICATION.diff>
Hi Marcos,
The statement you added is correct, however I don’t think it is the right place to add the statement, “create role” just describes how to assign the replication attribute.
On I found that in logical-replication.html, there is an explanation already:
```
<para>
In order to be able to copy the initial table or sequence data, the role
used for the replication connection must have the <literal>SELECT</literal>
privilege on a published table or sequence (or be a superuser).
</para>
```
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2025-11-26 02:33:16 | Re: [Proposal] Adding TRIM_SPACE option to COPY |
| Previous Message | Euler Taveira | 2025-11-26 02:15:21 | Re: log_min_messages per backend type |