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)
commitaf862b90c53746bf2ca0de0016c11b2820ae6300
tree15696ae5ce69c1860b5510bd2c3a46a7f03caf23
parent522360826d800ba2a27d08e897995619cade8411
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