Recursive query - ERROR: invalid memory alloc request size 1073741824

Поиск
Список
Период
Сортировка
Искать

Recursive query - ERROR: invalid memory alloc request size 1073741824

От:
Shaozhong SHI <shishaozhong@gmail.com>
Дата:
There is a loop of recursive query.  It runs at a point where it stops.

This error turned up.- ERROR:  invalid memory alloc request size 1073741824

Can anyone provide pointers how to solve this problem or work around?

Regards,

David

Re: Recursive query - ERROR: invalid memory alloc request size 1073741824

От:
Rob Sargent <robjsargent@gmail.com>
Дата:
On 5/7/22 07:23, Shaozhong SHI wrote:
There is a loop of recursive query.  It runs at a point where it stops.

This error turned up.- ERROR:  invalid memory alloc request size 1,073,741,824

Can anyone provide pointers how to solve this problem or work around?

Regards,

David
Quite difficult without any code snippet (or even which language) but you've requested a single block of memory that is larger than the maximum allowed.  That number (1,073,741,824) is 230. 

Re: Recursive query - ERROR: invalid memory alloc request size 1073741824

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Shaozhong SHI  writes:
> There is a loop of recursive query.  It runs at a point where it stops.
> This error turned up.- ERROR:  invalid memory alloc request size 1073741824

Might be a bug, but with no details it's impossible to tell.

https://wiki.postgresql.org/wiki/Guide_to_reporting_problems

			regards, tom lane


Re: Recursive query - ERROR: invalid memory alloc request size 1073741824

От:
Simon Riggs <simon.riggs@enterprisedb.com>
Дата:
On Sat, 7 May 2022 at 14:24, Shaozhong SHI  wrote:
>
> There is a loop of recursive query.  It runs at a point where it stops.
>
> This error turned up.- ERROR:  invalid memory alloc request size 1073741824
>
> Can anyone provide pointers how to solve this problem or work around?

For both recursive and non-recursive queries its possible to write a
query with mistakes in it that will run for a long time or run out of
resources.

Find the mistakes in your query by simplifying it.

-- 
Simon Riggs                http://www.EnterpriseDB.com/


FAQ