Re: SSI patch version 8

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: SSI patch version 8
Дата
Msg-id 4D2F13FD.3070009@enterprisedb.com
обсуждение исходный текст
Ответ на Re: SSI patch version 8  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: SSI patch version 8  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: SSI patch version 8  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On 13.01.2011 16:51, Kevin Grittner wrote:
> Right.  As each tuple is read we need to ensure that there is a
> predicate lock to cover it.  Since finer-grained locks can be
> combined into coarser-grained locks we need to start with the fine
> grained and move toward checking the coarser grains, to avoid
> missing a lock during promotion.  So for each tuple we calculate a
> hash, find a partition, lock it, and lookup the tuple as a lock
> target.  When that's not found we do the same thing for the page.
> When that's not found we do the same thing for the relation.
>
> But we acquired a relation lock up front, when we determined that
> this would be a heap scan, so we could short-circuit this whole
> thing if within the heapgettup_pagemode function we could determine
> that this was a scan of the whole relation.

That sounds simple enough. Add a boolean field to HeapScanDesc, 
"rs_relpredicatelocked", and set it when you acquire the relation lock.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI patch version 8
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI patch version 8