Re: WIP patch for parallel pg_dump - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP patch for parallel pg_dump
Date
Msg-id 9536.1291342199@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP patch for parallel pg_dump  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: WIP patch for parallel pg_dump
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 12/02/2010 05:32 PM, Tom Lane wrote:
>> (I'm not actually convinced that snapshot cloning is the only problem
>> here; locking could be an issue too, if there are concurrent processes
>> trying to take locks that will conflict with pg_dump's.  But the
>> snapshot issue is definitely a showstopper.)

> Why is that more an issue with parallel pg_dump?

The scenario that bothers me is

1. pg_dump parent process AccessShareLocks everything to be dumped.

2. somebody else tries to acquire AccessExclusiveLock on table foo.

3. pg_dump child process is told to dump foo, tries to acquire
AccessShareLock.

Now, process 3 is blocked behind process 2 is blocked behind process 1
which is waiting for 3 to complete.  Can you say "undetectable deadlock"?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: WIP patch for parallel pg_dump
Next
From: Andrew Dunstan
Date:
Subject: Re: WIP patch for parallel pg_dump