Re: Fatal Error : Invalid Memory alloc request size 1236252631

From: Sai Teja <saitejasaichintalapudi(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Fatal Error : Invalid Memory alloc request size 1236252631
Date: 2023-08-14 17:31:19
Message-ID: CADBXDMUsV948B06XwLamQ5PFhDO-fZEz3Bi9fPNzaEOP4sLiDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am just running select query to fetch the result
Query : select id, content_data, name from table_name
So here content_data is bytea content which is having more than 700 MB.
Even if I run this query in any DB client such as Pgadmin, dbeaver etc..
I'm facing the same error. But this query is being called in java as well
So, I don't think java could be the issue as I can able to successfully
insert the data. But, only the problem is with fetching the data that too
only specific rows which are having huge volume of data.

Thanks,
Sai

On Mon, 14 Aug, 2023, 10:55 pm Rob Sargent, <robjsargent(at)gmail(dot)com> wrote:

> On 8/14/23 09:29, Sai Teja wrote:
> > Could anyone please suggest any ideas to resolve this issue.
> >
> > I have increased the below parameters but still I'm getting same error.
> >
> > work_mem, shared_buffers
> >
> > Out of 70k rows in the table only for the few rows which is of large
> > size (700MB) getting the issue. Am unable to fetch the data for that
> > particular row.
> >
> > Would be appreciated if anyone share the insights.
> >
> > Thanks,
> > Sai
> >
> >
> Are you using java? There's an upper limit on array size, hence also on
> String length. You'll likely need to process the output in chunks.
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Ventimiglia 2023-08-14 17:55:53 Re: How to optimize PostgreSQL Row Security Policies that involve related tables?
Previous Message Rob Sargent 2023-08-14 17:25:27 Re: Fatal Error : Invalid Memory alloc request size 1236252631