public inbox for [email protected]  
help / color / mirror / Atom feed
PostgreSQL logical replication
2+ messages / 2 participants
[nested] [flat]

* PostgreSQL logical replication
@ 2024-11-12 10:46 Jayadevan M <[email protected]>
  2024-11-12 14:16 ` Re: PostgreSQL logical replication Ron Johnson <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Jayadevan M @ 2024-11-12 10:46 UTC (permalink / raw)
  To: pgsql-general

Hello all,

I am using PostgreSQL 16.4. I tried to set up logical replication with
"postgres" user and all worked fine.  Then I created a new user
(my_replication) to be used for the purpose and couldn't figure out which
privileges are necessary. Initially I got an error like "ERROR:  permission
denied for database mydb" . So I used GRANT CREATE ON DATABASE..and that
error disappeared. I have also executed...
ALTER USER my_replication WITH replication;
GRANT usage ON SCHEMA public TO my_replication;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO my_replication;
When I try
 CREATE PUBLICATION my_publication for table public.term;
I am getting an error
ERROR:  must be owner of table term

What privileges should be granted so that I can do
 CREATE PUBLICATION my_publication FOR TABLES IN SCHEMA public;

Regards,
Jayadevan


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PostgreSQL logical replication
  2024-11-12 10:46 PostgreSQL logical replication Jayadevan M <[email protected]>
@ 2024-11-12 14:16 ` Ron Johnson <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Ron Johnson @ 2024-11-12 14:16 UTC (permalink / raw)
  To: pgsql-general

The documentation tells you, down in the Notes section.

https://www.postgresql.org/docs/16/sql-createpublication.html

On Tue, Nov 12, 2024 at 5:46 AM Jayadevan M <[email protected]>
wrote:

> Hello all,
>
> I am using PostgreSQL 16.4. I tried to set up logical replication with
> "postgres" user and all worked fine.  Then I created a new user
> (my_replication) to be used for the purpose and couldn't figure out which
> privileges are necessary. Initially I got an error like "ERROR:  permission
> denied for database mydb" . So I used GRANT CREATE ON DATABASE..and that
> error disappeared. I have also executed...
> ALTER USER my_replication WITH replication;
> GRANT usage ON SCHEMA public TO my_replication;
> GRANT SELECT ON ALL TABLES IN SCHEMA public TO my_replication;
> When I try
>  CREATE PUBLICATION my_publication for table public.term;
> I am getting an error
> ERROR:  must be owner of table term
>
> What privileges should be granted so that I can do
>  CREATE PUBLICATION my_publication FOR TABLES IN SCHEMA public;
>
> Regards,
> Jayadevan
>
>

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-11-12 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-12 10:46 PostgreSQL logical replication Jayadevan M <[email protected]>
2024-11-12 14:16 ` Ron Johnson <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox