HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

PostgreSQL 9.1, how to restore a Hot Standby Slave w/o any Wal Files?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlhowslaveanystandbyfileshotwalrestore

Problem

I have a PostgreSQL 9.1 hot standby slave that had all of its wal files removed. How can I restart the standby server and have the slave resync from the master? Thanks

Solution

If the WAL files don't exist anymore anywhere, you need to rebuild the standby from scratch (new base backup). If you still have the WAL files on the master or in an archive somewhere, just change the restore_command in recovery.conf to fetch them from wherever they are.

Context

StackExchange Database Administrators Q#34523, answer score: 4

Revisions (0)

No revisions yet.