Re: Invalid memory alloc querying field type bytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thompson, Shon" <Shon(dot)Thompson(at)MaineGeneral(dot)org>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Invalid memory alloc querying field type bytea
Date: 2020-06-17 18:45:35
Message-ID: 1453988.1592419535@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Thompson, Shon" <Shon(dot)Thompson(at)MaineGeneral(dot)org> writes:
> I'm getting errors when I query a table that uses data type bytea. I can query the table if I don't include the field for data type bytea. Here are the two error messages I get. The first error is one generated from visual studio:
> "ERROR: XX000: invalid memory alloc request size 1294068297"

Looks like a corrupt-data problem. I doubt it's directly the fault of
bytea; any variable-length field would have given a similar type of error,
because what this seems to be is a damaged field length word.

Do you see any clearly bogus data in other columns of the table? That
might help isolate which row(s) have gotten damaged. It seems somewhat
unlikely that only the bytea field header would be clobbered and not
any adjacent data.

The questions you should be asking yourself include whether your PG
version is up-to-date and whether the storage stack is reliable.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-06-17 21:00:23 BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match
Previous Message Thompson, Shon 2020-06-17 18:24:53 Invalid memory alloc querying field type bytea