Re: WAL directory size calculation

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: WAL directory size calculation
Дата
Msg-id CAMkU=1y+8y7Z2vFDCyjzBKpJHur5=AXXzvrsS6TkOX+RtJbTBg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WAL directory size calculation  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
On Thu, Jul 28, 2016 at 6:33 AM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> On Thu, Jul 28, 2016 at 9:25 AM, Moreno Andreo <moreno.andreo@evolu-s.it>
> wrote:
>>
>> I've read somewhere that the formula should be 16 MB * 3 *
>> checkpoint_segment in size.
>
> [...]
>
>>
>> Using the above formula I have:
>>     16 MB * 3 * 1 GB
>> that leads to to ... uh .. 48000 TB?
>
>
> You seem to be mis-remembering the formula.
>
> checkpoiint_segments is a quantity (i.e., unit-less), not a size.  Saying
> its "1GB" makes no sense.

Right, that doesn't make any sense.

> I'm also doubting you multiply it by 3 - add three to it maybe...

No, multiplying by 3 is roughly correct.  A log file can't be
recycled/removed until there have been 2 checkpoints started and
completed.   And if you have checkpoint completion target set to high
value, the 2nd checkpoint will complete just before the 3rd one will
be triggered to start.  So that means you have 3 * checkpoint_segments
worth of segment.

Cheers,

Jeff


В списке pgsql-general по дате отправления:

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: My Postgresql is inaccessible in Windows 8.1
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: WAL directory size calculation