Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 88D072E0040 for ; Tue, 19 Feb 2008 17:32:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95524-03 for ; Tue, 19 Feb 2008 17:32:27 -0400 (AST) Received: from smtp200.iad.emailsrvr.com (smtp200.iad.emailsrvr.com [207.97.245.200]) by postgresql.org (Postfix) with ESMTP id 379612E003B for ; Tue, 19 Feb 2008 17:32:27 -0400 (AST) Received: from relay10.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay10.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id 511211B4013; Tue, 19 Feb 2008 16:32:26 -0500 (EST) Received: by relay10.relay.iad.mlsrvr.com (Authenticated sender: erik-AT-myemma.com) with ESMTP id 31B5B1B41E9; Tue, 19 Feb 2008 16:32:21 -0500 (EST) In-Reply-To: <200802191555.43340.doug@hunley.homeip.net> References: <200802191303.58840.doug@hunley.homeip.net> <19241.1203445378@sss.pgh.pa.us> <200802191555.43340.doug@hunley.homeip.net> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <080DA59E-2C02-4370-8584-FA7C8CC008B0@myemma.com> Cc: Jeff , Tom Lane , Richard Huxton , pgsql-performance@postgresql.org Content-Transfer-Encoding: quoted-printable From: Erik Jones Subject: Re: 7 hrs for a pg_restore? Date: Tue, 19 Feb 2008 15:32:02 -0600 To: Douglas J Hunley X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/231 X-Sequence-Number: 28773 On Feb 19, 2008, at 2:55 PM, Douglas J Hunley wrote: > On Tuesday 19 February 2008 15:07:30 Jeff wrote: >> On Feb 19, 2008, at 1:22 PM, Tom Lane wrote: >>> maintenance_work_mem, to be more specific. If that's too small it >>> will >>> definitely cripple restore speed. I'm not sure fsync would make =20 >>> much >>> difference, but checkpoint_segments would. See >>> http://www.postgresql.org/docs/8.3/static/populate.html#POPULATE-PG- >>> DUMP >> >> I wonder if it would be worthwhile if pg_restore could emit a warning >> if maint_work_mem is "low" (start flamewar on what "low" is). >> >> And as an addition to that - allow a cmd line arg to have pg_restore >> bump it before doing its work? On several occasions I was moving a >> largish table and the COPY part went plenty fast, but when it hit >> index creation it slowed down to a crawl due to low maint_work_mem.. > > fwiw, I +1 this > > now that I have a (minor) understanding of what's going on, I'd =20 > love to do > something like: > pg_restore -WM $large_value pg_restore is a postgres client app that uses libpq to connect and, =20 thus, will pick up anything in your $PGOPTIONS env variable. So, PGOPTONS=3D"-c maintenance_work_mem=3D512MB" && pg_restore .... Erik Jones DBA | Emma=AE erik@myemma.com 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com