X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1E3C4539A5 for ; Wed, 30 Mar 2005 10:49:58 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25233-03 for ; Wed, 30 Mar 2005 09:49:54 +0000 (GMT) Received: from boutiquenumerique.com (unknown [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id 55A9453971 for ; Wed, 30 Mar 2005 10:49:52 +0100 (BST) Received: (qmail 9893 invoked from network); 30 Mar 2005 11:48:48 +0200 Received: from unknown (HELO localhost) (boutiquenumerique-lists@192.168.0.4) by boutiquenumerique.com with SMTP; 30 Mar 2005 11:48:48 +0200 To: frank@joerdens.de, pgsql-sql@postgresql.org Subject: Re: can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE References: <20050330090732.GA10376@mail.archi-me-des.de> Message-ID: From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Wed, 30 Mar 2005 11:48:31 +0200 In-Reply-To: <20050330090732.GA10376@mail.archi-me-des.de> User-Agent: Opera M2(BETA2)/8.0 (Linux, build 987) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/385 X-Sequence-Number: 20864 Checks the docs on ALTER TABLE ... ALTER CONSTRAINT ... On Wed, 30 Mar 2005 11:07:32 +0200, wrote: > Hello. Is it possible to change an FK constraint from NOT DEFERRABLE > (the default) to DEFERRABLE without dropping and re-creating it? One idea > that came up was to create a parallel set of constraints which perform > the same checks as the existing ones as DEFERRABLE (and then drop the > old set), but the objection there was that it'd lock the tables during > the initial check. > > We're having a fairly serious deadlock issue and the thinking goes that > Tom's suggestion here > > http://www.webservertalk.com/archive139-2004-8-364172.html > > to defer FK checks until transaction commit would maybe help. Right now > we can't try this because all the FK checks where created with default > settings. We'd like to avoid taking the database down for recreating > foreign keys. > > Regards, > > Frank > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq >