Re: "Suspending" indexes and constraint updates - Mailing list pgsql-general

From Reg Me Please
Subject Re: "Suspending" indexes and constraint updates
Date
Msg-id 200712041159.19626.regmeplease@gmail.com
Whole thread Raw
In response to Re: "Suspending" indexes and constraint updates  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Il Tuesday 04 December 2007 11:50:21 Peter Eisentraut ha scritto:
> Am Dienstag, 4. Dezember 2007 schrieb Reg Me Please:
> > Is there a way to "suspend" the index updates and the constraint checks
> > before the inserts in order to later re-enable them and do a reindex?
>
> You can disable foreign-key constraints (see ALTER TABLE ... DISABLE
> TRIGGER; not quite obvious, but there is a trigger beneath each foreign key
> constraint).  But there is no general solution for all constraints and
> indexes.
>
> It might also be helpful to investigate the order in which pg_dump puts out
> things, since it faces mostly the same issues.  It puts index and
> constraint creation at the end after the data load.

As far as I know, pg_dump usually starts with an empty DB.
Then it creates plain table to be filled with COPY.
And at last it creates indexes and constraints.
Which is not what I nedd.

In any case thanks for the hint.

--
Reg me, please!

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: "Suspending" indexes and constraint updates
Next
From: "A. Kretschmer"
Date:
Subject: Re: Archiving problem on Windows