GIN index build's allocatedMemory counter needs to be long, not uint32.

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

Commit: 16dcd5e5ce460c976cec93cfbbe4e6e970168450
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-11-16T21:50:06Z
Releases: 8.3.0
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.

Files

PathChange+/−
src/include/access/gin.h modified +2 −2