Re: Re: Invalid memory alloc querying field type bytea - Mailing list pgsql-bugs

From Joe Conway
Subject Re: Re: Invalid memory alloc querying field type bytea
Date
Msg-id a9e2d6a1-5476-889a-7a4a-89462efe9a1b@joeconway.com
Whole thread Raw
In response to RE: Re: Invalid memory alloc querying field type bytea  ("Thompson, Shon" <Shon.Thompson@MaineGeneral.org>)
List pgsql-bugs
On 7/8/20 11:25 AM, Thompson, Shon wrote:
> Postgres returns the smaller rows without errors, but cannot return the two
> largest bytea fields.  The length function for the bytea data of these two
> rows returns:

> 647,034,150
> 819,319,303

>> "ERROR: XX000: invalid memory alloc request size 1294068297"


The problem is probably byteaout rendering the bytes as (presumably) hex, which
takes ~twice as many bytes as the data, and runs afoul of MaxAllocSize.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development


Attachment

pgsql-bugs by date:

Previous
From: Amit Langote
Date:
Subject: Re: posgres 12 bug (partitioned table)
Next
From: Devrim Gündüz
Date:
Subject: Re: BUG #16529: Installation error/bug