Fix oversight in sizing of shared buffer lookup hashtable. Because

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 69f3a5c9ed7bf369db49a1696ec430d2710ef9e1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-07-23T18:34:50Z
Releases: 8.1.5
Fix oversight in sizing of shared buffer lookup hashtable.  Because
BufferAlloc tries to insert a new mapping entry before deleting the old one
for a buffer, we have a transient need for more than NBuffers entries ---
one more in 8.1, and as many as NUM_BUFFER_PARTITIONS more in CVS HEAD.
In theory this could lead to an "out of shared memory" failure if shmem
had already been completely claimed by the time the extra entries were
needed.

Files

PathChange+/−
src/backend/storage/buffer/freelist.c modified +9 −4