Re: Vacuum problems

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: "Scot Kreienkamp" <SKreien(at)la-z-boy(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuum problems
Date: 2009-01-06 18:42:03
Message-ID: dcc563d10901061042l58b7130cqee2ee469728604d1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 6, 2009 at 9:05 AM, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com> wrote:
> you don't have to reindex too often - it locks exclusively whole
> table, just like vacuum full. Just do it every few months, depending
> on db growth.

While I don't wholly disagree with periodic reindexing, I do recommend
that one keeps track of bloat. It's easy enough to have an alarm that
goes off if any index gets over 50% dead space, then go look at the
database. Or go in every week and see what vacuum verbose looks like.
Even if you just email yourself a copy of the last 10 or 15 lines
every morning or something to see how bloated the db is in general,
you'll catch most problems before they become problems. One or two
rogue updates without where clauses on medium to large sized tables
can blow you right out of the water. Best to have some way to keep
track of them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-01-06 18:48:47 Re: COPY ... FROM Permission denied ...
Previous Message Pedro Doria Meunier 2009-01-06 18:41:41 COPY ... FROM Permission denied ...