From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump multi VALUES INSERT |
Date: | 2018-10-16 19:48:59 |
Message-ID: | 27171.1539719339@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Surafel Temesgen <surafel3000(at)gmail(dot)com> writes:
> According to the documentation –inserts option is mainly useful for making
> dumps that can be loaded into non-PostgreSQL databases and to reduce the
> amount of rows that might lost during error in reloading but multi values
> insert command are equally portable and compact and also faster to reload
> than single row statement. I think it deserve an option of its own
I don't actually see the point of this. If you want dump/reload speed
you should be using COPY. If that isn't your first priority, it's
unlikely that using an option like this would be a good idea. It makes
the effects of a bad row much harder to predict, and it increases your
odds of OOM problems with wide rows substantially.
I grant that COPY might not be an option if you're trying to transfer
data to a different DBMS, but the other problems seem likely to apply
anywhere. The bad-data hazard, in particular, is probably a much larger
concern than it is for Postgres-to-Postgres transfers.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-10-16 19:57:25 | Re: [PATCH] heap_insert() and heap_update() optimization |
Previous Message | Robert Haas | 2018-10-16 19:42:59 | Re: [RFC] Removing "magic" oids |