Discussion:
Data Partition is Growing
(too old to reply)
Mike Darretta
2004-09-29 23:48:42 UTC
Permalink
I'm an application developer trying to understand a pg data partition
issue. We are storing large objects (gifs) at a rate of about 1GIG /day.
After about a week, most of the objects are recycled -- that is, an
insert triggers a delete of a similar object. The postgres data
partition, though, continues to grow, even though the objects are
successfully deleted from the application *and* largeobject tables. I
understand that removing an object from the database does not
automatically free up disk space, but I expected to see the disk space
"level out" at some point. The data partition is currently at 40Gig and
growing.

We are running Postgres 7.4 with the incremental vacuum process active.

Any thoughts?

Thanks,
Mike


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Tom Lane
2004-09-30 01:13:51 UTC
Permalink
Post by Mike Darretta
I'm an application developer trying to understand a pg data partition
issue. We are storing large objects (gifs) at a rate of about 1GIG /day.
After about a week, most of the objects are recycled -- that is, an
insert triggers a delete of a similar object. The postgres data
partition, though, continues to grow, even though the objects are
successfully deleted from the application *and* largeobject tables.
You need to check your free-space-map settings --- it sounds like the
FSM is not large enough to keep track of all the free space in
pg_largeobject.

If you do a "vacuum verbose" across the whole database, the tail end of
the (voluminous) printout will tell you something about where you need
to set the FSM parameters.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
Mike Darretta
2004-09-30 16:43:12 UTC
Permalink
Thanks. I'll investigate and let you know how things go....

Mike
Post by Tom Lane
Post by Mike Darretta
I'm an application developer trying to understand a pg data partition
issue. We are storing large objects (gifs) at a rate of about 1GIG /day.
After about a week, most of the objects are recycled -- that is, an
insert triggers a delete of a similar object. The postgres data
partition, though, continues to grow, even though the objects are
successfully deleted from the application *and* largeobject tables.
You need to check your free-space-map settings --- it sounds like the
FSM is not large enough to keep track of all the free space in
pg_largeobject.
If you do a "vacuum verbose" across the whole database, the tail end of
the (voluminous) printout will tell you something about where you need
to set the FSM parameters.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Tom Lane
2004-09-30 01:15:32 UTC
Permalink
... forgot to mention ...
Post by Mike Darretta
We are running Postgres 7.4 with the incremental vacuum process active.
Also make sure you have an up-to-date version of pg_autovacuum. The
early releases had bugs that could prevent it from vacuuming very large
tables at all :-( ... and your pg_largeobject table definitely qualifies
as large.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly
Loading...