Re: Autovacuum and OldestXmin

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Autovacuum and OldestXmin
Дата
Msg-id 1195757417.4246.252.camel@ebony.site
обсуждение исходный текст
Ответ на Re: Autovacuum and OldestXmin  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Autovacuum and OldestXmin  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
On Thu, 2007-11-22 at 13:21 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > Why isn't VACUUM optimised the same way HOT is?
> 
> It doesn't do the same things HOT does.

Thanks for the enlightenment :-)

Clearly much of the code in heap_page_prune_opt() differs, yet the test
for if (!PageIsPrunable(...)) could be repeated inside the main block
scan loop in lazy_scan_heap().

My thought-experiment:

- a long running transaction is in progress
- HOT cleans a block and then the block is not touched for a while, the
total of all uncleanable updates cause a VACUUM to be triggered, which
then scans the table, sees the block and scans the block again
because...

a) it could have checked !PageIsPrunable(), but didn't

b) it is important that it attempt to clean the block again for
reason...?

Seems like the thought experiment could occur frequently.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Autovacuum and OldestXmin
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Autovacuum and OldestXmin