Re: "Suspending" indexes and constraint updates
От | Reg Me Please |
---|---|
Тема | Re: "Suspending" indexes and constraint updates |
Дата | |
Msg-id | 200712041159.19626.regmeplease@gmail.com обсуждение исходный текст |
Ответ на | Re: "Suspending" indexes and constraint updates (Peter Eisentraut <peter_e@gmx.net>) |
Список | 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 по дате отправления: