From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Pgsql-Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump / Unique constraints |
Date: | 2000-11-22 16:37:47 |
Message-ID: | 200011221637.LAA20336@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-11-22 16:44:43 | regressplans failures |
Previous Message | Tom Lane | 2000-11-22 16:34:02 | Re: pg_dump / Unique constraints |