Postgres - Revoke database acess from user, but allow replication acess
-
07-01-2021 - |
Question
The DB have a replication server, i need to revoke the permission on the user "user_bi" but allow the acess of this same user on the replication server!
REVOKE ALL ON ALL TABLES IN SCHEMA public FROM user_bi; -- on master.
This replicate the revoke to the slave.
GRANT SELECT ON ALL TABLES IN SCHEMA public FROM user_bi; -- on the slave.
This returns a error "SQL Error [25006]: ERROR: cannot execute GRANT in a read-only transaction".
- Can i revoke the permissions in only one databank ?
Solution
I denied the acess by IP on the pg_hba.conf file.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange