Re: error message and documentation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: error message and documentation
Дата
Msg-id 15774.1254325509@sss.pgh.pa.us
обсуждение исходный текст
Ответ на error message and documentation  (Ivano Luberti <luberti@archicoop.it>)
Ответы Re: error message and documentation  (Ivano Luberti <luberti@archicoop.it>)
Список pgsql-general
Ivano Luberti <luberti@archicoop.it> writes:
> I'm trying to understand why I can have this kind or error (it is
> probably some programming mistake) but reading the PostgresSQL manual I
> cannot find any trace of AccessExclusiveLock  , while I have found
> explanation of what AccessShareLock is.
> First question: is there a problem in the documentation or in
> PostgresSQL error messages ?

Not sure where you are looking, but they are all explained at
http://www.postgresql.org/docs/8.3/static/explicit-locking.html#LOCKING-TABLES

> Another question. The message above was reported to explain why a query
> sent to the db server has failed: am I right saying that, looking at the
> above error message, Process 10660 was the one executing the query that
> has failed and Process 2212 was executing something else and kept going
> its way ?

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.

> Final question: is there a way to know what query a Process has executed
> ? I'm thinking of some logging configuration for PostgresSQL.

http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html

            regards, tom lane

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

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