Skip site navigation (1) Skip section navigation (2)

Re: ALTER TABLE hangs

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Mike Baker <bakerlmike(at)yahoo(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: ALTER TABLE hangs
Date: 2002-04-29 20:50:51
Message-ID: 20020429134741.S65313-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Mon, 29 Apr 2002, Mike Baker wrote:

> Hi.
>
> I am in the process of doing some data migration.  I
> have had no trouble moving my data, but am having
> problems creating a foreign key.
>
> When I run the following command, psql hangs (well,
> not totally sure if it is hung).

It probably isn't hung, but it's going to go through
every row of the table to make sure the constraint holds
successfully which is going to result in 380,000
queries again t_release_component. I haven't had time
recently to do any of the fk stuff I've been meaning to
do, but this is optimizable for most cases, but it hasn't
been done.


In response to

Responses

pgsql-admin by date

Next:From: Mr OCPDate: 2002-04-30 18:19:10
Subject: Upgrading to 7.2 from 7.1
Previous:From: Mike BakerDate: 2002-04-29 20:42:07
Subject: ALTER TABLE hangs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group