Re: pgbackrest periodic WAL backups? - Mailing list pgsql-admin

From David Steele
Subject Re: pgbackrest periodic WAL backups?
Date
Msg-id fb4b6715-42db-958c-b79f-fe507f52b4d7@pgmasters.net
Whole thread Raw
In response to Re: pgbackrest periodic WAL backups?  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: pgbackrest periodic WAL backups?  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-admin
On 12/9/18 5:24 PM, Ron wrote:
> On 12/09/2018 01:10 PM, Stephen Frost wrote:
>>
>> You can address that risk by enabling archive_timeout, which will make
>> PostgreSQL archive the WAL file even if it isn't full after a certain
>> amount of time, reducing the potential data loss window.
> 
> I thought checkpoint_timeout forced a WAL switch.

Checkpoints do not automatically switch WAL.  archive_timeout is the way
to go.

Postgres >= 9.5 will mostly zero the remainder of the WAL and Postgres
>= 11 will entirely zero it.  Either way, compression works well.

For production systems I generally use archive_timeout=900 so a segment
is archived every 15 minutes when there is not enough activity to force
a switch naturally.  Note that if there is *zero* activity then there in
no need for a WAL switch but some older versions would do so anyway if
wal_level=hot_standby.  We fixed that in Postgres 10.

Regards,
-- 
-David
david@pgmasters.net


pgsql-admin by date:

Previous
From: David Steele
Date:
Subject: Re: pgbackrest periodic WAL backups?
Next
From: Ron
Date:
Subject: Re: pgbackrest periodic WAL backups?