Re: adding foreign key constraint locks up table

From: Florian Weimer <fweimer(at)bfk(dot)de>
To: kakarukeys <kakarukeys(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: adding foreign key constraint locks up table
Date: 2010-12-28 14:57:14
Message-ID: 82ei926j3p.fsf@mid.bfk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Whenever I try to create a new table "bbb" with foreign key pointing
> to "aaa". The operation locks, and reading "aaa" is not possible. The
> query also never seems to finish.

Do you mean that the ALTER query and subsequent queries are shown as
"waiting" in pg_stat_activity? In this case, I'm also wondering why
this is inecessary.

--
Florian Weimer <fweimer(at)bfk(dot)de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gurjeet Singh 2010-12-28 15:01:24 Re: adding foreign key constraint locks up table
Previous Message Gurjeet Singh 2010-12-28 14:56:19 Re: adding foreign key constraint locks up table