aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-11-16 21:50:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-11-16 21:50:06 +0000
commit16dcd5e5ce460c976cec93cfbbe4e6e970168450 (patch)
tree1fa2e9ab209c54a5db7b082052c2419da88708ec /src
parent015794541dd8190801c34d8324382c3849b3b3b6 (diff)
downloadpostgresql-16dcd5e5ce460c976cec93cfbbe4e6e970168450.tar.gz
postgresql-16dcd5e5ce460c976cec93cfbbe4e6e970168450.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/include/access/gin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index a6bdf1a6e6a..fdc0c0a8e47 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2006-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.14 2007/11/15 21:14:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.15 2007/11/16 21:50:06 tgl Exp $
*--------------------------------------------------------------------------
*/
@@ -453,7 +453,7 @@ typedef struct
uint32 maxdepth;
EntryAccumulator **stack;
uint32 stackpos;
- uint32 allocatedMemory;
+ long allocatedMemory;
uint32 length;
EntryAccumulator *entryallocator;