Skip site navigation (1) Skip section navigation (2)

Re: Deadlock with pg_dump?

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Chris Campbell" <chris(at)bignerdranch(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deadlock with pg_dump?
Date: 2006-10-30 20:49:57
Message-ID: 1162241397.11568.335.camel@silverbirch.site (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Thu, 2006-10-26 at 18:45 -0400, Tom Lane wrote:
> Chris Campbell <chris(at)bignerdranch(dot)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.

Yeh, we need a much better locking logger for performance analysis.

We really need to dump the whole wait-for graph for deadlocks, since
this might be more complex than just two statements involved. Deadlocks
ought to be so infrequent that we can afford the log space to do this -
plus if we did this it would likely lead to fewer deadlocks.

For 8.3 I'd like to have a log_min_duration_lockwait (secs) parameter
that would allow you to dump the wait-for graph for any data-level locks
that wait too long, rather than just those that deadlock. Many
applications experience heavy locking because of lack of holistic
design. That will also show up the need for other utilities to act
CONCURRENTLY, if possible.

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

For production systems where we expect fewer ERRORs, each one is
important, so this would be a good default.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com



In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2006-10-30 21:39:58
Subject: Re: [HACKERS] WAL logging freezing
Previous:From: Simon RiggsDate: 2006-10-30 20:30:19
Subject: Re: [HACKERS] WAL logging freezing

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2006-10-30 21:39:58
Subject: Re: [HACKERS] WAL logging freezing
Previous:From: Simon RiggsDate: 2006-10-30 20:30:19
Subject: Re: [HACKERS] WAL logging freezing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group