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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Naomi Walker | 2004-03-24 18:46:02 | Re: [Retrieved]RE: backup and recovery |
Previous Message | Tsirkin Evgeny | 2004-03-24 17:54:23 | Re: [Retrieved]RE: backup and recovery |