Skip to content

Commit 74a379b

Browse files
committed
Use repalloc_huge() to enlarge a SPITupleTable's tuple pointer array.
Commit 23a27b0 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
1 parent 3adf9ce commit 74a379b

File tree

1 file changed

+1
-1
lines changed
  • src/backend/executor

1 file changed

+1
-1
lines changed

src/backend/executor/spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,7 @@ spi_printtup(TupleTableSlot *slot, DestReceiver *self)
18001800
/* Double the size of the pointer array */
18011801
tuptable->free = tuptable->alloced;
18021802
tuptable->alloced += tuptable->free;
1803-
tuptable->vals = (HeapTuple *) repalloc(tuptable->vals,
1803+
tuptable->vals = (HeapTuple *) repalloc_huge(tuptable->vals,
18041804
tuptable->alloced * sizeof(HeapTuple));
18051805
}
18061806

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy