public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Roland Che <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: Re: invalid memory alloc request size Error
Date: Wed, 05 Apr 2023 17:46:04 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKnNPjwYYijsh9v17_OtDzBHtgMRbffvZjZFk1MnT+J2gbTezg@mail.gmail.com>
References: <CAKnNPjwYYijsh9v17_OtDzBHtgMRbffvZjZFk1MnT+J2gbTezg@mail.gmail.com>
Roland Che <[email protected]> writes:
> I am having below error when our ANALYZE script runs. Our maintenance
> work_mem is set to 128M but when this analyze script is ran, the
> maintenance work_mem is set to session level at 2G but we are still
> getting the error on some table columns.
> ERROR: invalid memory alloc request size 8589934668.
I am guessing that this happens when one of the pg_statistic entries
for the column exceeds the datum size limit of 1GB. Do you have
exceedingly wide values, and/or a very high default_statistics_target
setting?
> I saw a past dba had to disabled statistics by setting the statistics
> value to 0 meaning stats will not be updated on such table columns.
Dialing that setting back to zero is probably excessive. But if you
don't want to back off default_statistics_target overall, you'll
need to set a smaller value for your very wide column(s).
I'm kind of surprised that this is an issue really, because ANALYZE
tends to discriminate against storing very wide values at all.
Can you provide more information about the column that's problematic?
Do you have extended statistics of any sort on it?
regards, tom lane
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: invalid memory alloc request size Error
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox