Re: Display Pg buffer cache (WIP)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Kirkwood <markir(at)coretech(dot)co(dot)nz>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Display Pg buffer cache (WIP)
Date: 2005-03-05 16:00:02
Message-ID: 17431.1110038402@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Mark Kirkwood <markir(at)coretech(dot)co(dot)nz> writes:
> In addition to holding the BufMappingLock, each buffer header is (spin)
> locked before examining it, hopefully this is correct - BTW, I like the
> new buffer lock design.

It'd be possible to dispense with the per-buffer spinlocks so long as
you look only at the tag (and perhaps the TAG_VALID flag bit). The
tags can't be changing while you hold the BufMappingLock. I'm dubious
that there's any point in recording information as transient as the
refcounts and dirtybits, and reducing the amount of time you hold the
lock would be a Good Thing.

Also, you're still not dealing with the case of a not-valid buffer in a
reasonable way.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Pavel Stehule 2005-03-05 19:06:23 Re: Exception ERROR Code
Previous Message Tom Lane 2005-03-05 15:54:26 Re: fork() refactoring