Re: pg_dump, pg_restore, insert vs copy

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lee Wu <Lwu(at)mxlogic(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump, pg_restore, insert vs copy
Date: 2005-03-24 16:44:33
Message-ID: 20050324164433.GA8068@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Mar 24, 2005 at 10:52:06AM -0500, Tom Lane wrote:
> "Lee Wu" <Lwu(at)mxlogic(dot)com> writes:
> > When I use pg_dump to back up the whole database and then pg_restore an
> > individual table,
> > pg_restore uses COPY. Great.
> > When I use pg_dump to back up an individual table and pg_restore it,
> > pg_restore uses INSERT.
>
> Not for me...
>
> That decision is fixed at pg_dump time; it's not possible for pg_restore
> to change it, because the data is already that way (or not) in the dump
> file. Maybe you misinterpreted what you saw?

Is there any reason why we don't use a binary storage in custom format
dumps? I mean, we could open a binary cursor and write the results to
the file, and read it back at restore time. This is just handwaving of
course.

I guess the reason is cross-version portability?

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"World domination is proceeding according to plan" (Andrew Morton)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-03-24 16:51:08 Re: pg_dump, pg_restore, insert vs copy
Previous Message Lee Wu 2005-03-24 16:35:43 Re: pg_dump, pg_restore, insert vs copy