Re: ERROR: invalid memory alloc request size 1073741824

From: Jan Wieck <jan(at)wi3ck(dot)info>
To: Stefan Blanke <stefan(dot)blanke(at)framestore(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: ERROR: invalid memory alloc request size 1073741824
Date: 2018-01-30 21:43:50
Message-ID: CAGBW59dUpbSvVHueoYYR3zk04gWPAuutSuLS-bAGPyMbG9Ow0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 30, 2018 at 12:35 PM, Stefan Blanke <
stefan(dot)blanke(at)framestore(dot)com> wrote:

> Hello,
>
> We've tripped over an error when doing a "COPY.. TO STDOUT WITH BINARY"
> query.
>
> "ERROR: invalid memory alloc request size 1073741824"
> (exactly 1GB)
>

I have my money on a corrupted TOAST entry. Is this happening on
trustworthy hardware or beige box with no ECC or RAID?

Regards, Jan

>
> So a palloc() call is failing on the AllocSizeIsValid() check.
>
> Does anyone know if this a safety catch we are tripping with a bad query -
> or whether this check is something that should never be hit (i.e. a bug).
>
> This has been some discussion before about making a change before the
> 9.5beta1:
>
> https://www.postgresql.org/message-id/flat/9A28C8860F777E439
> AA12E8AEA7694F8010F6F3F%40BPXM15GP.gisp.nec.co.jp
>
> https://www.postgresql.org/message-id/flat/CAKJS1f_sxPyBHF6%
> 3DnEYwPJdKKDNjVDP91b_EJApfyGTei%3DViDw%40mail.gmail.com
>
> postgresql 9.5.4 (2PGDG.rhel6)
> work_mem = 256MB
>
> Thanks,
> Stefan
>
>

--
Jan Wieck
Senior Postgres Architect
http://pgblog.wi3ck.info

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message geoff hoffman 2018-01-30 21:47:21 Working with JSONB data having node lists
Previous Message Tomas Vondra 2018-01-30 20:56:46 Re: ERROR: invalid memory alloc request size 1073741824