简体   繁体   中英

Recover Postgres Streaming Replication Slave from Archived Wal Logs

I have set up a Postgres Hot Standby server by Streaming Replication. But My Standby server is asking for an old wal archive log which is currently not in Master's pg_xlog directory. But the file exists in the wal archive backup directory.

How can I configure Standby to read this file from backup directory? Or any way to manually copy this file to Standby Server ?

Any help will be appreciated.

You would have to add a restore_command to recovery.conf that can restore files from the WAL archive.

Then restart the standby, and it should be able to recover.

When the standby cannot get the required WAL via streaming replication, it tries restore_command . When that fails, it tries streaming replication again, and so on in an endless loop.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM