From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net> |
Subject: | Re: pgbackrest periodic WAL backups? |
Date: | 2018-12-10 13:37:59 |
Message-ID: | fb4b6715-42db-958c-b79f-fe507f52b4d7@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)pgmasters(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2018-12-10 14:19:27 | Re: pgbackrest periodic WAL backups? |
Previous Message | David Steele | 2018-12-10 13:31:14 | Re: pgbackrest periodic WAL backups? |