From: dbenhur@whitepages.com
To: pgsql-bugs@postgresql.org
Subject: BUG #8034: pg_buffercache gets invalid memory alloc request size with very large shared memory buffers
Date: Tue, 02 Apr 2013 19:44:10 +0000
Message-ID: <E1UN77q-0001Ym-0V@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 8034
Logged by: Devin Ben-Hur
Email address: dbenhur@whitepages.com
PostgreSQL version: 9.2.3
Operating system: Ubuntu Precise
Description:
When a very large shared buffer pool (~480GB) is used with postgresql,
pg_buffercache contrib module gets an allocation error trying to Allocate
NBuffers worth of BufferCachePagesRec records:
https://github.com/postgres/postgres/blob/REL9_2_3/contrib/pg_buffercache/pg_buffercache_pages.c#L10...
The requested allocation exceeds the 1GB limitation imposed by
AllocSizeIsValid macro:
https://github.com/postgres/postgres/blob/REL9_2_3/src/include/utils/memutils.h#L40-L43
Reproduce:
1) acquire server with half terabyte of memory
2) tweak OS settings to allow large shared memory
3) set postgresql.conf: shared_buffers = 400GB
4) CREATE EXTENSION pg_buffercache;
5) SELECT * FROM pg_buffercache LIMIT 1;
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: dbenhur@whitepages.com
Subject: Re: BUG #8034: pg_buffercache gets invalid memory alloc request size with very large shared memory buffers
In-Reply-To: <E1UN77q-0001Ym-0V@wrigleys.postgresql.org>
References: <E1UN77q-0001Ym-0V@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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