Timeline history files can be needed multiple times, ok. My question
was about WAL files only.
I'm tempted to use a restore_command which does cp for history files
and mv for WAL files, to optimize performance and disk usage.
An AI told me that a second restore attempt for the same WAL file
could only happen if recovery is resumed after a crash.
Kind regards
Felix Hamme
On Fri, Mar 13, 2026 at 5:37 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> On Fri, 2026-03-13 at 09:35 +0100, Felix Hamme wrote:
> > Is it safe in general to use mv for wal files? In other words, do the
> > currently supported postgres versions run restore_command only once
> > per wal file?
>
> As you found out, no...
>
> Yours,
> Laurenz Albe