Re: Serialization exception : Who else was involved? - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Serialization exception : Who else was involved?
Date
Msg-id 549E82D0.5040800@2ndquadrant.com
Whole thread Raw
In response to Serialization exception : Who else was involved?  (Olivier MATROT <olivier.matrot@accelis-sir.fr>)
List pgsql-hackers
On 12/02/2014 06:17 PM, Olivier MATROT wrote:

> I was wondering if there was a log level in PostgreSQL that could tell
> me which query was the trigger of a doomed transaction.

It's not necessarily possible to tell which *query* in another
transaction caused the current one to fail. It might not be a single
query in the local session or the other session.

What can be identified is the other transaction ID. If you set
log_line_prefix to include the txid and pid, and you log_statement =
'all', you can examine the logs to see what happened.

I admit it's pretty clumsy. It'd be very nice to provide more
information on the causes of failures - but I suspect doing so
*efficiently*, without making serializable a huge impact on performance,
would be quite challenging.


-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Serialization exception : Who else was involved?
Next
From: Craig Ringer
Date:
Subject: Re: Serialization exception : Who else was involved?