Re: Idea for getting rid of VACUUM FREEZE on cold pages

From: Jesper Krogh <jesper(at)krogh(dot)cc>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Idea for getting rid of VACUUM FREEZE on cold pages
Date: 2010-05-27 05:56:16
Message-ID: C4B54ABC-26C4-4416-AE30-B76EEF7E8C29@krogh.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 27/05/2010, at 02.48, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Wed, May 26, 2010 at 8:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>>> How does that get us out of reading and writing old pages, though?
>>
>> Yeah. Neither PD_ALL_VISIBLE nor the visibility map are going to
>> solve
>> your problem, because they cannot become set without having visited
>> the
>> page.
>
> Well, maybe I'm confused here, but arranging things so that we NEVER
> have to visit the page after initially writing it seems like it's
> setting the bar almost impossibly high. Consider a table that is
> regularly written but append-only. Every time autovacuum kicks in,
> we'll go and remove any dead tuples and then mark the pages
> PD_ALL_VISIBLE and set the visibility map bits, which will cause
> subsequent vacuums to ignore the all-visible portions of the table...
> until anti-wraparound kicks in, at which point we'll vacuum the entire
> table and freeze everything.

Just a thought. Wouldn't a All-visible bit also enable index only
scans to some degree?

Jesper

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-05-27 06:21:58 Re: Synchronization levels in SR
Previous Message Joshua Tolley 2010-05-27 03:24:10 Re: [PATCH] Add _PG_init to PL language handler documentation