Re: Hot standby, RestoreBkpBlocks and cleanup locks

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Hot standby, RestoreBkpBlocks and cleanup locks
Дата
Msg-id 1231785200.12246.0.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Hot standby, RestoreBkpBlocks and cleanup locks  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Please commit soon....

On Fri, 2009-01-09 at 18:30 +0200, Heikki Linnakangas wrote:
> The hot standby patch has some hacks to decide which full-page-images 
> can be restored holding an exclusive lock and which ones need a 
> vacuum-strength lock. It's not very pretty as is, as mentioned in 
> comments too.
> 
> How about we refactor things so that redo-functions are responsible for 
> calling RestoreBkpBlocks? The redo function can then pass an argument 
> indicating what kind of lock is required. We should also change 
> XLogReadBufferExtended so that it doesn't lock the page; the caller 
> knows better what kind of a lock it needs. That makes it more analogous 
> with ReadBufferExtended too, although I think we should keep 
> XLogReadBuffer() unchanged for now.
> 
> See attached patch. One shortfall of this patch is that you can pass 
> only one argument to RestoreBkpBlocks, but there can multiple backup 
> blocks in one WAL record. That's OK in current usage, though.
> 
-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: "Robert Haas"
Дата:
Сообщение: Re: Recovery Test Framework
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Recovery Test Framework