Re: BUG #18573: Analyze command consumes several GB of memory - more than analyzed table size

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zeleny(dot)ales(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18573: Analyze command consumes several GB of memory - more than analyzed table size
Date: 2024-08-07 14:46:06
Message-ID: 1959772.1723041966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Is there more I can do to identify why analyze uses that much memory?

What have you got default_statistics_target set to?

You might need to decrease the stats target for that composite-array
column. compute_array_stats is fairly aggressive about how much
data it will try to collect, and I can believe that that'd add up
when the array elements are of a wide composite type.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jian he 2024-08-07 15:04:08 Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Previous Message PG Bug reporting form 2024-08-07 12:19:42 BUG #18575: Sometimes pg_rewind mistakenly assumes that nothing needs to be done.