pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@dcc.uchile.cl>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Lee Wu <Lwu@mxlogic.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump, pg_restore, insert vs copy
Date: Thu, 24 Mar 2005 12:44:33 -0400
Message-ID: <20050324164433.GA8068@dcc.uchile.cl> (raw)
In-Reply-To: <27059.1111679526@sss.pgh.pa.us>
References: <ECAB83AA52BCC043A0E24BBC00001024D2E6BC@mxhq-exch.corp.mxlogic.com>
	<27059.1111679526@sss.pgh.pa.us>

On Thu, Mar 24, 2005 at 10:52:06AM -0500, Tom Lane wrote:
> "Lee Wu" <Lwu@mxlogic.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[@]dcc.uchile.cl>)
"World domination is proceeding according to plan"        (Andrew Morton)



view thread (9+ messages)  latest in thread

Message-ID: <20050324164433.GA8068@dcc.uchile.cl>
Permalink:  ../20050324164433.GA8068@dcc.uchile.cl/
Also on:    postgresql.org/message-id/20050324164433.GA8068@dcc.uchile.cl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: alvherre@dcc.uchile.cl, tgl@sss.pgh.pa.us, Lwu@mxlogic.com
  Subject: Re: pg_dump, pg_restore, insert vs copy
  In-Reply-To: <20050324164433.GA8068@dcc.uchile.cl>
  References: <ECAB83AA52BCC043A0E24BBC00001024D2E6BC@mxhq-exch.corp.mxlogic.com> <27059.1111679526@sss.pgh.pa.us> <20050324164433.GA8068@dcc.uchile.cl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox