From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Subject: | Re: Visibility map and freezing |
Date: | 2009-01-07 07:34:05 |
Message-ID: | 49645AED.3060205@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2009-01-07 08:21:32 | Re: Visibility map and freezing |
Previous Message | Greg Smith | 2009-01-07 06:46:09 | Re: version() output vs. 32/64 bits |