From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8034: pg_buffercache gets invalid memory alloc request size with very large shared memory buffers
Date: Thu, 04 Apr 2013 17:37:21 -0400
Message-ID: <12133.1365111441@sss.pgh.pa.us> (raw)
In-Reply-To: <515DEFAD.8010708@catalyst.net.nz>
References: <E1UN77q-0001Ym-0V@wrigleys.postgresql.org>
<515DEFAD.8010708@catalyst.net.nz>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Mark Kirkwood <mark.kirkwood@catalyst.net.nz> writes:
>> 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:
> Yes indeed - however I'm not sure this is likely to be encountered in
> any serious configuration.
I too am a bit skeptical of trying to make this actually work. For one
thing, pg_buffercache would be locking down the entire buffer arena for
a rather significant amount of time while it transfers gigabytes of data
into the local array. What would likely make more sense, if we ever get
to the point where this is a practical size of configuration, is to
provide a mechanism to read out data for just a portion of the arena
at a time.
> However it would be nice if pg_buffercache *could* work with bigger
> sizes if they make sense at any time. Someone who understands the
> memory allocation system better than I do will need to comment about how
> that might work :-)
There has been some discussion of inventing a "big_palloc"
infrastructure to allow allocation of arrays larger than 1GB, for use
in places like the sort code. If we ever get around to doing that,
it'd be straightforward enough to make pg_buffercache use the facility
... but I really doubt pg_buffercache itself is a sufficient reason
to do it.
regards, tom lane
--
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: tgl@sss.pgh.pa.us, mark.kirkwood@catalyst.net.nz
Subject: Re: BUG #8034: pg_buffercache gets invalid memory alloc request size with very large shared memory buffers
In-Reply-To: <12133.1365111441@sss.pgh.pa.us>
References: <E1UN77q-0001Ym-0V@wrigleys.postgresql.org> <515DEFAD.8010708@catalyst.net.nz> <12133.1365111441@sss.pgh.pa.us>
* 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