473,500 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

query failing with out of memory error message.

Hello all,
I have a seemingly corrupt row in a table and wanted to look at it's
contents.
when I try to query it I get the following...

db=# select * from some_table offset 411069 limit 1;
ERROR: invalid memory alloc request size 4294967293

but when I select individual fields within the record I get data.

Is there a way to read this row from the datafile to examine it closer?

--
Joe Maldonado
jm********@webehosting.biz

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
3 1732
"Joe Maldonado" <jm********@webehosting.biz> writes:
I have a seemingly corrupt row in a table and wanted to look at it's
contents.
when I try to query it I get the following... db=# select * from some_table offset 411069 limit 1;
ERROR: invalid memory alloc request size 4294967293 but when I select individual fields within the record I get data.
That's odd ... I'd certainly expect one or the other field of the table
to show that failure.
Is there a way to read this row from the datafile to examine it closer?


Select "ctid" from the troublesome row to determine its block and item
number, then dump out that block with pg_filedump. If there is data
corruption it'll usually be possible to see it in the pg_filedump dump.

Another line of attack is to attach to the backend process with gdb and
set a breakpoint at errfinish (or elog if a pre-7.4 backend), and then
get a stack trace back from the error report. This will help narrow
down exactly where the bogus allocation request is coming from.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2
On Tue, 29 Jun 2004 22:50:56 -0400, Tom Lane <tg*@sss.pgh.pa.us> wrote:

Thanks!

Where can I find a version of gp_filedump compatible with 7.4?
"Joe Maldonado" <jm********@webehosting.biz> writes:
I have a seemingly corrupt row in a table and wanted to look at it's
contents.
when I try to query it I get the following...

db=# select * from some_table offset 411069 limit 1;
ERROR: invalid memory alloc request size 4294967293

but when I select individual fields within the record I get data.


That's odd ... I'd certainly expect one or the other field of the table
to show that failure.
Is there a way to read this row from the datafile to examine it closer?


Select "ctid" from the troublesome row to determine its block and item
number, then dump out that block with pg_filedump. If there is data
corruption it'll usually be possible to see it in the pg_filedump dump.

Another line of attack is to attach to the backend process with gdb and
set a breakpoint at errfinish (or elog if a pre-7.4 backend), and then
get a stack trace back from the error report. This will help narrow
down exactly where the bogus allocation request is coming from.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


--
--
Joe Maldonado
jm********@webehosting.biz

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #3
"Joe Maldonado" <jm********@webehosting.biz> writes:
Where can I find a version of pg_filedump compatible with 7.4?


http://sources.redhat.com/rhdb/

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11029
by: Simon Stewart | last post by:
Has anyone else experience of imagecreatefromjpeg failing with an error message about memory even though the size of the image being uploaded is nothing like the space available to the script? ...
4
1902
by: frank | last post by:
Hi all, I have a largish asp-driven site that's crashing intermittently in a way that's just causing me to scratch my head a lot. I've not seen this happen in about five years of developing asp...
2
8636
by: john.livermore | last post by:
We seem to have developed a memory leak in our sql server application and are getting the above error on occasion. Also, over several hours of hard usage the memory consumed by the sql server...
15
2525
by: GTi | last post by:
I have a query like: SELECT "ProjectMembers"."RoleText", "ProjectMembers"."Description", "ContactTable"."Name1", "ContactTable"."Name2", "ContactTable1"."Name1", "ContactTable1"."Name2" FROM...
5
4453
by: deko | last post by:
How to run action query against linked table? I have an Access 2003 mdb with an Excel 2003 Workbook as a linked table. When I attempt to run an action query against the linked table I get this...
4
2847
by: Alan Lane | last post by:
Hello world: I'm including both code and examples of query output. I appologize if that makes this message longer than it should be. Anyway, I need to change the query below into a pivot table...
2
9332
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
7
8504
by: pike | last post by:
db2 8.1 FP11 on AIX 5.3.0.0 . The db2diag.log is intermittently reporting EMFILE (24) "Too many open files" errors. The culprit is always db2hmon. Sample db2diag.log output follows: ...
5
2310
by: Just_a_fan | last post by:
I tried to put an "on error" statement in a routine and got the message that I cannot user "on error" and a lamda or query expression in the same routine. Help does not list anything useful for...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.