X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 49443D1D4E7 for ; Fri, 20 Feb 2004 15:49:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 16601-09 for ; Fri, 20 Feb 2004 11:49:52 -0400 (AST) Received: from guppy.vub.ac.be (guppy.vub.ac.be [134.184.129.2]) by svr1.postgresql.org (Postfix) with ESMTP id 29BB0D1E174 for ; Fri, 20 Feb 2004 11:49:46 -0400 (AST) Received: from mach.vub.ac.be (mach.vub.ac.be [134.184.129.3]) by guppy.vub.ac.be (8.9.1b+Sun/3.17.1.ap (guppy)) id QAA21203; Fri, 20 Feb 2004 16:49:49 +0100 (MET) for Received: from scmbb.ulb.ac.be (ucmbsgi10.ulb.ac.be [164.15.109.34]) by mach.vub.ac.be (8.9.3/3.13.5.aejp (mach)) id QAA29191; Fri, 20 Feb 2004 16:49:43 +0100 (MET) for Message-ID: <40362CA5.2070007@scmbb.ulb.ac.be> Date: Fri, 20 Feb 2004 16:49:57 +0100 From: Olivier Hubaut User-Agent: Mozilla Thunderbird 0.5 (Macintosh/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: PgSQL SQL Subject: Creating constraint sometime fail in a transaction Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/309 X-Sequence-Number: 16999 Hi, I've a strange bug on PgSQL 7.3.3 with function, constraints and transactions. As the foreign key are too heavy for a massive insert, even set defered, we've decided to put them in a function in order to enable/disable them. So, in such a transaction, first we disable the constraints, using a function, then inserting all the data, and afterall put the constraints back with another function. This work fine and quickly... if we do it once. But, when we tried to make a big batch with a lot of such transaction, sometime, some constraint aren't put back or drop, and the rest of the transactions falls. So, we're wondering if the action for putting/removing constraint could be executed out of the transaction, so that it may overlaps and crash in such case. Does anyone notice the same problem? -- Signature en cours de maintenance, Veuillez patienter...