Freezing tuples on pages dirtied by vacuum

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Freezing tuples on pages dirtied by vacuum
Дата
Msg-id 20060719230753.GE83250@pervasive.com
обсуждение исходный текст
Ответы Re: Freezing tuples on pages dirtied by vacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Currently, the loop in vacuumlazy.c that scans through the tuples on a
page checks each tuple to see if it needs to be frozen (is it's Xmin
older than half-way to wrap-around).

ISTM that as soon as vacuum dirties a page, it might as well update all
tuples it can (any where Xmin < GetOldestXmin()), since that won't take
much time compared to the cost of writing the page out. This would help
prevent the need to dirty the page in the distant future for no reason
other than to freeze tuples. Granted, the old code/checks would still
have to stay in place to ensure that tuples were vacuumed before they
got too old, but that's not much overhead compared to writing the page
to disk.

Comments? If people think this is a good idea I should be able to come
up with a patch.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How does the planner deal with multiple possible indexes?
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Max size of a btree index entry