Re: Advisory locks seem rather broken

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Advisory locks seem rather broken
Дата
Msg-id 3258.1336137937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Advisory locks seem rather broken  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Advisory locks seem rather broken  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> In 9.1, we just did this:

>                 if (locallock->proclock == NULL || locallock->lock == NULL)
>                 {
>                         /*
>                          * We must've run out of shared memory while
> trying to set up this
>                          * lock.  Just forget the local entry.
>                          */
>                         Assert(locallock->nLocks == 0);
>                         RemoveLocalLock(locallock);
>                         continue;
>                 }

> ...and I just shoved the new logic into that stanza without thinking
> hard enough about what order to do things in.

Right.  The other thing that was bothering me about that was that it's
not clear now how to tell a broken locallock entry (which is what this
logic originally intended to clean up) from a fastpath one.  Perhaps
it'd be a good idea to add a "valid" flag?  And while I'm wondering
about such things, what happens when it's necessary to convert a
fastpath lock to a regular one, but there's no room in shared memory
for more lock objects?
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Advisory locks seem rather broken
Следующее
От: Tom Lane
Дата:
Сообщение: Re: JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ?