From: Robin Iddon <robin@edesix.com>
To: pgsql-admin@postgresql.org
Subject: Re: Orphan files
Date: Fri, 28 Apr 2006 07:47:52 +0100
Message-ID: <4451BA98.30005@edesix.com> (raw)
In-Reply-To: <20060428020515.30357.qmail@web30515.mail.mud.yahoo.com>
References: <20060428020515.30357.qmail@web30515.mail.mud.yahoo.com>
> Can I delete these files ? Or give me an advice, please.
>
When I had a similar problem it turned out that I had exceeded the
limits of my FSM and thus the stats table in particular was growing as
it was unable to reuse rows.
Check your FSM size in postgresql.conf and see what:
max_fsm_pages
max_fsm_relations
are set to. Note that these are set for the whole cluster not per database.
To recover the lost space you will need to do a vacuum full at some
point, I think. This is going to take a while and it's going to affect
people's access to the database, so do it when the database would
otherwise be idle if at all possible. In any case if you run
vacuumdb -avf
it will compact your tables and at the end, it prints out the FSM
settings you should have had for the expired data space that was in your
database. If those numbers are larger than the settings you have, then
you have blown the FSM and need to increase them or increase the
frequency at which you vacuum. Remember FSM is cluster-wide so you must
use "-a" above otherswise the FSM output at the end won't be meaningful.
The problem I had was that (a) my FSM was too small anyway but (b) I had
left the default settings for pg_autovacuum (I use 8.0 at present) and
these weren't right - some tables were never vacuumed.
Note also that indexes sometimes need to be reindexed to recover free
space. Exactly how you do that depends on which version of postgres you
are running.
Finally, to see how big PG thinks your tables are try querying pg_class
and check out relpages/reltuples (but you also need to understand how
toast works to get the full picture - hence read the storage documentation).
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: robin@edesix.com
Subject: Re: Orphan files
In-Reply-To: <4451BA98.30005@edesix.com>
References: <20060428020515.30357.qmail@web30515.mail.mud.yahoo.com> <4451BA98.30005@edesix.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