pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedcreate table problems
2+ messages / 2 participants
[nested] [flat]
* create table problems
@ 2006-07-26 20:51 Chris Hoover <revoohc@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Chris Hoover @ 2006-07-26 20:51 UTC (permalink / raw)
To: pgsql-admin
I am trying to create a table in my production system that has a foreign
key into an existing table. However, this action is being blocked by
transactions on that table, and is blocking any additional selects on that
table.
Why is this? The table is empty (being a create), so I don't understand
what Postgresql is trying to do.
Thanks,
Chris
PG 8.1.3
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: create table problems
@ 2006-07-26 23:13 Michael Fuhr <mike@fuhr.org>
parent: Chris Hoover <revoohc@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Fuhr @ 2006-07-26 23:13 UTC (permalink / raw)
To: Chris Hoover <revoohc@gmail.com>; +Cc: pgsql-admin
On Wed, Jul 26, 2006 at 04:51:34PM -0400, Chris Hoover wrote:
> I am trying to create a table in my production system that has a foreign
> key into an existing table. However, this action is being blocked by
> transactions on that table, and is blocking any additional selects on that
> table.
>
> Why is this? The table is empty (being a create), so I don't understand
> what Postgresql is trying to do.
The transaction that's creating the new table wants to acquire an
AccessExclusiveLock on the referenced table, presumably so it can
alter that table to add referential integrity triggers. The
referenced table needs to have such triggers so it knows what
integrity checks to make when somebody tries to update or delete
its rows. Maybe one of the developers will confirm or refute.
--
Michael Fuhr
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-07-26 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-26 20:51 create table problems Chris Hoover <revoohc@gmail.com>
2006-07-26 23:13 ` Michael Fuhr <mike@fuhr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox