[prev] 13 [next]

PostgreSQL Buffer Manager (cont)

Buffer pool consists of:

BufferDescriptors

  • shared fixed array (size NBuffers) of BufferDesc
BufferBlocks
  • shared fixed array (size NBuffers) of Buffer
Buffer = index values 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