Follow up to irc on CREATE INDEX vs. maintenance_work_mem on 9.3 - Mailing list pgsql-hackers

From Alex Shulgin
Subject Follow up to irc on CREATE INDEX vs. maintenance_work_mem on 9.3
Date
Msg-id 87bnnuazs3.fsf@commandprompt.com
Whole thread Raw
Responses Re: Follow up to irc on CREATE INDEX vs. maintenance_work_mem on 9.3  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Tom,

First of all, thanks for your help on IRC last time with that CREATE
INDEX memory consumption problem.

As has been pointed out in a stackexchange answer to my question[1], it
is indeed the limitation of pre-9.4 versions, but the limit is imposed
on memtuples array, rather than total memory the sort in CREATE INDEX
may allocate.  The memtuples won't grow further than MaxAllocSize and
I've got 24x50x10^6 = 1200MB, which just doesn't fit.

We've got a customer who is testing a migration to PostgreSQL-9.3 (from
$some_other_db), thus they load the tables first (some of their tables
have 10-100 million rows), then create the indexes and they constantly
see disk sort being used despite lots of available RAM and
maintenance_work_mem set to increasingly higher values.

Now my question, is it feasible to back-patch this to 9.3?  Or should we
tell the customer to wait before 9.4 is released?

Thanks.
--
Alex

[1] http://dba.stackexchange.com/questions/83600/postgresql-create-index-memory-requirement



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Role Attribute Bitmask Catalog Representation
Next
From: Robert Haas
Date:
Subject: Re: superuser() shortcuts