Re: Memory allocation error - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: Memory allocation error
Date
Msg-id CAFj8pRCr=Qvsys2FKYscjWw5VR7wOYMFsHRoUwLsTZjgRV5yjQ@mail.gmail.com
Whole thread Raw
In response to Memory allocation error  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: Memory allocation error
List pgsql-sql
Hi

pá 14. 7. 2023 v 8:38 odesílatel Shaozhong SHI <shishaozhong@gmail.com> napsal:
A function is being called in a loop.  Sometime, there is an error.

sqlstate: XX000
NOTICE:  message: invalid memory alloc request size 1073741824

What to do to resolve the issue?

It depends what you do. Postgres doesn't allow to allocate bigger blocks than 1GB. Maybe you create too big string or too big value of some other type. But it can be signal of some cache bloating.

Can you show source code? Can you use gdb, attach to Postgres, place breakpoint to this error message, and when you get this error, send stack trace?

Regards

Pavel

 

Regards,

David

pgsql-sql by date:

Previous
From: Shaozhong SHI
Date:
Subject: Memory allocation error
Next
From: Shaozhong SHI
Date:
Subject: Re: Memory allocation error