Data Partition is Growing

Поиск
Список
Период
Сортировка
Искать

Data Partition is Growing

От:
Mike Darretta <michael.darretta.ctr@metnet.navy.mil>
Дата:
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

Re: Data Partition is Growing

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Mike Darretta  writes:
> 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

Re: Data Partition is Growing

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
... forgot to mention ...

Mike Darretta  writes:
> 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

Re: Data Partition is Growing

От:
Mike Darretta <michael.darretta.ctr@metnet.navy.mil>
Дата:
Thanks. I'll investigate and let you know how things go....

Mike

Tom Lane wrote:

>Mike Darretta  writes:
>  
>
>>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
>
>  
>


FAQ