Re: Reducing some DDL Locks to ShareLock

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Reducing some DDL Locks to ShareLock
Дата
Msg-id 1226275881.27904.281.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: Reducing some DDL Locks to ShareLock  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Reducing some DDL Locks to ShareLock  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 2008-11-09 at 17:12 -0500, Tom Lane wrote:

> Reviewing away ...

Thanks for reviewing.

> There's a fairly serious problem...

...

> Any thoughts about the best way to do it?  My immediate inclination is
> to use heap_lock_tuple but it's a bit expensive.

Not sure how non-transactional tuple locking would/could work.

The user space solution to this problem is optimistic locking. i.e.
re-read the row immediately prior to the update. If row has changed,
keep re-reading it until it stays same, then update. Rely on block
locking to protect us. I'm tired and handwaving a lot.

Will think some more and report back.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: "Vladimir Sitnikov"
Дата:
Сообщение: Re: Windowing Function Patch Review -> ROW_NUMBER without ORDER BY
Следующее
От: Decibel!
Дата:
Сообщение: Re: [WIP] In-place upgrade