Modify local buffer management to request memory for local buffers in blocks
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 27 Dec 2006 22:31:59 +0000 (22:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 27 Dec 2006 22:31:59 +0000 (22:31 +0000)
commitf285432b1071553fca679e49520fe194a79a5ac1
tree145883188c7556abb7507c3eff64364a69081e5f
parent0e2e78830f33821f9738a7271b460ca8b4b39a94
Modify local buffer management to request memory for local buffers in blocks
of increasing size, instead of one at a time.  This reduces the memory
management overhead when num_temp_buffers is large: in the previous coding
we would actually waste 50% of the space used for temp buffers, because aset.c
would round the individual requests up to 16K.  Problem noted while studying
a performance issue reported by Steven Flatt.

Back-patch as far as 8.1 --- older versions used few enough local buffers
that the issue isn't significant for them.
src/backend/storage/buffer/localbuf.c