Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN785-0000fH-2i for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Apr 2013 19:44:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UN784-0002bK-B1 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Apr 2013 19:44:24 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN782-0002bE-Uw for pgsql-bugs@postgresql.org; Tue, 02 Apr 2013 19:44:23 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN77w-0007o3-46 for pgsql-bugs@postgresql.org; Tue, 02 Apr 2013 19:44:22 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN77v-0006ou-8K for pgsql-bugs@postgresql.org; Tue, 02 Apr 2013 19:44:15 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UN77q-0001Ym-0V for pgsql-bugs@postgresql.org; Tue, 02 Apr 2013 19:44:10 +0000 Date: Tue, 02 Apr 2013 19:44:10 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8034: pg_buffercache gets invalid memory alloc request size with very large shared memory buffers To: pgsql-bugs@postgresql.org From: dbenhur@whitepages.com X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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:=20=20=20=20=20=20=20=20 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/p= g_buffercache_pages.c#L101-L102 The requested allocation exceeds the 1GB limitation imposed by AllocSizeIsValid macro: https://github.com/postgres/postgres/blob/REL9_2_3/src/include/utils/memuti= ls.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 =3D 400GB 4) CREATE EXTENSION pg_buffercache; 5) SELECT * FROM pg_buffercache LIMIT 1; --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs