Matthew T. O'Connor wrote:
> Christopher Browne wrote:
>
>> Gaetano Mendola <mendola@bigfoot.com> writes:
>>
>>
>>> I do a graph about my disk usage and it's a ramp since one week,
>>> I'll continue to wait in order to see if it will decrease.
>>> I was expecting the steady state at something like 4 GB
>>> ( after a full vacuum and reindex ) + 10 % = 4.4 GB
>>> I'm at 4.6 GB and increasing. I'll see how it will continue.
>>>
>>
>>
>> You probably want for the "experiment" to last more than a week.
>>
>> After all, it might actually be that with your usage patterns, that
>> table would stabilize at 15% "overhead," and that might take a couple
>> or three weeks.
>>
>> Unless it's clear that it's growing perilously quickly, just leave it
>> alone so that there's actually some possibility of reaching an
>> equilibrium. Any time you "VACUUM FULL" it, that _destroys_ any
>> experimental results or any noticeable patterns, and it guarantees
>> that you'll see "seemingly perilous growth" for a while.
>>
>> And if the table is _TRULY_ growing "perilously quickly," then it is
>> likely that you should add in some scheduled vacuums on the table.
>> Not VACUUM FULLs; just plain VACUUMs.
>>
>> I revised cron scripts yet again today to do hourly and "4x/day"
>> vacuums of certain tables in some of our systems where we know they
>> need the attention. I didn't schedule any VACUUM FULLs; it's
>> unnecessary, and would lead directly to system outages, which is
>> totally unacceptable.
>>
>>
>
> Chris, is this in addition to pg_autovacuum? Or do you not use
> pg_autovacuum at all?, and if so why not?
I have the same requirement too. Actually pg_autovacuum can not be
instructed "per table" so some time the global settings are not good
enough. I have a table of logs with 6 milions rows ( 3 years logs )
I insert on that page ~ 6000 rows for day. I'm running pg_autovacuum
with setting to ANALYZE or VACUUM table if the 10% is touched.
With this setting pg_autovacuum will analyze that table each 3 months!!!
So I need to analyze and/or vacuum it manually.
Regards
Gaetano Mendola