Re: pg_dump / Unique constraints
От | Bruce Momjian |
---|---|
Тема | Re: pg_dump / Unique constraints |
Дата | |
Msg-id | 200011221637.LAA20336@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: pg_dump / Unique constraints (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pg_dump / Unique constraints
|
Список | pgsql-hackers |
> The answer to that of course is that cross-table constraints (like > REFERENCES clauses) must be disabled while loading the data, or the > intermediate states where only some tables have been loaded are likely > to fail. So we do need some kind of DISABLE CONSTRAINT mode to make > this work. But it's silly that pg_dump has to go out of its way to > create the indexes last --- if COPY has a performance problem there, > we should be fixing COPY, not requiring pg_dump to contort itself. > Why can't COPY recognize for itself that rebuilding the indexes after > loading data is a better strategy than incremental index update? > (The simplest implementation would restrict this to happen only if the > table is empty when COPY starts, which'd be sufficient for pg_dump.) COPY would have to check to see if the table is already empty. You can COPY into a table that already has data. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: