pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Deron <fecastle@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Set maintenance work mem for pg_restore
Date: Tue, 18 Dec 2007 14:40:43 -0800
Message-ID: <ad143ba80712181440v2a922ef6ibbe52aa1cc8e153@mail.gmail.com> (raw)
In-Reply-To: <20071218204957.GE8088@alvh.no-ip.org>
References: <ad143ba80712181230q3b5002b5wa1a90b304ef0e2f2@mail.gmail.com>
	<20071218204957.GE8088@alvh.no-ip.org>

Thanks for this and the other suggestions.  This is exactly what I was
looking for.

Deron



On 12/18/07, Alvaro Herrera <alvherre@commandprompt.com> wrote:
>
> Deron escribió:
> > 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.
>
> You can specify it via PGOPTIONS:
>
> $ PGOPTIONS='-c maintenance_work_mem=1GB' psql
> Welcome to psql 8.2.5, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>       \h for help with SQL commands
>       \? for help with psql commands
>       \g or terminate with semicolon to execute query
>       \q to quit
>
> alvherre=# show maintenance_work_mem ;
> maintenance_work_mem
> ----------------------
> 1GB
> (1 row)
>
> alvherre=# \q
>
> $ psql
> Welcome to psql 8.2.5, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>       \h for help with SQL commands
>       \? for help with psql commands
>       \g or terminate with semicolon to execute query
>       \q to quit
>
> alvherre=# show maintenance_work_mem ;
> maintenance_work_mem
> ----------------------
> 16MB
> (1 row)
>
>
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>

view thread (5+ messages)

Message-ID: <ad143ba80712181440v2a922ef6ibbe52aa1cc8e153@mail.gmail.com>
Permalink:  ../ad143ba80712181440v2a922ef6ibbe52aa1cc8e153@mail.gmail.com/
Also on:    postgresql.org/message-id/ad143ba80712181440v2a922ef6ibbe52aa1cc8e153@mail.gmail.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: fecastle@gmail.com
  Subject: Re: Set maintenance work mem for pg_restore
  In-Reply-To: <ad143ba80712181440v2a922ef6ibbe52aa1cc8e153@mail.gmail.com>

* 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