Re: opportunistic tuple freezing

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: opportunistic tuple freezing
Дата
Msg-id 407d949e0908161943l36e9a7dbj1f8dfa07ce0be43e@mail.gmail.com
обсуждение исходный текст
Ответ на opportunistic tuple freezing  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: opportunistic tuple freezing  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Mon, Aug 17, 2009 at 2:32 AM, Jeff Davis<pgsql@j-davis.com> wrote:
>
> This patch introduces a GUC vacuum_freeze_opportunistic_ratio. If one
> tuple on a page is frozen by vacuum, it effectively multiplies
> vacuum_freeze_min_age by vacuum_freeze_opportunistic_ratio and uses that
> lower (more aggressive) value only for the current page.

I thought Josh's idea to apply this opportunistic threshold if the
page is already dirty for any reason was a good idea. Ie, if some
other dml or hint bit was set since the page was loaded even if vacuum
doesn't find any tuples are freezable.

So basically I think the logic should be:

normal-vacuum-processing
if (page-is-clean) try-to-freeze(normal-threshold)
if (page-is-dirty)  try-to-freeze(opportunistic-threshold)

Sure it's duplicated work but I don't think it will add up to much.
The normal pass could remember the oldest xid found and we could skip
the second pass if the oldest xid is still too young.

-- 
greg
http://mit.edu/~gsstark/resume.pdf


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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Encoding issues in console and eventlog on win32
Следующее
От: Greg Stark
Дата:
Сообщение: Re: opportunistic tuple freezing