[prev] 63 [next]

PostgreSQL Buffer Manager (cont)

Buffer pool consists of:

BufferDescriptors    (i.e. directory)

  • shared fixed array of NBuffers x BufferDesc
BufferBlocks    (i.e. frames)
  • shared fixed array of NBuffers x buffers (each BLCKSZ bytes)
Buffer = index in above arrays
  • indexes: global buffers 1..NBuffers; local buffers negative
Size of buffer pool is set in postgresql.conf, e.g.

shared_buffers = 16MB   # min 128KB, 16*8KB buffers