Re: Deadlock with pg_dump? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Deadlock with pg_dump?
Date
Msg-id 26690.1161902708@sss.pgh.pa.us
Whole thread Raw
In response to Re: Deadlock with pg_dump?  (Chris Campbell <chris@bignerdranch.com>)
Responses Re: Deadlock with pg_dump?  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Deadlock with pg_dump?  (Chris Campbell <chris@bignerdranch.com>)
Re: Deadlock with pg_dump?  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
Chris Campbell <chris@bignerdranch.com> writes:
> Is there additional logging information I can turn on to get more  
> details? I guess I need to see exactly what locks both processes  
> hold, and what queries they were running when the deadlock occurred?  
> Is that easily done, without turning on logging for *all* statements?

log_min_error_statement = error would at least get you the statements
reporting the deadlocks, though not what they're conflicting against.
Still, if you're seeing multiple occurrences per day, that would
probably let you build up a good picture of all the involved operations
over a couple of days.

[ Memo to hackers: why is it that log_min_error_statement = error
isn't the default? ]

Unless your applications are issuing actual LOCK TABLE commands, it's
really hard to see how pg_dump could be involved.  It doesn't take
anything stronger than AccessShareLock, and shouldn't be holding any
tuple-level locks at all.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Deadlock with pg_dump?
Next
From: Alvaro Herrera
Date:
Subject: Re: Deadlock with pg_dump?