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

From Peter Eisentraut
Subject Re: "Suspending" indexes and constraint updates
Date
Msg-id 200712041150.22075.peter_e@gmx.net
Whole thread Raw
In response to "Suspending" indexes and constraint updates  (Reg Me Please <regmeplease@gmail.com>)
Responses Re: "Suspending" indexes and constraint updates
List pgsql-general
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.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-general by date:

Previous
From: "Christian Rengstl"
Date:
Subject: Re: Fwd: Re: Archiving problem on Windows
Next
From: "x asasaxax"
Date:
Subject: Re: Transaction problem