Jeff Davis wrote:
> On Mon, 2008-12-22 at 21:24 +0200, Heikki Linnakangas wrote:
>> Introduce new vacuum_freeze_max_age setting. Manual VACUUM will scan the
>> whole table and advance relfrozenxid, if relfrozenxid is older than
>> vacuum_freeze_max_age.
>>
>
> It's confusing to have two GUCs named vacuum_freeze_min_age and
> vacuum_freeze_max_age with incompatible definitions. The former is the
> minimum transaction age of a tuple found during the scan of a table,
> while the latter is the maximum transaction age of the relfrozenxid of
> the table.
>
>> If you set vacuum_freeze_max_age to 0, the visibility map is not used to
>> skip pages, so you'll get the pre-8.4 old behavior.
>
> Seems like a strange way to turn off visibility maps, and the meaning
> doesn't seem to fit with either vacuum_freeze_min_age or
> autovacuum_freeze_max_age.
>
> The proposal itself makes sense, but I think we need to decide on some
> better names. Right now the meanings of autovacuum_freeze_max_age and
> vacuum_freeze_min_age are incompatible, so we're not in a good position,
> but there has to be something less confusing.
>
> For one thing, there isn't even a common definition of "min" or "max"
> between them. They both trigger an event (freezing or vacuuming) when
> something (tuple xmin or relfrozenxid) exceeds some number. Why is one
> called a min and the other a max?
Yeah, you're right. Fuji's point that it's confusing that you can have a
min greater than max is also valid.
How about
autovacuum_freeze_max_age -> autovacuum_freeze_scan_age
vacuum_freeze_max_age -> vacuum_freeze_scan_age
vacuum_freeze_min_age -> vacuum_freeze_tuple_age
*_scan_age settings control when the table is fully scanned to freeze
tuples and advance relfrozenxid, and vacuum_freeze_tuple_age controls
how old a tuple needs to be to be frozen. One objection is that you can
read "freeze_scan" to mean that a scan is frozen, like a tuple is
frozen. Any better ideas?
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com