Re: string_to_array eats too much memory? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: string_to_array eats too much memory?
Date
Msg-id 21089.1162997763@sss.pgh.pa.us
Whole thread Raw
In response to string_to_array eats too much memory?  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: string_to_array eats too much memory?
List pgsql-hackers
Tatsuo Ishii <ishii@sraoss.co.jp> writes:
> string_to_array() consumes too much memory. For example, to make ~70k
> array elements, string_to_array seems to eat several Gig bytes of
> memory.

I'd argue that the problem comes from enlarging the work arrays only 64
elements at a time in accumArrayResult().  Most of the rest of the code
deals with resizing arrays using a "double it each time it has to grow"
approach, I wonder why this is different?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: string_to_array eats too much memory?
Next
From: Tatsuo Ishii
Date:
Subject: Re: string_to_array eats too much memory?