Re: Simulate a PITR in postgresql 16 - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: Simulate a PITR in postgresql 16
Date
Msg-id aGL7o4j8hx7ZtEh9@elch.exwg.net
Whole thread Raw
In response to Simulate a PITR in postgresql 16  (Franklin Anderson de Oliveira Souza <franklinbr@gmail.com>)
List pgsql-general
## Franklin Anderson de Oliveira Souza (franklinbr@gmail.com):

> LOG: database system was shut down at 2025-06-30 12:15:28 -04
> cp: cannot stat '/dados/temp/wals/00000002.history': No such file or directory
> -----------------
> 
> 
> The restore_command requires the .history file but it does not exist
> in any of the clusters in this simple test, which is wrong in this
> example ? Tanks

Everything is fine - as long as the next log line starts with "starting
backup recovery". Your cluster starts on timeline 1, and the (default)
recovery_target_timeline is "latest", so the recovery process needs
to check if other timelines exist and what the latest timeline is.
It's just that the stderr from cp ends up in your log.
See
https://www.postgresql.org/docs/17/continuous-archiving.html#BACKUP-TIMELINES
for details on timelines.

Regards,
Christoph

-- 
Spare Space



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Simulate a PITR in postgresql 16
Next
From: raphi
Date:
Subject: Re: Simulate a PITR in postgresql 16