Re: Automatic cleanup of oldest WAL segments with pg_receivexlog

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Automatic cleanup of oldest WAL segments with pg_receivexlog
Date: 2017-02-23 13:54:03
Message-ID: 20170223135401.GT9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Micahel,

* Michael Paquier (michael(dot)paquier(at)gmail(dot)com) wrote:
> Is there any interest for a feature like that? I have a non-polished
> patch at hand but I can work on that for the upcoming CF if there are
> voices in favor of such a feature. The feature could be simply
> activated with a dedicated switch, like --clean-oldest-wal,
> --clean-tail-wal, or something like that.

This sounds interesting, though I wouldn't base it on the amount of free
space on the partition but rather some user-set value (eg:
--max-archive-size=50GB or something).

I am a bit dubious about it in general though. WAL that you don't have
a base backup for or a replica which needs it is really of very limited
value. I understand your suggestion that it could be used for
'debugging', but that really seems like a stretch to me. I would also
be concerned that people would set up their systems using this without
fully understanding it, or being prepared to handle what happens when it
kicks in and starts removing WAL that maybe they should have kept for a
base backup or a replica. At least if we start failing when the
partition is full then they have alerts telling them that the partition
is full and they have a base backup and WAL to bring it forward to
almost current.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-02-23 14:20:58 Re: Make subquery alias optional in FROM clause
Previous Message Michael Paquier 2017-02-23 13:44:53 Re: Other formats in pset like markdown, rst, mediawiki