]> granicus.if.org Git - postgresql/commit
Improve GIN index build's tracking of memory usage by using
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Nov 2007 21:55:59 +0000 (21:55 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Nov 2007 21:55:59 +0000 (21:55 +0000)
commit6f4cfe48ac6234e6dca165d52673777e7b4357f1
tree7103705e5428461293315b1e10faaf2644fa4afe
parent16dcd5e5ce460c976cec93cfbbe4e6e970168450
Improve GIN index build's tracking of memory usage by using
GetMemoryChunkSpace, not just the palloc request size.  This brings the
allocatedMemory counter close enough to reality (as measured by
MemoryContextStats printouts) that I think we can get rid of the arbitrary
factor-of-2 adjustment that was put into the code initially.  Given the
sensitivity of GIN build to work memory size, not using as much of work
memory as we're allowed to seems a pretty bad idea.
src/backend/access/gin/ginbulk.c
src/backend/access/gin/gininsert.c