Search Postgresql Archives

pg_rewind - restore new slave failed to startup during recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I have 1 master and 1 slave wal streaming replication setup and the Application connects via a load balancer (LTM) where the all connections are redirected to the master member (master db).

 

We have archive_mode enabled.

 

I am trying to test to use pg_rewind to restore the new slave (old master) after a failover while the system is under load.

 

Here are the steps I take to test:

 

1.       Disable the master ltm member (all connections redired to slave member)

2.       Promote slave (touch promote.me)

3.       Stop the master db (old master)

4.       Do pg_rewind on the new slave (old master)

5.       Start the new slave.

 

 

Please see attached psql.jpg for the result from the pg_rewind.

 

 

However, when I tried to start the new slave, I am getting the error that it cannot locate the archive wal files and can not receive data from WAL stream error.

Please see attached  logs.jpg.

 

Checking the on the new master, I see that the check point that its trying to restore is the file 000000040000009C0000006F, but the file does not exist anywhere on the new master. Not in the pg_xlog or the archive folder. (as specified in the postgresql.conf)

 

Please see attached  psql.jpg.

 

 

Here is my recovery.conf :

 

standby_mode = 'on'

primary_conninfo = 'host=10.69.19.18  user=replicant’

trigger_file = '/var/run/promote_me'

restore_command = 'cp /pg_backup/backup/archive_sync/%f "%p"'

 

does anyone know why?

 

Under what conditions will pg_rewind wont’ work?

 

Thanks.

Regards

Dylan

 

Attachment: psql.jpg
Description: psql.jpg

Attachment: logs.jpg
Description: logs.jpg

Attachment: psql.jpg
Description: psql.jpg

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux