| От | Decibel! |
|---|---|
| Тема | Re: buffer page lock vs tuple lock (?) |
| Дата | |
| Msg-id | 20070808222021.GC20424@nasby.net обсуждение |
| Ответ на | buffer page lock vs tuple lock (?) (Luca Ferrari <fluca1978@infinito.it>) |
| Список | pgsql-novice |
On Tue, Aug 07, 2007 at 09:52:40AM +0200, Luca Ferrari wrote: > Hi, > if I get it right a heap buffer page (that contains several tuples) requires a > pin and a lock to access the page content, and a change to a tuple requires a > lock on the tuple too. Disregarding some cases (tuple shuffling within the > same page and vacuum) does not this double locking be too much? I mean, does > not suffice to pin the page and lock the tuple (e.g., reading)? > Can anybody help me understanding? There's two different types of locking involved here. The page locking mechanism is strictly internal-only, and is used only to ensure that data on a page can't be corrupted by concurrent operations. But there's a number of operations that can modify a page, many of which will never acquire any row locks. Row locks OTOH are used for transaction isolation. The two concepts are actually separate. -- Decibel!, aka Jim Nasby decibel@decibel.org EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера