[prev] 17 [next]

Buffer Pool Functions

Buffer manager interface:

Buffer ReadBuffer(Relation r, BlockNumber n)

  • ensures nth page of file for relation r is loaded
    (may need to remove an existing unpinned page and read data from file)
  • increments reference (pin) count and usage count for buffer
  • returns index of loaded page in buffer pool (Buffer value)
  • assumes main fork, so no ForkNumber required
Actually a special case of ReadBuffer_Common, which also handles variations like different replacement strategy, forks, temp buffers, ...