Re: Advisory locks seem rather broken

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: Advisory locks seem rather broken
Дата
в 17:26:24
Msg-id
CA+TgmoYXoHHc4PPoSOWmF_xgfBGsZPy_Uj0j2Oh-ZhLtHAwSkQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Simon Riggs <simon@2ndQuadrant.com>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Simon Riggs <simon@2ndQuadrant.com>
Re: Advisory locks seem rather broken Andres Freund <andres@anarazel.de>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Josh Berkus <josh@agliodbs.com>
Re: Advisory locks seem rather broken Robert Haas <robertmhaas@gmail.com>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Robert Haas <robertmhaas@gmail.com>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Robert Haas <robertmhaas@gmail.com>
Re: Advisory locks seem rather broken Tom Lane <tgl@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>
Re: Advisory locks seem rather broken Robert Haas <robertmhaas@gmail.com>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
Re: Advisory locks seem rather broken Merlin Moncure <mmoncure@gmail.com>
Re: Advisory locks seem rather broken Tom Lane <tgl@sss.pgh.pa.us>
On Fri, May 4, 2012 at 9:17 AM, Robert Haas  wrote:
> On Thu, May 3, 2012 at 5:18 PM, Tom Lane  wrote:
>> ... btw, it appears to me that the "fast path" patch has broken things
>> rather badly in LockReleaseAll.  AFAICS it's not honoring either the
>> lockmethodid restriction nor the allLocks restriction with respect to
>> fastpath locks.  Perhaps user locks and session locks are never taken
>> fast path, but still it would be better to be making those checks
>> further up, no?
>
> User locks are never taken fast path, but session locks can be, so I
> think you're right that there is a bug here.  I think what we should
> probably do is put the nLocks == 0 test before the lockmethodid and
> allLocks checks, and then the fast path stuff after those two checks.
>
> 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.

This issue had slipped my mind, but Erik's report about another
fast-path locking problem jogged my memory, so I repaired this while I
was at it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: james
Дата:
Сообщение: Re: Fake async rep target
FAQ