pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedOrphan files
3+ messages / 3 participants
[nested] [flat]
* Orphan files
@ 2006-04-28 02:05 dzung nguyen the <dzungthenguyen@yahoo.com>
0 siblings, 2 replies; 3+ messages in thread
From: dzung nguyen the @ 2006-04-28 02:05 UTC (permalink / raw)
To: pgsql-admin
Our database files are becoming bigger and bigger.
We checked OID with filenodes and found some filenodes
that don't have a corresponding OID.
Can I delete these files ? Or give me an advice, please.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Orphan files
@ 2006-04-28 04:43 Tom Lane <tgl@sss.pgh.pa.us>
parent: dzung nguyen the <dzungthenguyen@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2006-04-28 04:43 UTC (permalink / raw)
To: dzung nguyen the <dzungthenguyen@yahoo.com>; +Cc: pgsql-admin
dzung nguyen the <dzungthenguyen@yahoo.com> writes:
> Our database files are becoming bigger and bigger.
> We checked OID with filenodes and found some filenodes
> that don't have a corresponding OID.
OID? Or relfilenode? Please read
http://www.postgresql.org/docs/8.1/static/storage.html
pretty darn carefully before you go around deleting files
that you don't know the purpose of.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Orphan files
@ 2006-04-28 06:47 Robin Iddon <robin@edesix.com>
parent: dzung nguyen the <dzungthenguyen@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Robin Iddon @ 2006-04-28 06:47 UTC (permalink / raw)
To: pgsql-admin
> 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).
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-04-28 06:47 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-28 02:05 Orphan files dzung nguyen the <dzungthenguyen@yahoo.com>
2006-04-28 04:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-04-28 06:47 ` Robin Iddon <robin@edesix.com>
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