I have setup my replication as per https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps.
When I start my slave and check for logs, it says
2016-03-17 04:03:02 UTC LOG: shutting down 2016-03-17 04:03:02 UTC LOG: database system is shut down 2016-03-17 04:03:03 UTC LOG: database system was shut down in recovery at 2016-03-17 04:03:02 UTC 2016-03-17 04:03:03 UTC LOG: entering standby mode 2016-03-17 04:03:03 UTC LOG: redo starts at 2D/57000210 2016-03-17 04:03:03 UTC LOG: consistent recovery state reached at 2D/57014BE8 2016-03-17 04:03:03 UTC LOG: invalid record length at 2D/57014BE8 2016-03-17 04:03:03 UTC LOG: database system is ready to accept read only connections 2016-03-17 04:03:03 UTC LOG: started streaming WAL from primary at 2D/57000000 on timeline 1 2016-03-17 04:03:03 UTC LOG: incomplete startup packet
My pg_hba.conf entry is as follows:
host replication replication 10.50.80.12/32 trust
My recovery.conf is as follows:
standby_mode = 'on'
primary_conninfo = 'host=10.50.80.11 port=5432 user=replication password=replication'
But when I do,
SELECT *
FROM pg_stat_replication;
nothing is shown.
Please help if I am missing something.
Also, do I have to create the databases in slave as in master?