Re: Maximum number of WAL files in the pg_xlog directory - Mailing list pgsql-hackers

From Guillaume Lelarge
Subject Re: Maximum number of WAL files in the pg_xlog directory
Date
Msg-id CAECtzeWkDo9SaP2qB1aAubPJVG-FDOJrP_q2w-0PZ470-Fhk=Q@mail.gmail.com
Whole thread Raw
In response to Re: Maximum number of WAL files in the pg_xlog directory  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Maximum number of WAL files in the pg_xlog directory  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Sorry for my very late answer. It's been a tough month.

2014-11-27 0:00 GMT+01:00 Bruce Momjian <bruce@momjian.us>:
On Mon, Nov  3, 2014 at 12:39:26PM -0800, Jeff Janes wrote:
> It looked to me that the formula, when descending from a previously stressed
> state, would be:
>
> greatest(1 + checkpoint_completion_target) * checkpoint_segments,
> wal_keep_segments) + 1 + 
> 2 * checkpoint_segments + 1 

I don't think we can assume checkpoint_completion_target is at all
reliable enough to base a maximum calculation on, assuming anything
above the maximum is cause of concern and something to inform the admins
about.

Assuming checkpoint_completion_target is 1 for maximum purposes, how
about:

        max(2 * checkpoint_segments, wal_keep_segments) + 2 * checkpoint_segments + 2


Seems something I could agree on. At least, it makes sense, and it works for my customers. Although I'm wondering why "+ 2", and not "+ 1". It seems Jeff and you agree on this, so I may have misunderstood something.


--

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: REINDEX CONCURRENTLY 2.0
Next
From: Jeff Davis
Date:
Subject: Re: Compression of full-page-writes