invalid memory alloc request size 1765277700 Error Question

From: Naoko Reeves <naokoreeves(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: invalid memory alloc request size 1765277700 Error Question
Date: 2012-02-24 11:01:24
Message-ID: CAGoos17XLboPWzi00Bckd49AK5G4U4HpH6FeGuVz7AB-HNbVRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ronan Dunklau 2012-02-24 11:33:46 Regular expression character escape
Previous Message Simon Riggs 2012-02-24 10:25:24 Re: Optimise PostgreSQL for fast testing