pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: James Cloos <cloos@jhcloos.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: When does VACUUM FULL not clean out all deleted data?
Date: Fri, 4 Jan 2008 11:02:33 -0600
Message-ID: <dcc563d10801040902t15784c38vff8c91e3b9207a9c@mail.gmail.com> (raw)
In-Reply-To: <m34pdteh7k.fsf@lugabout.jhcloos.org>
References: <m3lk76du4c.fsf@lugabout.jhcloos.org>
	<10656.1199426607@sss.pgh.pa.us>
	<m34pdteh7k.fsf@lugabout.jhcloos.org>

On Jan 4, 2008 9:35 AM, James Cloos <cloos@jhcloos.com> wrote:
> >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> >> Why was the db using that extra five plus gigs?
>
> Tom> Smells like a hadn't-been-vacuuming-often-enough problem.
>
> Sorry, I forgot to mention:  autovacuum was enabled and I also ran
> this script every night via cron:
>
> #!/bin/bash
> FULL=''
> test $(date +%w) -eq 0 && FULL='FULL'
> exec psql -U dbm -c "VACUUM ${FULL} VERBOSE ANALYZE" dbm

Note that routine vacuum FULL is not a good idea actually.  vacuum
full is something you run when things have gone wrong (i.e. not enough
regular vacuuming) and it is usually best followed by reindexing all
your indexes.

It's far better to keep track of bloat and run vacuum full, if at all,
by hand, and only when needed.  Running it regularly with no
reindexing often results in index bloat which makes the database
slower not faster.



view thread (10+ messages)  latest in thread

Message-ID: <dcc563d10801040902t15784c38vff8c91e3b9207a9c@mail.gmail.com>
Permalink:  ../dcc563d10801040902t15784c38vff8c91e3b9207a9c@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10801040902t15784c38vff8c91e3b9207a9c@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: scott.marlowe@gmail.com, cloos@jhcloos.com, tgl@sss.pgh.pa.us
  Subject: Re: When does VACUUM FULL not clean out all deleted data?
  In-Reply-To: <dcc563d10801040902t15784c38vff8c91e3b9207a9c@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