Re: Set hint bits upon eviction from BufMgr

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set hint bits upon eviction from BufMgr
Date: 2011-03-28 14:29:34
Message-ID: 4D9054FE020000250003BD6E@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> The major problem with all of this is that the bgwriter has no
> idea which buffers contain heap pages. And I'm not convinced it's
> a good idea to try to let it know that. If we get to the point
> where bgwriter is trying to do catalog accesses, we are in for a
> world of pain. (Can you say "modularity violation"? How about
> "deadlock"?)

How about having a BackgroundPrepareForWriteFunction variable
associated with each page the bgwriter might see, which would be a
pointer to a function to call (if the variable is not NULL) before
writing? The bgwriter would still have no idea what kind of page it
was or what the function did....

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-03-28 14:31:30 Re: alpha5
Previous Message Shridhar Polas 2011-03-28 14:21:54 Triggers on system catalog