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
|
Список | 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 по дате отправления: