ERROR: invalid memory alloc request size

From: Roland Che <rolandngwa31(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: ERROR: invalid memory alloc request size
Date: 2023-04-04 16:34:50
Message-ID: CAKnNPjw=dQdNp7cocOivNJLHiBG5tWthd7P=URdTbSyLxz9B4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Team,

We are on postgres 9.6 and we have a script that runs to analyze over
5000 databases on over 600 servers. Our maintenance work_mem is set to
128MB but
When script runs, maintenance work_mem is set on session level to 2GB
and the memory on the server is 32GB.

We are getting this below error on some table columns

ERROR: invalid memory alloc request size 8589934668

I saw a ticket which one of my co-worker had to alter the columns to
disable statistic collection and also update the storage by using
these two commands .

ALTER COLUMN position SET STATISTICS 0;

ALTER COLUMN position SET STORAGE EXTENDED;

Can someone assist me on how to go about this because seeing
statistics disabled on the column is not a good idea if queries are
actually using the columns .

Regards
Roland Che.

Browse pgsql-admin by date

  From Date Subject
Next Message Capobianco, Tony 2023-04-04 22:24:20 Barman and Hot Standby
Previous Message Rui DeSousa 2023-04-03 14:30:11 Re: A Question about FPW and WAL