"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes:
> As for how this plays out in the real world, a pg_dumpall will start  
> and run for a few hours. Sometime during that, this function might  
> get called. When it does, an ACCESS EXCLUSIVE lock is held against  
> the table identified as t13, here directly referenced only as a  
> FOREIGN KEY.

It's the addition of a foreign key constraint that's biting you.  That
requires installing triggers on the pre-existing table (t13, also t14
in your example), and that requires an exclusive lock.

Since we don't currently allow any ON SELECT triggers, it's possible
that adding a trigger could be downgraded to just ExclusiveLock (which
wouldn't conflict with pg_dump's AccessShareLock), but I can't say that
I'm enthusiastic about that idea.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to