Search Postgresql Archives

Re: CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Thomas F. O'Connell" <tfo@xxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux