Re: RC2 and open issues

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Huxton <dev(at)archonet(dot)com>, simon(at)2ndquadrant(dot)com, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RC2 and open issues
Date: 2004-12-21 22:25:33
Message-ID: 20041221222533.GP18180@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 21, 2004 at 10:26:48AM -0500, Tom Lane wrote:
> Richard Huxton <dev(at)archonet(dot)com> writes:
> > However, one thing you can say is that if block B hasn't been written to
> > since you last checked, then any blocks older than that haven't been
> > written to either.
>
> [ itch... ] Can you? I don't recall exactly when a block gets pushed
> up the ARC list during a ReadBuffer/WriteBuffer cycle, but at the very
> least I'd have to say that this assumption is vulnerable to race
> conditions.
>
> Also, the cntxDirty mechanism allows a block to be dirtied without
> changing the ARC state at all. I am not very clear on whether Vadim
> added that mechanism just for performance or because there were
> fundamental deadlock issues without it; but in either case we'd have
> to think long and hard about taking it out for the bgwriter's benefit.

OTOH, ISTM that it's ok if the bgwriter occasionally misses blocks.
These blocks would either result in a backend or the checkpointer having
to write out a block (not so great), or the bgwriter could occasionally
ignore it's bookmart and restart it's scan from the LRU.

Of course I'm assuming that any race-conditions could be made to impact
only the bgwriter and nothing else, which may be a bad assumption.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Wong 2004-12-21 22:43:55 Re: pg_autovacuum w/ dbt2
Previous Message Jim C. Nasby 2004-12-21 22:17:17 Re: Bgwriter behavior