Re: error message and documentation

Поиск
Список
Период
Сортировка
От Ivano Luberti
Тема Re: error message and documentation
Дата
Msg-id 4AC38247.6020808@archicoop.it
обсуждение исходный текст
Ответ на Re: error message and documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: error message and documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom, thanks for your answer: the reason I failed to find

AccessExclusiveLock

is beacuse that string of character is never written in the manual while

AccessShareLock

is written as it is written above in the manual in the section about index lockin.

Not knowing the manual in detail I didn't know there is this section 13.3.1.

About which process has failed you say:
> I don't recall whether there's any particular guarantee about which
> process in the Detail message is the one that gets the error.  But
> since these are asking for two different lock levels it shouldn't be
> that hard to figure out which is which.  Also, the failing query really
> should have been included as another field of the error report.  If
> you're using client code that prints the detail field and not the query
> field, you might want to revisit that decision.
>
>
My problem is I know what query has failed , but I don't know the other
one that caused the deadlock condition.
A few second later the same query run by another process (procpid 11704)
failed again conflicting again with the process with procpid 2212. Since
processes represents the connections open in a small pool that uses jdbc
driver, either that was a long query that locked out the failed queries
or  the 2212 was reused by another application process and
coincidentally caused another deadlock.

In fact another thing I was asking myself is if exists a way from my
java application to know which java thread is using a given postgresSQL
process. Because the cause of the deadlock is clearly I have concurrent
thread that can generate conflicts on the db. But I think this is more a
JDBC list question.

Thanks again.



--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: error message and documentation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: error message and documentation