X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C244FD1CA50 for ; Wed, 24 Mar 2004 17:59:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 28532-09 for ; Wed, 24 Mar 2004 13:59:23 -0400 (AST) Received: from smtp2.actcom.co.il (smtp2.actcom.co.il [192.114.47.15]) by svr1.postgresql.org (Postfix) with ESMTP id A1168D1B905 for ; Wed, 24 Mar 2004 13:59:21 -0400 (AST) Received: from machenai-2h2ozp (l192-117-121-19.broadband.actcom.net.il [192.117.121.19]) by smtp2.actcom.co.il (8.12.8/8.12.8) with ESMTP id i2OHxARi005448; Wed, 24 Mar 2004 19:59:11 +0200 Cc: "Mark M. Huber" , "pgsql-admin@postgresql.org" To: Bruce Momjian , Naomi Walker Subject: Re: [Retrieved]RE: backup and recovery References: <200403240050.i2O0oOn19677@candle.pha.pa.us> Message-ID: From: Tsirkin Evgeny Content-Type: text/plain; format=flowed; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Wed, 24 Mar 2004 19:54:23 +0200 In-Reply-To: <200403240050.i2O0oOn19677@candle.pha.pa.us> User-Agent: Opera7.20/Win32 M2 build 3144 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/315 X-Sequence-Number: 12884 On Tue, 23 Mar 2004 19:50:24 -0500 (EST), Bruce Momjian 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. >> > > >