Re: WaitOnLock: error on wakeup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WaitOnLock: error on wakeup
Дата
Msg-id 28858.994774569@sss.pgh.pa.us
обсуждение исходный текст
Ответ на WaitOnLock: error on wakeup  (Rachit Siamwalla <rachit@ensim.com>)
Список pgsql-hackers
Rachit Siamwalla <rachit@ensim.com> writes:
> Anyone know why I could possibly get this error? This doesn't happen
> deterministically.

It wouldn't, because the problem arises from the interaction of multiple
clients --- AFAIK it is not possible to get that error with only a
single client, no matter what it does.

A good bet is that your code is written to acquire the same locks in
different orders in different cases.  Then you can get cases like
Client A            Client B;
begin;lock table a;
...                begin;...                lock table b;
lock table b;-- now A is waiting for B
...                lock table a;                -- deadlock

B's second lock attempt will be rejected with

test71=# lock table a;
ERROR:  Deadlock detected.       See the lock(l) manual page for a possible cause.


> WaitOnLock: error on wakeup - Aborting this transaction
> NOTICE:  Deadlock detected -- See the lock(l) manual page 

Apparently you're running an older PG release; that's what the
error report used to look like.
        regards, tom lane


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

Предыдущее
От: Sergio Bruder
Дата:
Сообщение: Re: Any tips for this particular performance problem?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Tips performance under solaris