Re: [HACKERS] Automatic cleanup of oldest WAL segments with pg_receivexlog - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Automatic cleanup of oldest WAL segments with pg_receivexlog
Date
Msg-id CAB7nPqT8ucdLFR3ir==ocu5iDgzLFDqCHOXF=UpX25wpGKuubg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Automatic cleanup of oldest WAL segments withpg_receivexlog  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Automatic cleanup of oldest WAL segments withpg_receivexlog  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Thu, Mar 9, 2017 at 10:54 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 3/7/17 11:16, Robert Haas wrote:
>> Well, if the problem you're trying to solve is "retain WAL for as long
>> as possible without running out of disk space and having everything go
>> kablooey", then it would solve that problem, and I think that's a very
>> reasonable problem to want to solve.
>
> Could be.  I'm not sure what that means for the presented patch, though.
>  Or whether it addresses Michael's original use case at all.

The patch adding an end-segment command does address my problem,
because I just want to be sure that there is enough space left on disk
for one complete segment. And that's fine to check for that when the
last segment is complete. This needs some additional effort but that's
no big deal either.

Having something like --limit-retained-segments partially addresses
it, as long as there is a way to define an automatic mode, based on
statvfs() obviously.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] CREATE/ALTER ROLE PASSWORD ('value' USING 'method')
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Enabling replication connections by default in pg_hba.conf