Thread: Re: [PERFORM] More detail on settings for pgavd?

Re: [PERFORM] More detail on settings for pgavd?

From
Tom Lane
Date:
Chester Kustarz <chester@arbor.net> writes:
> i have some tables which are insert only. i do not want to vacuum them
> because there are never any dead tuples in them and the vacuum grows the
> indexes.

Those claims cannot both be true.  In any case, plain vacuum cannot grow
the indexes --- only a VACUUM FULL that moves a significant number of
rows could cause index growth.

> vacuum is to reclaim dead tuples. this means it depends on update and
> delete. analyze depends on data values/distribution. this means it depends on
> insert, update, and delete. thus the dependencies are slightly different
> between the 2 operations, an so you can come up with use-cases that
> justify running either more frequently.

Agreed.

            regards, tom lane

Re: [PERFORM] More detail on settings for pgavd?

From
"Matthew T. O'Connor"
Date:
Tom Lane wrote:

>Chester Kustarz <chester@arbor.net> writes:
>
>
>>vacuum is to reclaim dead tuples. this means it depends on update and
>>delete. analyze depends on data values/distribution. this means it depends on
>>insert, update, and delete. thus the dependencies are slightly different
>>between the 2 operations, an so you can come up with use-cases that
>>justify running either more frequently.
>>
>>
>Agreed.
>
>

And that is why pg_autovacuum looks at insert, update and delete when
deciding to do an analyze, but only looks at update and delete when
deciding to do a vacuum.  In addition, this is why pg_autovacuum was
given knobs so that the vacuum and analyze thresholds can be set
independently.

Matthew