From: Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
To: Bruce Momjian <pgman@candle.pha.pa.us>
To: Naomi Walker <nwalker@eldocomp.com>
Cc: Mark M. Huber <MHuber@VMdirect.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: [Retrieved]RE: backup and recovery
Date: Wed, 24 Mar 2004 19:54:23 +0200
Message-ID: <opr5dn0x0kjbdarf@localhost> (raw)
In-Reply-To: <200403240050.i2O0oOn19677@candle.pha.pa.us>
References: <200403240050.i2O0oOn19677@candle.pha.pa.us>
On Tue, 23 Mar 2004 19:50:24 -0500 (EST), Bruce Momjian
<pgman@candle.pha.pa.us> wrote:
> Naomi Walker wrote:
>>
>> I'm not sure of the correct protocol for getting things on the "todo"
>> list. Whom shall we beg?
>>
>
> 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.
> ---------------------------------------------------------------------------
>
>> >
>> >That brings up a good point. It would be extremely helpful to add two
>> >parameters to pg_dump. One, to add how many rows to insert before a
>> >commit, and two, to live through X number of errors before dying (and
>> >putting the "bad" rows in a file).
>> >
>> >
>> >At 10:15 AM 3/19/2004, Mark M. Huber wrote:
>> > >What it was that I guess the pg_dump makes one large transaction and
>> our
>> > >shell script wizard wrote a perl program to add a commit transaction
>> > >every 500 rows or what every you set. Also I should have said that
>> we were
>> > >doing the recovery with the insert statements created from pg_dump.
>> So...
>> > >my 500000 row table recovery took < 10 Min.
>> > >
>
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: tsurkin@mail.jct.ac.il, pgman@candle.pha.pa.us, nwalker@eldocomp.com, MHuber@VMdirect.com
Subject: Re: [Retrieved]RE: backup and recovery
In-Reply-To: <opr5dn0x0kjbdarf@localhost>
References: <200403240050.i2O0oOn19677@candle.pha.pa.us> <opr5dn0x0kjbdarf@localhost>
* 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