Re: Race condition in HEAD, possibly due to PGPROC splitup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Race condition in HEAD, possibly due to PGPROC splitup
Дата
Msg-id 6982.1323876027@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Race condition in HEAD, possibly due to PGPROC splitup  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Race condition in HEAD, possibly due to PGPROC splitup  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Race condition in HEAD, possibly due to PGPROC splitup  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Pavan Deolasee <pavan.deolasee@gmail.com> writes:
> Looking at CommitTransaction(), it seems quite clear to me that we
> call ProcArrayEndTransaction() before releasing the locks held by the
> transaction. So its quite possible that when
> GetRunningTransactionLocks goes through the list of currently held
> locks, the pgxact->xid is already cleared. This seems to a old bug to
> me and not related to PGXACT work.

Hm.  So maybe the correct fix is to deem the lock already released
if we get zero when we read the xid?  It's not clear to me what the
requirements for GetRunningTransactionLocks actually are, but if it's
okay for it to think a lock is released slightly ahead of when the
rest of the system thinks so, that would work.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Race condition in HEAD, possibly due to PGPROC splitup
Следующее
От: Noah Misch
Дата:
Сообщение: Re: foreign key locks, 2nd attempt