diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-14 14:22:16 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-14 14:22:34 -0400 |
commit | 74a379b984d4df91acec2436a16c51caee3526af (patch) | |
tree | 5f6ae215a549907425438231fe44f28523c1a481 /src | |
parent | 3adf9ced17dfa84faa209127b4499e5a5b995806 (diff) | |
download | postgresql-74a379b984d4df91acec2436a16c51caee3526af.tar.gz postgresql-74a379b984d4df91acec2436a16c51caee3526af.zip |
Use repalloc_huge() to enlarge a SPITupleTable's tuple pointer array.
Commit 23a27b039d94ba35 widened the rows-stored counters to uint64, but
that's academic unless we allow the tuple pointer array to exceed 1GB.
(It might be a good idea to provide some other limit on how much storage
a SPITupleTable can eat. On the other hand, there are plenty of other
ways to drive a backend into swap hell.)
Dagfinn Ilmari Mannsåker
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/executor/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 3d04c23b4e0..fd9417904fd 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -1800,7 +1800,7 @@ spi_printtup(TupleTableSlot *slot, DestReceiver *self) /* Double the size of the pointer array */ tuptable->free = tuptable->alloced; tuptable->alloced += tuptable->free; - tuptable->vals = (HeapTuple *) repalloc(tuptable->vals, + tuptable->vals = (HeapTuple *) repalloc_huge(tuptable->vals, tuptable->alloced * sizeof(HeapTuple)); } |