From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Nigel J. Andrews <nandrews@investsystems.co.uk>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: COPY performance
Date: Sat, 13 Apr 2002 16:05:21 -0400
Message-ID: <17514.1018728321@sss.pgh.pa.us> (raw)
In-Reply-To: <20020413121415.J86939-100000@megazone23.bigpanda.com>
References: <20020413121415.J86939-100000@megazone23.bigpanda.com>
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On Sat, 13 Apr 2002, Nigel J. Andrews wrote:
>> I should have mentioned that I'm doing the copy in to the table in a
>> transaction block with all constraints deferred. That should mean it's only at
>> the commit stage that foreign key will be checked right?
> With the definition shown, I believe your constraint is not deferrable so
> setting the constraint mode to deferred won't help. In any case it'd still
> need to be saving the information on the triggers to run.
In any case the RI trigger firings will be postponed till end of query.
I suspect that the memory growth is due to the list of pending trigger
firings. The advice to add the REFERENCES constraint after you've
loaded the table seems good to me.
Another possibility is that there's some memory leak associated with the
txtidx data type; I dunno how thoroughly that type has been tested...
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, sszabo@megazone23.bigpanda.com, nandrews@investsystems.co.uk, pgsql-general@postgresql.org
Subject: Re: COPY performance
In-Reply-To: <17514.1018728321@sss.pgh.pa.us>
References: <20020413121415.J86939-100000@megazone23.bigpanda.com> <17514.1018728321@sss.pgh.pa.us>
* 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