pgsql: Allow usage of huge maintenance_work_mem for GIN build.

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow usage of huge maintenance_work_mem for GIN build.
Date: 2015-09-02 17:09:41
Message-ID: E1ZXBXZ-0007hx-26@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)abraham86(at)googlemail(dot)com> with additions by me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/30bb26b5e04cff911db960801e32e5f57045eb61

Modified Files
--------------
src/backend/access/gin/ginbulk.c | 10 +++++++++-
src/backend/access/gin/ginfast.c | 2 +-
src/backend/access/gin/gininsert.c | 2 +-
src/include/access/gin_private.h | 2 +-
4 files changed, 12 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-09-02 20:22:43 pgsql: Update the SSL test suite for recent changes to TAP testing fram
Previous Message Tom Lane 2015-09-01 23:26:06 pgsql: Document that PL/Python now returns floats using repr() not str(