Re: Invalid memory alloc request size for repeat()

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Japin Li <japinli@hotmail.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2022-05-25T14:41:11Z
Lists: pgsql-hackers
On Wednesday, May 25, 2022, Japin Li <japinli@hotmail.com> wrote:

>
> Hi,
>
> Today, I try to use repeat() to generate 1GB text, and it occurs invalid
> memory
> alloc request size [1].  It is a limit from palloc(), then I try to reduce
> it,
> it still complains out of memory which comes from enlargeStringInfo()
> [2].  The
> documentation about repect() [3] doesn't mentaion the limitation.
>

That is still a “field” even if it is not stored.

https://www.postgresql.org/docs/current/limits.html

David J.

Commits

  1. Avoid ERRCODE_INTERNAL_ERROR in oracle_compat.c functions.