Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E75A31425ADD for ; Wed, 4 Jan 2012 09:35:48 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RiR0J-00038P-TN for pgsql-bugs@postgresql.org; Wed, 04 Jan 2012 13:35:48 +0000 Received: from [204.145.120.229] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RiR05-0002Ye-48 for pgsql-bugs@postgresql.org; Wed, 04 Jan 2012 13:35:29 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RiR04-0001Wd-SS for pgsql-bugs@postgresql.org; Wed, 04 Jan 2012 13:35:28 +0000 Date: Wed, 04 Jan 2012 13:35:28 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6378: exceeding memory usage while creating index in pg-9.1.2 To: pgsql-bugs@postgresql.org From: bock@openit.de X-Pg-Spam-Score: -3.8 (---) X-Archive-Number: 201201/17 X-Sequence-Number: 32084 The following bug has been logged on the website: Bug reference: 6378 Logged by: Julian v. Bock Email address: bock@openit.de PostgreSQL version: 9.1.2 Operating system: Linux x86_64 Description: = When creating an index on an inet column the postmaster process tries to allocate much more memory than it should in version 9.1.2. In my test db (maintenance_work_mem =3D 1gb; shared_buffers =3D 256mb) the CREATE INDEX in the script below runs out of memory after allocating several GB. Note that this does not happen with version 9.1.1 (only a few hundred MB are allocated). ----------- create table iptest ( id serial primary key, ip inet ); insert into iptest ( ip ) ( select ( '192.' || a || '.' || b || '.' || c )::inet from generate_series( 0, 127 ) a, generate_series( 0, 255 ) b, generate_series( 0, 255 ) c ); create index iptest_idx_1 on iptest ( ip ); ----------- Regards, Julian v. Bock