Re: HELP!!! The WAL Archive is taking up all space - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: HELP!!! The WAL Archive is taking up all space
Date
Msg-id CAB7nPqQ5TYa3jq0vY8XCnpehbCWWTQGn3zEmEGgufYoGQMxRrQ@mail.gmail.com
Whole thread Raw
In response to HELP!!! The WAL Archive is taking up all space  (FattahRozzaq <ssoorruu@gmail.com>)
List pgsql-hackers
On Tue, Dec 8, 2015 at 7:33 PM, FattahRozzaq <ssoorruu@gmail.com> wrote:
> The WAL archive is at /home/postgres/archive/master/, right?
> This directory consume more than 750GB of Disk-1.
> Each segment in the /home/postgres/archive/master/ is 16MB each
> There are currently 47443 files in this folder.
>
> I want to limit the total size use by WAL archive to around 200-400 GB.

This kind of question is more adapted for pgsql-general. pgsql-hackers
is where happens discussions related to features and development.

There is no magic value. This depends on the data policy retention you
want to have for your backups. More information here:
http://www.postgresql.org/docs/devel/static/continuous-archiving.html
If you don't need this many segments, you should just decrease it. If
you need more, buy more disk space.

> Do I set the segment too big?
> wal_keep_segments = 4096
> What value should I set for it?

That's a lot, but it depends on what you seek, leading to up to 200GB
of WAL segments. Here this would be useful if you expect to be able to
recover with large instances, aka a base backup takes a lot of time,
and the standby that replays behind will be able to connect to its
root note within this interval of segments.
-- 
Michael



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Double linking MemoryContext children
Next
From: "David G. Johnston"
Date:
Subject: Re: HELP!!! The WAL Archive is taking up all space