Skip site navigation (1) Skip section navigation (2)

Re: formula about the number of WAL files

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: formula about the number of WAL files
Date: 2010-10-28 01:30:44
Message-ID: AANLkTi=9=+CRA_GA2CTUYVHwBgbxDyVbgX3gU7x7fx_S@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-docs
On Fri, Oct 15, 2010 at 9:48 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Fri, 2010-10-15 at 19:44 +0900, Fujii Masao wrote:
>
>> As the result of the above, the maximum number of WAL files in
>> pg_xlog is
>>
>>     (2 + checkpoint_completion_target) * checkpoint_segments + 1
>>
>>     or
>>
>>     wal_keep_segments + checkpoint_segments + 1
>>
>> So the original description seems to be correct. Am I missing
>> something?
>
> After some thought, I agree.

I've put back the original formula.

>> # My previous proposal is definitely wrong. Sorry for noise.
>
> I'd say the definition of wal_keep_segments isn't good, which is what is
> causing the problem here. Will sort that out another day.
>
> I will update the current code with some comments, so this doesn't
> happen again. Will do this on Tuesday now, no time left here.

This is probably a good idea, because the comments in xlog.c are a bit
sparse on this point, but I haven't tried to do it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

pgsql-docs by date

Next:From: Peter EisentrautDate: 2010-10-28 18:59:23
Subject: Re: Additional index entries and table sorting
Previous:From: Robert HaasDate: 2010-10-27 01:46:44
Subject: Re: [NOVICE] Asynchronous I/O in Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group