Re: error message and documentation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivano Luberti <luberti(at)archicoop(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: error message and documentation
Date: 2009-09-30 15:45:09
Message-ID: 15774.1254325509@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivano Luberti <luberti(at)archicoop(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ivano Luberti 2009-09-30 16:07:35 Re: error message and documentation
Previous Message Ivano Luberti 2009-09-30 15:34:43 error message and documentation