On Fri, Sep 09, 2005 at 09:09:11AM +0200, Joost Kraaijeveld wrote: > ALTER TABLE prototype.orderlines ADD CONSTRAINT fk_orderlines_orders > FOREIGN KEY (orderobjectid) REFERENCES prototype.orders (objectid) > ON UPDATE RESTRICT ON DELETE RESTRICT; > > CREATE INDEX fki_orderlines_orders ON > prototype.orderlines(orderobjectid); > > Ont the second command PostgreSQL hangs forever. The > prototype.orderlines table is completely empty, the prototype.orders > table contains 1.000.000+ records. Does the second command hang consistently or have you only tried it once? When it's (apparently) hung, what output do you get if you run the following query in another session? SELECT relation::regclass, * FROM pg_locks; What version of PostgreSQL are you using? -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings