Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0F64E2E013E for ; Tue, 18 Dec 2007 16:30:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 15669-09 for ; Tue, 18 Dec 2007 16:30:13 -0400 (AST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id AD5A42E0142 for ; Tue, 18 Dec 2007 16:30:15 -0400 (AST) Received: by py-out-1112.google.com with SMTP id u77so5537745pyb.15 for ; Tue, 18 Dec 2007 12:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=SOOkiFL6iLgZsCTMFyiGtO74Vdmw6U7VkkA1jprJA20=; b=LjJ9/kcGICqoAVD7joOL6y3ARAoHIpV002ejuUTLPIJLLuwK+95Tx39DcFYhUtL1oZkG7c81X/tLQJZEPX2tk1EdoRcBqU4L6ET5TK48nAeR2Uk4nj7q9lYr32XQE+/f/KTaXNTy9dUIn3p1h8FqLIsnisHgrmNJFmUxns1Zpc8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=hpeIQgp0IrEji3CxnhQtlVy/gp4E4yTjk/meL4nEXTekJVt/IUkC5HNhMAaOlu+8lJACPGzvsRDOMJXNgVD6d8O1BH0nRbmxsM/D4ndWxRG6+r4FptulD8ftkYS/uXr8kav96FjSdYzCCvqlSAWZ3pjn/aXmzwV03APMMcILWcA= Received: by 10.65.81.10 with SMTP id i10mr18643747qbl.75.1198009812861; Tue, 18 Dec 2007 12:30:12 -0800 (PST) Received: by 10.64.150.15 with HTTP; Tue, 18 Dec 2007 12:30:12 -0800 (PST) Message-ID: Date: Tue, 18 Dec 2007 12:30:12 -0800 From: Deron To: pgsql-admin@postgresql.org Subject: Set maintenance work mem for pg_restore MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20008_15251051.1198009812850" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/169 X-Sequence-Number: 27686 ------=_Part_20008_15251051.1198009812850 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I see a lot of suggestions to increase maintenance work mem if running pg_restore. This is to help with the index creation and initial sort from what I understand. A few tests I ran does show this helps. Does anyone know if there is a way to only "temporarily" set this setting? I have some DBs that are bloated and I have a script to run off hours (I don't like working late). This uses pg_dump and pg_restore to recover the disk space. I found that this is usually faster than 'vacuum full', and is useful in some cases. I know I can set this for my current session dynamically "set maintenance_work_mem = xxxxx", but it seems that the only way I can do this for pg_restore is to update the configuration, reload and then change it back when the script completes and reload again. Thanks Deron ------=_Part_20008_15251051.1198009812850 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I see a lot of suggestions to increase maintenance work mem if running pg_restore.  This is to help with the index creation and initial sort from what I understand.  A few tests I ran does show this helps.
Does anyone know if there is a way to only "temporarily" set this setting?  I have some DBs that are bloated and I have a script to run off hours (I don't like working late).  This uses pg_dump and pg_restore to recover the disk space.  I found that this is usually faster than 'vacuum full', and is useful in some cases.
 
I know I can set this for my current session dynamically "set maintenance_work_mem = xxxxx", but it seems that the only way I can do this for pg_restore is to update the configuration, reload and then change it back when the script completes and reload again.
 
Thanks
 
Deron
 
------=_Part_20008_15251051.1198009812850--