From: Dean Gibson (DB Administrator) <postgresql@mailpen.com>
To: pgsql-performance@lists.postgresql.org
Subject: Re: Estimating wal_keep_size
Date: Fri, 18 Jun 2021 11:13:14 -0700
Message-ID: <0df7b2f6-411a-6d9b-873d-6150fcfcc2f4@mailpen.com> (raw)
In-Reply-To: <20210617010222.lho6zrgnkkkqyyxp@nol>
References: <471a6e7d-928e-c899-bf9f-341ae79b04ea@mailpen.com>
<20210617010222.lho6zrgnkkkqyyxp@nol>
On 2021-06-16 18:02, Julien Rouhaud wrote:
> On Wed, Jun 16, 2021 at 05:36:24PM -0700, Dean Gibson (DB Administrator) wrote:
>> Is this reasonable thinking?
>>
>> I'd think that one would want a *wal_keep_size* to cover the pending updates while the standby server might be unavailable, however long one might anticipate that would be.
> It's usually a better approach to use a replication slot, to keep all the required WAL files, and only when needed. See https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS for more details.
>
> Note that a replication slot will keep all WAL files, which might eventually lead to an outage if the standby doesn't come back before the filesystem containing the logs get full. You can cap the maximum amount of retained WAL files since pg 13 using max_slot_wal_keep_size, see
> https://www.postgresql.org/docs/current/runtime-config-replication.html#GUC-MAX-SLOT-WAL-KEEP-SIZE.
Granted, but the same question arises about the value for
max_slot_wal_keep_size. Setting either too low risks data loss, &
setting either too high results in unnecessary disk space used. The
question was, is the estimated VALUE reasonable under the circumstances?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: postgresql@mailpen.com, pgsql-performance@lists.postgresql.org
Subject: Re: Estimating wal_keep_size
In-Reply-To: <0df7b2f6-411a-6d9b-873d-6150fcfcc2f4@mailpen.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox