Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? ) - Mailing list pgsql-hackers

From Greg Stark
Subject Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )
Date
Msg-id 407d949e0908131621x273d8930lc086e4084570c19d@mail.gmail.com
Whole thread Raw
In response to Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Fri, Aug 14, 2009 at 12:07 AM, Josh Berkus<josh@agliodbs.com> wrote:
> "freeze this table agressively if it's in memory, but wait a long time
> to vaccuum if it's on disk"

Waitasec, "in memory"?

There are two projects here:

1) Make vacuum when it's freezing tuples freeze every tuple > lesser
age if it finds any tuples which are > max_age (or I suppose if the
page is already dirty due to vacuum or something else). Vacuum still
has to read in all the pages before it finds out that they don't need
freezing so it doesn't mean distinguishing "in memory" from "needs to
be read in".

2) Have something like bgwriter check if the page is dirty and vacuum
and freeze things based on the lesser threshold. This would
effectively only be vacuuming things that are "in memory"

However the latter is a more complex and frought project. We looked at
this a while back in EDB and we found that the benefits were less than
we expected and the complexities more than we expected.  I would
recommend sticking with (1) for now and only looking at (2) if we have
a more detailed plan and solid testable use cases.

-- 
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )
Next
From: Greg Stark
Date:
Subject: Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )