Re: Making subscribers read only in Postgres 10 logical replication

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Making subscribers read only in Postgres 10 logical replication
Date: 2017-10-17 06:11:38
Message-ID: os46ui$rij$1@blaine.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

rverghese schrieb am 11.10.2017 um 20:38:
> You mean at the user permissions level? Yes, I could, but would mean doing so
> table by table, which is not our current structure. I guess there is nothing
> at the database level.

Not at the database level, but at the schema level:

You can revoke those privileges for all tables in a schema:

revoke insert,update,delete
on all tables in schema public
from the_user;

You can do that for all future tables as well:

alter default privileges
in schema public
revoke insert,update,delete on tables
from the_user;

Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Pryzby 2017-10-17 06:19:31 Re: Preventing psql from attempting to access ~/.pgpass file.
Previous Message Allan Kamau 2017-10-17 06:06:59 Preventing psql from attempting to access ~/.pgpass file.