Re: invalid memory alloc request size 1765277700 Error Question

From: Garrett Murphy <gmurphy(at)lawlogix(dot)com>
To: Naoko Reeves <naokoreeves(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: invalid memory alloc request size 1765277700 Error Question
Date: 2012-02-24 17:02:32
Message-ID: CB6D1079.50F8%gmurphy@lawlogix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Curious: was there some sort of hardware issue or anything like that preceding this issue?

Version: "PostgreSQL 8.4.6 on i386-apple-darwin, compiled by GCC i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370), 32-bit"
There was an hardware crash.
after that pg_dump failed with an error:
ERROR: invalid memory alloc request size 1765277700
I searched archive and it indicates that this is data corruption.
I have narrowed down to 7 records or so might be corrupted.
However, something doesn't add up... Please see below:

-- I have narrowed down the row
SELECT * FROM table ORDER BY table_id OFFSET 526199 LIMIT 1 -- ERROR: invalid memory alloc request size 1765277700
-- I was able to view a few columns
SELECT table_id, table_column1, table_column2 FROm table ORDER BY table_id OFFSET 526199 LIMIT 1 -- returns one row table_id = 12345
-- using that id to SELECT ALL. It shows fine...I was assuming this will give me same error...
SELECT * FROM table WHERE table_id=12345 -- shows perfectly
-- This also returns value just fine
SELECT table_column3 FROM table WHERE table_id = 12345
-- However this returns an error
SELECT table_column3 FROm table ORDER BY table_id OFFSET 526199 LIMIT 1 --error ERROR: invalid memory alloc request size 1765277700

To me it is as if it is accessing to different record.. I thought possibly primary key index might be corrupted.. so attempted
REINDEX TABLE table;
--ERROR: could not create unique index "table_pkey"
--DETAIL: Table contains duplicated values.
-- Now this returns 0 row... Not sure what I am doing wrong here...
SELECT table_id FROM table GROUP BY table_id HAVING count(table_id) > 1

If anyone could advice me why I am able to view record with primary key query but not with OFFSET?
Do I consider these record as corrupted?
If so deleting these records might resolve the error I am getting?

Thank you very much for your time.

--
Naoko

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ronan Dunklau 2012-02-24 17:03:18 Re: Regular expression character escape
Previous Message Heiko Wundram 2012-02-24 16:43:51 Re: Regular expression character escape