From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Bug in new buffer freelist code |
Date: | 2004-01-07 18:47:54 |
Message-ID: | 20478.1073501274@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Neil Conway <neilc(at)samurai(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> It might also be worthwhile to add another BM_FLAG bit that
>> specifically indicates a buffer is on the freelist, and
>> set/clear/test that at appropriate spots.
> ISTM that BM_FREE should indicate this, or am I misunderstanding you?
No. BM_FREE means refcount == 0. In the old implementation this meant
it was "on the freelist", but in the ARC code there are several
"freelists". I was speaking specifically of the freelist that's used to
hold completely-dead buffers (buffers not containing any valid page).
It might be a good idea to rename BM_FREE to something else, perhaps
BM_UNPINNED, since I can recall being confused about what it meant too.
Also, if Jan likes the idea of adding a flag bit for this purpose, maybe
there should be a flag bit associated with each of the ARC freelists,
so you can tell positively where a "free" buffer is supposed to be.
The dead-buffer freelist may not need a flag bit per se, since the
condition of the buffertag being "clear" should be equivalent.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2004-01-07 18:52:35 | Re: OFF TOPIC!! Re: Paypal WAS: PostgreSQL speakers |
Previous Message | Neil Conway | 2004-01-07 18:38:26 | Re: Bug in new buffer freelist code |