Background: for various reasons I am switching PostgreSQL Slave from a Streaming replication to a warm standby replication.
The streaming replication was setup using this guide: http://technology.trapeze.com/journal/postgresql-streaming-replication-ubuntu-1004/
To make the switch to a warm standby: I am following instructions for warm standby here (1) https://wiki.postgresql.org/wiki/Warm_Standby and here (2) http://www.postgresql.org/docs/current/static/pgstandby.html
I am finding that on the slave there are more log files in pg_xlog/
than in wal_archive/ (files sent from Master). How is that possible? I think it's hindering my warm setup.
- in /var/lib/postgresql/9.3/main/pg_xlog/ of Master I have files from 000000010000000000000001 to 00000001000000000000001A.backup to 00000001000000000000001C
- in /var/lib/postgresql/wal_archive/ of Slave I have files from 000000010000000000000001 to 00000001000000000000001A.backup to 00000001000000000000001B
- in /var/lib/postgresql/9.3/main/pg_xlog/ of Slave I have files from 00000001000000000000001C to 000000010000000000000023
recovery.conf
contains:
restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 [/wal_archive] %f %p %r 2>>standby.log'
when I restart the Slave it complains that it is missing the xxx1C
log file
First question, how is it possible for the Slave to have more pg_xlog/
log files than the Master?
Second question, to resync the servers in warm standby mode: do I have to do pg_basebackup
again (to essentially copy Master's /data
and /pg_xlog
directory) to the Slave?
Just trying to understand PostgreSQL :) Thanks in advance!!
I found a very similar question here, that seems to have never been answered: http://www.postgresql.org/message-id/CAE7ByhgTJ6xOe4f3aa42Kn0_5gfEzWW1FZ9QQqsC6RP-Fnh_ow@mail.gmail.com
standby.log