Re: PreallocXlogFiles

Поиск
Список
Период
Сортировка
От Gavin Sherry
Тема Re: PreallocXlogFiles
Дата
Msg-id Pine.LNX.4.58.0407220929210.6882@linuxworld.com.au
обсуждение исходный текст
Ответ на PreallocXlogFiles  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: PreallocXlogFiles
Список pgsql-hackers
On Wed, 21 Jul 2004, Simon Riggs wrote:

> I notice this:
>
> When a checkpoint occurs, if a log file is more than 75% full then a new
> file will be allocated (in PreallocXlogFiles).
>
> This assumes we checkpoint at least 4 times per log file, otherwise it
> will be effectively random whether we actually ever do this or not. With
> an uneven or bursty workload, we would need to checkpoint many more
> times per xlog to even notice this is ever being called. (I never have).
>
> ...but we don't check that anywhere in the code.

I prefer the idea of just checking it more often than pulling the code out
all together. I think this sits well with Jan's work on consistent
availability (buffer manager, vacuum delay).

The question is, where to call it from. Its possible that the buffer
manager may have enough information to guess how often a new checkpoint
file should be preallocated. The alternative would be to have (yet
another) backend look after this.

Or, maybe the autovacuum backend could look after this. It would have
access to stats which may be useful but it would mean that people would
have to run autovacuum if they wanted checkpoints preallocated.

Thanks,

Gavin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Why we really need timelines *now* in PITR
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PreallocXlogFiles