Re: deadlock error messages

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: deadlock error messages
Дата
Msg-id 47E3E341.4020901@postnewspapers.com.au
обсуждение исходный текст
Ответ на deadlock error messages  (dan chak <chak@MIT.EDU>)
Список pgsql-general
dan chak wrote:
>
> What would be really great would be to know what the other query is,
> as opposed to just the pid (not sure from this output if it's 4483 or
> 29245).  Also not sure if this is the right list for this.  But
> potentially someone on here may have a good tip on debugging deadlocking?
>
Just logging the other query would be a nasty information disclosure
problem.

Process blah waits for sharelock on transaction blah blocked by process blah
Context: sql statement "update passwords set password = 'kitty' where
user = 'dummy'"
Blocking sql statement: "update passwords set password = 'woof' where
user 'dummy'"

Ouch.

What could be more securely done, though, would be to issue a NOTICE on
the backend on which the deadlocking transaction not killed is running
that includes the backend pid and the problem statement. Your later log
analysis could then match up the statements from the separate log
records. Including the transaction IDs of both in both log lines would
be nice too, as pids get reused.

Sound sane?

--
Craig Ringer

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

Предыдущее
От: Steve Clark
Дата:
Сообщение: Re: ecpg program getting stuck
Следующее
От: Tom Lane
Дата:
Сообщение: Re: MySQL to Postgres question