Skip site navigation (1) Skip section navigation (2)

Re: [Retrieved]RE: backup and recovery

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tsirkin Evgeny <tsurkin(at)mail(dot)jct(dot)ac(dot)il>
Cc: Naomi Walker <nwalker(at)eldocomp(dot)com>,"Mark M(dot) Huber" <MHuber(at)VMdirect(dot)com>,"pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [Retrieved]RE: backup and recovery
Date: 2004-03-24 18:15:19
Message-ID: 200403241815.i2OIFJS02678@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Tsirkin Evgeny wrote:
> > Uh, you just ask and we discuss it on the list.
> >
> > Are you using INSERTs from pg_dump?  I assume so because COPY uses a
> > single transaction per command.  Right now with pg_dump -d I see:
> > 	
> > 	--
> > 	-- Data for Name: has_oids; Type: TABLE DATA; Schema: public; Owner:
> > 	postgres
> > 	--
> > 	
> > 	INSERT INTO has_oids VALUES (1);
> > 	INSERT INTO has_oids VALUES (1);
> > 	INSERT INTO has_oids VALUES (1);
> > 	INSERT INTO has_oids VALUES (1);
> >
> > Seems that should be inside a BEGIN/COMMIT for performance reasons, and
> > to have the same behavior as COPY (fail if any row fails).  Commands?
> >
> > As far as skipping on errors, I am unsure on that one, and if we put the
> > INSERTs in a transaction, we will have no way of rolling back only the
> > few inserts that fail.
> >
> That is right but there are sutuation when you prefer at least some
> data to be inserted and not all changes to be ralled back because
> of errors.

Added to TODO:

	* Have pg_dump use multi-statement transactions for INSERT dumps

For simple performance reasons, it would be good.  I am not sure about
allowing errors to continue loading.   Anyone else?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-admin by date

Next:From: Naomi WalkerDate: 2004-03-24 18:46:02
Subject: Re: [Retrieved]RE: backup and recovery
Previous:From: Tsirkin EvgenyDate: 2004-03-24 17:54:23
Subject: Re: [Retrieved]RE: backup and recovery

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group