| From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
|---|---|
| To: | Olivier MATROT <olivier(dot)matrot(at)accelis-sir(dot)fr>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Serialization exception : Who else was involved? |
| Date: | 2014-12-27 09:58:40 |
| Message-ID: | 549E82D0.5040800@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Craig Ringer | 2014-12-27 10:02:48 | Re: Serialization exception : Who else was involved? |
| Previous Message | Noah Misch | 2014-12-27 09:51:11 | Re: Serialization exception : Who else was involved? |