-
-
Notifications
You must be signed in to change notification settings - Fork 152
Adding a new table to the replication server
Mike Lissner edited this page Dec 22, 2023
·
1 revision
There are a couple things to think about while adding a new table to make it available across all replicas.
The subscription (publication?) on the replica is for all tables and the user that subscribes is the django user, so all you have to do is go to the subscriber (replica), and do:
alter subscription from_prod_to_replica2 refresh publication;
These only subscribe to certain tables and only have access to certain tables. To add a table to them:
-
Tweak the publication on our server:
alter publication opendata_clientname add table only xyz, abc;
-
Allow the user select access on the table (note that this must be done as the postgres user!):
GRANT SELECT on table xyz, abc to some-user ;
You can get the name of the users with:
SELECT rolname FROM pg_roles;
-
Refresh the publication on the subscriber:
ALTER SUBSCRIPTION some-subscription REFRESH PUBLICATION;
https://github.com/freelawproject/courtlistener/issues/1561