Followed this guide to do the PostgreSQL replication:
I didn't do this:
psql -c "select pg_start_backup('initial_backup');" rsync -cva --inplace --exclude=*pg_xlog* /var/lib/postgresql/9.1/main/ slave_IP_address:/var/lib/postgresql/9.1/main/ psql -c "select pg_stop_backup();"
After I configed both master and slave nodes, test to create a table on master, didn't find new data been synced to slave.
From this guide I saw need to add a
archive_command config in the
archive_command = 'cp %p /var/lib/pgsql/archive/%f'
But PostgreSQL 9.6 maybe not support that feature. So how can it been synced automatically?