pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6378: exceeding memory usage while creating index in pg-9.1.2
3+ messages / 3 participants
[nested] [flat]

* BUG #6378: exceeding memory usage while creating index in pg-9.1.2
@ 2012-01-04 13:35 bock@openit.de
  2012-01-04 16:35 ` Re: BUG #6378: exceeding memory usage while creating index in pg-9.1.2 anarazel@anarazel.de <andres@anarazel.de>
  2012-01-04 16:36 ` Re: BUG #6378: exceeding memory usage while creating index in pg-9.1.2 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: bock@openit.de @ 2012-01-04 13:35 UTC (permalink / raw)
  To: pgsql-bugs

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 = 1gb; shared_buffers = 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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #6378: exceeding memory usage while creating index in pg-9.1.2
  2012-01-04 13:35 BUG #6378: exceeding memory usage while creating index in pg-9.1.2 bock@openit.de
@ 2012-01-04 16:35 ` anarazel@anarazel.de <andres@anarazel.de>
  1 sibling, 0 replies; 3+ messages in thread

From: anarazel@anarazel.de @ 2012-01-04 16:35 UTC (permalink / raw)
  To: bock@openit.de; pgsql-bugs

This has been fixed since 9.1.2. If you browse the history and/or this mailing list you should find a reference.

I just have my mobile here, so its a bit too hard to search for a reference....

Greetings,

Andres



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #6378: exceeding memory usage while creating index in pg-9.1.2
  2012-01-04 13:35 BUG #6378: exceeding memory usage while creating index in pg-9.1.2 bock@openit.de
@ 2012-01-04 16:36 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2012-01-04 16:36 UTC (permalink / raw)
  To: bock@openit.de; +Cc: pgsql-bugs

bock@openit.de writes:
> 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.

Yeah, a memory leak was accidentally introduced into inet/cidr index
operations in 9.1.2.  It will be fixed in 9.1.3, or if you're in a hurry
the patch is here:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6cf639dfbddbc44d027730ad1504886312...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2012-01-04 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-04 13:35 BUG #6378: exceeding memory usage while creating index in pg-9.1.2 bock@openit.de
2012-01-04 16:35 ` anarazel@anarazel.de <andres@anarazel.de>
2012-01-04 16:36 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox