GIN index build's allocatedMemory counter needs to be long, not uint32.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Nov 2007 21:50:13 +0000 (21:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Nov 2007 21:50:13 +0000 (21:50 +0000)
commit522360826d800ba2a27d08e897995619cade8411
tree9813e08db564aa007dc5bf7c5d7a6acdf3a8ae70
parentf22f0bf310f92464b560078aa5eb3b754b827513
GIN index build's allocatedMemory counter needs to be long, not uint32.
Else, in a 64-bit machine with maintenance_work_mem set to above 4Gb,
the counter overflows and we never recognize having reached the
maintenance_work_mem limit.  I believe this explains out-of-memory
failure recently reported by Sean Davis.

This is a bug, so backpatch to 8.2.
src/include/access/gin.h