> 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