Обсуждение: VACUUMING questions...

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

VACUUMING questions...

От
Joe Maldonado
Дата:
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?

Thanks,

-Joe

Re: VACUUMING questions...

От
Richard Huxton
Дата:
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.

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.
--
   Richard Huxton
   Archonet Ltd

Re: VACUUMING questions...

От
"Matthew T. O'Connor"
Дата:
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.

Re: VACUUMING questions...

От
Richard Huxton
Дата:
Matthew T. O'Connor wrote:
> 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.

I'd read the question as asking if they got dealt with automatically,
without sysadmin involvement.

--
   Richard Huxton
   Archonet Ltd