public inbox for [email protected]  
help / color / mirror / Atom feed
From: Roland Che <[email protected]>
To: pgsql-novice <[email protected]>
Subject: invalid memory alloc request size Error
Date: Wed, 5 Apr 2023 05:31:37 -0400
Message-ID: <CAKnNPjwYYijsh9v17_OtDzBHtgMRbffvZjZFk1MnT+J2gbTezg@mail.gmail.com> (raw)

Hello All,

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 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. He
used these two commands to solve the error which kind of shows if
queries use those columns, like it will be slow as stats will not be
updated .


 ALTER COLUMN position SET STATISTICS 0;

ALTER COLUMN position SET STORAGE EXTENDED;

Please can anyone advise on how to go about this error?
cpu 8
Ram 32 on that server.

Regards
Roland





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]
  Subject: Re: invalid memory alloc request size Error
  In-Reply-To: <CAKnNPjwYYijsh9v17_OtDzBHtgMRbffvZjZFk1MnT+J2gbTezg@mail.gmail.com>

* 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