Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )
Date: 2009-08-13 23:21:47
Message-ID: 407d949e0908131621x273d8930lc086e4084570c19d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Fri, Aug 14, 2009 at 12:07 AM, Josh Berkus<josh(at)agliodbs(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-13 23:21:55 Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )
Previous Message Jeff Davis 2009-08-13 23:21:09 Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-08-13 23:21:55 Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )
Previous Message Jeff Davis 2009-08-13 23:21:09 Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )