Re: Aggressive freezing in lazy-vacuum

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Aggressive freezing in lazy-vacuum
Date: 2007-03-06 11:12:47
Message-ID: 87vehebp74.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-performance


"ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:

> I don't think we can supply such a historical database functionality here,
> because we can guarantee it just only for INSERTed tuples even if we pay
> attention. We've already enabled autovacuum as default, so that we cannot
> predict when the next vacuum starts and recently UPDATEd and DELETEd tuples
> are removed at random times. Furthermore, HOT will also accelerate removing
> expired tuples. Instead, we'd better to use WAL or something like audit
> logs for keeping history information.

Well comparing the data to WAL is precisely the kind of debugging that I think
Tom is concerned with.

The hoped for gain here is that vacuum finds fewer pages with tuples that
exceed vacuum_freeze_min_age? That seems useful though vacuum is still going
to have to read every page and I suspect most of the writes pertain to dead
tuples, not freezing tuples.

This strikes me as something that will be more useful once we have the DSM
especially if it ends up including a frozen map. Once we have the DSM vacuum
will no longer be visiting every page, so it will be much easier for pages to
get quite old and only be caught by a vacuum freeze. The less i/o that vacuum
freeze has to do the better. If we get a freeze map then agressive freezing
would help keep pages out of that map so they never need to be vacuumed just
to freeze the tuples in them.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-03-06 11:36:40 Re: user-defined tree methods in GIST
Previous Message Anu Gupta DCSA 2007-03-06 10:14:08 A Survey on Defect Management Practices in Free/Open Source Software

Browse pgsql-patches by date

  From Date Subject
Next Message NikhilS 2007-03-06 11:57:50 Auto creation of Partitions
Previous Message ITAGAKI Takahiro 2007-03-06 10:03:03 Re: Aggressive freezing in lazy-vacuum

Browse pgsql-performance by date

  From Date Subject
Next Message lissette 2007-03-06 11:36:13 help
Previous Message ITAGAKI Takahiro 2007-03-06 10:03:03 Re: Aggressive freezing in lazy-vacuum