Re: PITR and instance without any activity - Mailing list pgsql-general

From Adrien Nayrat
Subject Re: PITR and instance without any activity
Date
Msg-id dd87f8f4-924f-7a10-fab6-5f41b08e4f17@anayrat.info
Whole thread Raw
In response to Re: PITR and instance without any activity  (Torsten Förtsch <tfoertsch123@gmail.com>)
List pgsql-general
On 1/9/23 11:23, Torsten Förtsch wrote:
> On Mon, Jan 9, 2023 at 10:59 AM Adrien Nayrat 
> <adrien.nayrat@anayrat.info <mailto:adrien.nayrat@anayrat.info>> wrote:
> 
> 
>     * We can't perform PITR on a cluster without any activity since 13
>     * It seems creating restore point doesn't record a timestamp in wal.
> 
> I have a cron job that runs this every 5 minutes:
> 
> SELECT txid_current() WHERE 
> (pg_last_committed_xact()).timestamp+'5min'::INTERVAL < now()
> 
>   Combine that with a suitable value for archive_timeout.

Hello,

I don't get how it could be useful ?
When we perform PITR, we don't know if there was activity or not.

-- 
Adrien NAYRAT





pgsql-general by date:

Previous
From: Vikas Sharma
Date:
Subject: Re: Best opensource Postgresql monitoring tool
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Disallow execution of shell commands from psql