Re: Reducing overhead of frequent table locks
| От | Tom Lane |
|---|---|
| Тема | Re: Reducing overhead of frequent table locks |
| Дата | |
| Msg-id | 5273.1306334124@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Reducing overhead of frequent table locks (Simon Riggs <simon@2ndQuadrant.com>) |
| Ответы |
Re: Reducing overhead of frequent table locks
|
| Список | pgsql-hackers |
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Wed, May 25, 2011 at 1:44 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Wed, May 25, 2011 at 8:27 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>> Design seemed relatively easy from there: put local lock table in
>>> shared memory for all procs. We then have a use_strong_lock at proc
>>> and at transaction level. Anybody that wants a strong lock first sets
>>> use_strong_lock at proc and transaction level, then copies all local
>>> lock data into shared lock table,
>> I'm not following this...
> Which bit aren't you following? It's a design outline for how to
> implement, deliberately brief to allow a discussion of design
> alternatives.
What I'm not following is how moving the local lock table into shared
memory can possibly be a good idea. The reason we invented the local
lock table in the first place (we didn't use to have one) is so that a
process could do some manipulations without touching shared memory.
(Notably, it is currently nearly free, and certainly lock-free, to
re-request a lock type you already hold. This is not an infrequent
case.) That advantage will go away if you do this.
regards, tom lane
В списке pgsql-hackers по дате отправления: