public inbox for [email protected]  
help / color / mirror / Atom feed
Recursive query - ERROR: invalid memory alloc request size 1073741824
4+ messages / 4 participants
[nested] [flat]

* Recursive query - ERROR: invalid memory alloc request size 1073741824
@ 2022-05-07 13:23  Shaozhong SHI <[email protected]>
  0 siblings, 3 replies; 4+ messages in thread

From: Shaozhong SHI @ 2022-05-07 13:23 UTC (permalink / raw)
  To: pgsql-sql <[email protected]>

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


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Recursive query - ERROR: invalid memory alloc request size 1073741824
@ 2022-05-07 13:53  Rob Sargent <[email protected]>
  parent: Shaozhong SHI <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: Rob Sargent @ 2022-05-07 13:53 UTC (permalink / raw)
  To: [email protected]

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 2^30 .

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Recursive query - ERROR: invalid memory alloc request size 1073741824
@ 2022-05-07 15:19  Tom Lane <[email protected]>
  parent: Shaozhong SHI <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-05-07 15:19 UTC (permalink / raw)
  To: Shaozhong SHI <[email protected]>; +Cc: pgsql-sql <[email protected]>

Shaozhong SHI <[email protected]> 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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Recursive query - ERROR: invalid memory alloc request size 1073741824
@ 2022-05-08 19:15  Simon Riggs <[email protected]>
  parent: Shaozhong SHI <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: Simon Riggs @ 2022-05-08 19:15 UTC (permalink / raw)
  To: Shaozhong SHI <[email protected]>; +Cc: pgsql-sql <[email protected]>

On Sat, 7 May 2022 at 14:24, Shaozhong SHI <[email protected]> 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/






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-05-08 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 13:23 Recursive query - ERROR: invalid memory alloc request size 1073741824 Shaozhong SHI <[email protected]>
2022-05-07 13:53 ` Rob Sargent <[email protected]>
2022-05-07 15:19 ` Tom Lane <[email protected]>
2022-05-08 19:15 ` Simon Riggs <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox