Re: Buffer Cache Problem

2023-11-10 Thread jacktby jacktby
Hi, I have 3 questions here: 1. I see comments in but_internals.h below: * Also, in places we do one-time reads of the flags without bothering to * lock the buffer header; this is generally for situations where we don't * expect the flag bit being tested

Re: Buffer Cache Problem

2023-11-10 Thread jacktby jacktby
> 2023年11月10日 22:31,jacktby jacktby 写道: > > In the bus_internal.h,I see > > Note: Buffer header lock (BM_LOCKED flag) must be held to examine or change > tag, state or wait_backend_pgprocno fields. >

Re: Buffer Cache Problem

2023-11-10 Thread jacktby jacktby
In the bus_internal.h,I see Note: Buffer header lock (BM_LOCKED flag) must be held to examine or change tag, state or wait_backend_pgprocno fields. As we all know, this buffer header lock

Re: Buffer Cache Problem

2023-11-07 Thread Matthias van de Meent
On Tue, 7 Nov 2023 at 14:28, jacktby jacktby wrote: > > Hi, postgres hackers, I’m studying postgres buffer cache part. So I open this > thread to communicate some buffer cache codes design and try to improve some > tricky codes. > > For Buffer Cache, we know it’s a buffer array, every bucket of

Buffer Cache Problem

2023-11-07 Thread jacktby jacktby
Hi, postgres hackers, I’m studying postgres buffer cache part. So I open this thread to communicate some buffer cache codes design and try to improve some tricky codes. For Buffer Cache, we know it’s a buffer array, every bucket of this array is consist of a data page and its header which is