From: Olivier Hubaut <olivier@scmbb.ulb.ac.be>
To: PgSQL SQL <pgsql-sql@postgresql.org>
Subject: Creating constraint sometime fail in a transaction
Date: Fri, 20 Feb 2004 16:49:57 +0100
Message-ID: <40362CA5.2070007@scmbb.ulb.ac.be> (raw)
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...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: olivier@scmbb.ulb.ac.be
Subject: Re: Creating constraint sometime fail in a transaction
In-Reply-To: <40362CA5.2070007@scmbb.ulb.ac.be>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox