Re: Simulate a PITR in postgresql 16

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: Franklin Anderson de Oliveira Souza <franklinbr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Simulate a PITR in postgresql 16
Date: 2025-06-30 21:03:31
Message-ID: aGL7o4j8hx7ZtEh9@elch.exwg.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

## Franklin Anderson de Oliveira Souza (franklinbr(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message raphi 2025-07-01 04:35:37 Re: Simulate a PITR in postgresql 16
Previous Message Adrian Klaver 2025-06-30 20:43:12 Re: Simulate a PITR in postgresql 16