Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 34D441337B95 for ; Tue, 4 Jan 2011 18:02:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 13239-08 for ; Tue, 4 Jan 2011 22:02:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BACD11337B77 for ; Tue, 4 Jan 2011 18:02:42 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p04M2gaj016075; Tue, 4 Jan 2011 17:02:42 -0500 (EST) To: Victor Hugo dos Santos cc: pgsql-admin@postgresql.org Subject: Re: ERROR: invalid memory alloc request size 4294967293 In-reply-to: References: <4D2329A7.5000905@proventis.net> <10601.1294157106@sss.pgh.pa.us> Comments: In-reply-to Victor Hugo dos Santos message dated "Tue, 04 Jan 2011 16:57:24 -0300" Date: Tue, 04 Jan 2011 17:02:41 -0500 Message-ID: <16074.1294178561@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/38 X-Sequence-Number: 36478 Victor Hugo dos Santos writes: > On Tue, Jan 4, 2011 at 1:05 PM, Tom Lane wrote: >> It looks like a corrupted-data problem from here.  You need to isolate >> and delete the bad row(s). > # su - postgres -c "psql bacula -c 'SELECT md5 from public.file OFFSET > 1417610 LIMIT 1'" > server closed the connection unexpectedly So you've got some rows that are corrupted badly enough to crash the backend :-(. > In others words.. if I run the same command two times, I get a error, > and if I rerun the same command, work !!! When you're running long seqscans like these, you need to turn off "synchronize_seqscans" to get reproducible results. With that flag turned on, scans may start from somewhere in the middle of the table instead of always starting from the beginning. regards, tom lane