Re: Debugging deadlocks

Поиск
Список
Период
Сортировка
От Paul Tillotson
Тема Re: Debugging deadlocks
Дата
Msg-id 424E0DFF.6000702@shentel.net
обсуждение исходный текст
Ответ на Re: Debugging deadlocks  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: Debugging deadlocks  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
>>I suppose there must be reasons not to do this, but have you considered
>>using the "slack" space (empty space) in an ordinary table "heap" page
>>to store share-locks on the tuples in that page?  (If not enough space
>>is available then you would still need to use the spilled-to-disk btree
>>structure.)
>>
>>
>
>No, I hadn't considered it.  However this seems hard to do, because the
>"slack space" does not have a start point; on each page, elements
>(tuples) grow from the back to the front, while element pointers grow
>in the reverse direction.  So I don't see how would this be done.
>
>
Would it work for an updater, who finds that the locks list (currently
located in the middle of the empty space) is "in the way" of a new tuple
that he wants to insert, to take some kind of lock, move the whole list
up or down (spilling some of these locks to the disk if no more space is
available), and release it again?

Could the lock(s) on a particular tuple be tacked onto the end of that
tuple?  (I think tuples are stored variable-width anyway, aren't they?)
I suppose this is conceptually equivalent to adding a variable width
system column which gets TOASTED when it gets too wide.  I suppose this
would make taking a lock as expensive as doing an update, though, right?

Paul Tillotson


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 8.0.2 Beta Available
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: plPHP in core?