Re: How to Straming replication chatch up from archive - Mailing list pgsql-general

From Filip Sedlák
Subject Re: How to Straming replication chatch up from archive
Date
Msg-id 188cbb21-7278-4d2a-ae41-f6bc6bd67aca@sedlakovi.org
Whole thread Raw
In response to How to Straming replication chatch up from archive  (marco.ptz@tiscali.it)
List pgsql-general
 > if the master overwrite the wal BEFORE they are sent to the standby via
 > replication, does the standby *automatically* start looking in WAL
 > archive destination?
 > Or this step have to be made by hand?

I understand it works this way: normally, the replica tries to stream 
from master. If it is not able to (for example, the requested WAL has 
been already rotated), then it tries to call the restore_command.

See 
https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-PITR-RECOVERY

So you just need to specify where the older WALs are. For example

     restore_command = 'cp /mnt/nfs/archivedir/%f %p'

assuming the server has a similar archive_command that stores WALs into 
that directory.

--
Filip Sedlák




pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: vacuumdb did not analyze all tables?=
Next
From: Sean Flaherty
Date:
Subject: Re: Increased storage size of jsonb in pg15