ERROR: invalid memory alloc request size 1073741824 - Mailing list pgsql-general

From Stefan Blanke
Subject ERROR: invalid memory alloc request size 1073741824
Date
Msg-id 733ecd96-48ed-8d49-15e1-413eb535c4c6@framestore.com
Whole thread Raw
Responses Re: ERROR: invalid memory alloc request size 1073741824
Re: ERROR: invalid memory alloc request size 1073741824
List pgsql-general
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)

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/9A28C8860F777E439AA12E8AEA7694F8010F6F3F%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


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pgAdmin 4 loading shapefiles
Next
From: "David G. Johnston"
Date:
Subject: Re: Alter view with dependence without drop view!