1

I have set up a standby server to follow a primary Postgres server following [this wiki page][1]. The issue is that I am not sure the primary server is sending anything to the replica because I don't see any walsending and walreciving processes on either server when I grep the process list:

[primary] $ ps -ef | grep sender
[standby] $ ps -ef | grep receiver

My recovery.conf file looks like this:

standby_mode = 'on'
primary_conninfo = 'host=${MASTER_PORT_5432_TCP_ADDR} port=5432 user=${REP_USER} password=${REP_PASS}'
trigger_file = '/tmp/promote_db_slave'
recovery_target_timeline = 'latest'

I know the connection is established between the two servers because pg_basebackup succeeds, and when I create the trigger file, the standby server is brought up to date with the base backup. But none of the changes in the primary are sent to the standby.

EDIT: my postgresql.conf in the primary server

listen_addresses = '*'
wal_level = hot_standby
max_wal_senders = 10
max_connections=100
checkpoint_segments = 8
wal_keep_segments = 8
archive_mode = on
archive_command = 'cp %p /var/lib/postgresql/archive/%f'

EDIT2:

I'm using this guide.

  • check pg_stat_replication – Craig Ringer Apr 9 '15 at 0:42
  • It comes up blank. I wonder if if my archive_command is the reason it's not working. I am pasing that into the post. Would appreciate your insight.. – picardo Apr 9 '15 at 0:46
  • No, pg_stat_replication only shows streaming replication connections, and only when queried on the master. So it'd be primary_conninfo that'd be the issue if anything. Check the log files. – Craig Ringer Apr 9 '15 at 1:37
  • Can you please help me figure out what is wrong? I created another post for the bizarre connection problems that I'm running into: dba.stackexchange.com/questions/97374/… – picardo Apr 9 '15 at 3:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.