pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: Vinubalaji Gopal <vgopal@abaca.com>
Cc: Pgsql-Performance ((E-mail)) <pgsql-performance@postgresql.org>
Subject: Re: best way to run maintenance script
Date: Fri, 14 Mar 2008 17:32:35 -0700
Message-ID: <20080314173235.58f854e6@commandprompt.com> (raw)
In-Reply-To: <1205542821.12661.16.camel@vinu-ubuntu.abaca>
References: <1205542821.12661.16.camel@vinu-ubuntu.abaca>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 14 Mar 2008 17:00:21 -0800
Vinubalaji Gopal <vgopal@abaca.com> wrote:

> Hi all,
>   I have been searching for the best way to run maintenance scripts
> which does a vacuum, analyze and deletes some old data. Whenever the
> maintenance script runs - mainly the pg_maintenance --analyze script -
> it slows down postgresql inserts and I want to avoid that. The system
> is under constant load and I am not interested in the time taken to
> vacuum. Is there a utility or mechanism in postgresql which helps in
> reducing priority of maintenance queries?

You can use parameters such as vacuum_cost_delay to help this... see
the docs:

http://www.postgresql.org/docs/8.3/static/runtime-config-autovacuum.html

> 
> Is writing a postgresql C function and setting the priority of process
> the only way to change the priority of the maintenance script or is
> there a better way.
> http://weblog.bignerdranch.com/?p=11
> 
> I tried using the nice command (Linux system) on the maintenance
> script
> - it did not have any effect - guess it does not change the niceness
> of the postgresql vacuum process.
> 
> (I am running Postgresql 8.0 on a Linux)

If you are truly running 8.0 and not something like 8.0.15 vacuum is
the least of your worries.

Sincerely,

Joshua D. Drake


- -- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
      PostgreSQL political pundit | Mocker of Dolphins

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH2xkkATb/zqfZUUQRAsFxAJ422xFUGNwJZZVS47SwM9HJEYrb/gCePESL
YZFM27b93ylhy5TuE2MCcww=
=2Zpp
-----END PGP SIGNATURE-----


view thread (9+ messages)  latest in thread

Message-ID: <20080314173235.58f854e6@commandprompt.com>
Permalink:  ../20080314173235.58f854e6@commandprompt.com/
Also on:    postgresql.org/message-id/20080314173235.58f854e6@commandprompt.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-performance@postgresql.org
  Cc: jd@commandprompt.com, vgopal@abaca.com
  Subject: Re: best way to run maintenance script
  In-Reply-To: <20080314173235.58f854e6@commandprompt.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