Richard Huxton wrote:
> Joe Maldonado wrote:
>
>> Hello all,
>> I have a few somewhat simple questions....
>>
>> Does the postmaster vacuum it's internal (pg_*) tables? if not
>> what is the best way to vacuum them without having to vacuum the
>> entire db?
>> and how often is this recommended to be done?
>
>
> No, and I'd vacuum full template1.
I'm not sure what you mean by No. If I fun a vacuum command from psql
inside one of my databases, then all the pg_ tables will get vacuumed.
Also, vacuum full on template1 is only going to help with the small
handful of shared tables. Most of the pg_ tables are not shared, so
vacuuming them inside template1 is not going to help the their
performance inside a particular DB.
>
> How often? Depends on how much activity you've got on your system
> tables. If you look at the output on vacuum verbose you can see how
> much work it has to do.
You can also run pg_autovacuum which does monitor activity for you and
does vacuum system tables.