Why does VACUUM FULL bother locking pages?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Why does VACUUM FULL bother locking pages?
Дата
Msg-id 20050916163925.GB6819@surnet.cl
обсуждение исходный текст
Ответы Re: Why does VACUUM FULL bother locking pages?  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Re: Why does VACUUM FULL bother locking pages?  ("Simon Riggs" <simon@2ndquadrant.com>)
Re: Why does VACUUM FULL bother locking pages?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hackers,

I'm reading the vacuum code and I just noticed that the routines
move_plain_tuple and move_chain_tuple expect the dest and source blocks
to be locked, and unlock them at exit.  The only caller of both is
repair_frag, whose only caller in turn is full_vacuum_rel.  Same thing
for update_hint_bits.

So, the only callers of both has already acquired appropiate locks at
the relation level -- nobody is going to be modifying the blocks while
they proceed.  So why bother locking the pages at all?  Is there a
reason or is this an historical accident?

-- 
Alvaro Herrera -- Valdivia, Chile         Architect, www.EnterpriseDB.com
"Puedes vivir solo una vez, pero si lo haces bien, una vez es suficiente"


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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: US Census database (Tiger 2004FE) - 4.4G
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Spinlocks, yet again: analysis and proposed patches