pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Iain <iain@mst.co.jp>
Cc: pgsql-admin@postgresql.org
Subject: Re: Routine maintenance - vacuum, analyse and autovacuum
Date: Sun, 01 Feb 2004 21:13:50 -0500
Message-ID: <26786.1075688030@sss.pgh.pa.us> (raw)
In-Reply-To: <004201c3e931$52120d90$7201a8c0@mst1x5r347kymb>
References: <000901c3e64e$9611c390$7201a8c0@mst1x5r347kymb>
	<23606.1075393949@sss.pgh.pa.us>
	<004201c3e931$52120d90$7201a8c0@mst1x5r347kymb>

"Iain" <iain@mst.co.jp> writes:
>> Just moving from 7.1 to 7.4 should help, since you can start using plain
>> vacuum (7.1's vacuum is equivalent to vacuum full IIRC).

> That old DB server has been running contnuously for 2 years they tell me.
> Apparently it is also growing despite nightly vacuums and a stable data set
> size (old data is purged dai.ly and monthly). Nightly delete/insert batches
> and vacuums are taking longer and longer too. I suspect the vacuum isn't
> doing what they think - possibly due to the FSM being at the default, and
> possibly due to ghost processes holding old record versions open. It has
> been stable nonetheless. Anyway, I'm sure we can do much better in 7.4.

Kinda sounds like index bloat to me --- have you done any looking to
determine which files are growing?

> OK, that's the kind of thing I wanted to know. Basically, partial runs of
> vacuum full are not likely to be of any benefit. So, unless you intend to
> let it run to completion, best to avoid it.

Right.

> Given that our system experiences quite heavy usage during the day, and has
> a nightly window for batch processing I'm wondering if the best way to go
> about this is to give auto vacuum a miss and just do a standard vacuum after
> the batch processes have completed. As long as the FSM is big enough to
> handle the amount of data changed in 1 day, it would be OK, right?

Yes, though plain VACUUM is not as much of a drag on performance as
VACUUM FULL (== 7.1 VACUUM).  So you might want to experiment and
see if you can get away with it during the day.  Also note there is work
afoot to reduce the VACUUM performance drag even further in 7.5.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <26786.1075688030@sss.pgh.pa.us>
Permalink:  ../26786.1075688030@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26786.1075688030@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, iain@mst.co.jp
  Subject: Re: Routine maintenance - vacuum, analyse and autovacuum
  In-Reply-To: <26786.1075688030@sss.pgh.pa.us>
  References: <000901c3e64e$9611c390$7201a8c0@mst1x5r347kymb> <23606.1075393949@sss.pgh.pa.us> <004201c3e931$52120d90$7201a8c0@mst1x5r347kymb> <26786.1075688030@sss.pgh.pa.us>

* 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