Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C470237C6EA for ; Mon, 12 Nov 2007 18:54:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 38211-07 for ; Mon, 12 Nov 2007 18:54:26 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4D84537BA29 for ; Mon, 12 Nov 2007 18:54:25 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lACMsMVf013449; Mon, 12 Nov 2007 17:54:22 -0500 (EST) To: Stephane Bailliez cc: pgsql-performance@postgresql.org Subject: Re: ERROR: "invalid memory alloc request size" or "unexpected end of data" on large table In-reply-to: <4738B03C.8090901@gmail.com> References: <4738B03C.8090901@gmail.com> Comments: In-reply-to Stephane Bailliez message dated "Mon, 12 Nov 2007 20:57:48 +0100" Date: Mon, 12 Nov 2007 17:54:22 -0500 Message-ID: <13448.1194908062@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/190 X-Sequence-Number: 27605 Stephane Bailliez writes: > ERROR: invalid memory alloc request size 1664639562 This sounds like corrupt data --- specifically, 1664639562 showing up where a variable-width field's length word ought to be. It may or may not be relevant that the ASCII equivalent of that bit pattern is Jb8c ... do you work with data that contains such substrings? > Sometimes I do get: > ERROR: unexpected end of data If it's not 100% repeatable I'd start to wonder about flaky hardware. Have you run memory and disk diagnostics on this machine recently? regards, tom lane