mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Allow usage of huge maintenance_work_mem for GIN build.
Currently, in-memory posting list during GIN build process is limited 1GB because of using repalloc. The patch replaces call of repalloc to repalloc_huge. It increases limit of posting list from 180 millions (1GB / sizeof(ItemPointerData)) to 4 billions limited by maxcount/count fields in GinEntryAccumulator and subsequent calls. Check added. Also, fix accounting of allocatedMemory during build to prevent integer overflow with maintenance_work_mem > 4GB. Robert Abraham <robert.abraham86@googlemail.com> with additions by me
This commit is contained in:
@ -903,7 +903,7 @@ typedef struct GinEntryAccumulator
|
||||
typedef struct
|
||||
{
|
||||
GinState *ginstate;
|
||||
long allocatedMemory;
|
||||
Size allocatedMemory;
|
||||
GinEntryAccumulator *entryallocator;
|
||||
uint32 eas_used;
|
||||
RBTree *tree;
|
||||
|
Reference in New Issue
Block a user