Re: [HACKERS] storage/buffer/README docs about buffer replacement are out of date

2015-11-10 Thread Alvaro Herrera
Andres Freund wrote: > Now a) and b) are recent oversights of mine. I'd apparently not realized > that there's detailed docs on this in buffer/README. But c) is pretty > old - essentially 5d50873 from 2005. > > I wonder if it's worthwhile to go into that level of detail - seems > kinda likely to

Re: [HACKERS] storage/buffer/README docs about buffer replacement are out of date

2015-11-09 Thread Amit Kapila
On Tue, Nov 10, 2015 at 3:34 AM, Andres Freund wrote: > > Hi, > > $subject contains: > > > The "clock hand" is a buffer index, nextVictimBuffer, that moves circularly > > through all the available buffers. nextVictimBuffer is protected by the > > buffer_strategy_lock. > > > > The algorithm for a

[HACKERS] storage/buffer/README docs about buffer replacement are out of date

2015-11-09 Thread Andres Freund
Hi, $subject contains: > The "clock hand" is a buffer index, nextVictimBuffer, that moves circularly > through all the available buffers. nextVictimBuffer is protected by the > buffer_strategy_lock. > > The algorithm for a process that needs to obtain a victim buffer is: > > 1. Obtain buffer_s