4 First set the configuration options in postgresql.conf:
7 The other required settings have default values that are sufficient for
10 pg_hba.conf needs to be adjusted to allow replication (the values here
11 depend on your actual network configuration and user you want to use
13 host all repuser 0.0.0.0/0 md5
15 Then on the publisher database:
16 CREATE PUBLICATION mypub FOR TABLE users, departments;
18 And on the subscriber database:
19 CREATE SUBSCRIPTION mysub CONNECTION 'dbname=foo host=bar user=repuser' PUBLICAT
22 The above will start the replication process, which synchronizes the
23 initial table contents of the tables users and departments and then
24 starts replicating incremental changes to those tables.