Re: Set hint bits upon eviction from BufMgr

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set hint bits upon eviction from BufMgr
Date: 2011-03-28 14:43:55
Message-ID: AANLkTikbvOD+VysATiUezLyGZcxcbzdCFvpTw=-7yFBi@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 28, 2011 at 10:19 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Mon, Mar 28, 2011 at 9:48 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>>> I was thinking about setting a
>>> flag in the buffer (BM_HEAP) that gets set by the loader which flags
>>> the buffer for later inspection.  Is there a simpler way to do this?
>
>> Hmm.  That's slightly crufty, but it might be OK.  At least, I don't
>> have a better idea.
>
> 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"?)

Well, that's why Merlin was suggesting having the backends that read
the buffers in flag the heap pages as BM_HEAP. Then the background
writer can just examine that bit.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2011-03-28 14:44:29 Re: Comments on system tables and columns
Previous Message Robert Haas 2011-03-28 14:42:43 Re: Additional options for Sync Replication