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: Aleš Zelený <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-08 14:36:26
Message-ID: 2223506.1723127786@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?B?QWxlxaEgWmVsZW7DvQ==?= <zeleny(dot)ales(at)gmail(dot)com> writes:
> the default statistics target is:
> 2500

> So I've changed it to the default:
> powa=# ALTER TABLE testcase_t3 ALTER COLUMN records SET STATISTICS 100;

> The memory consumption drops down to ~ 1.1GB
> So you were right, thanks!

Yeah, the array statistics collection code is a bit of a memory hog
compared to most other data types. I'm not sure that's a bug exactly;
there are more kinds of stats that we want to collect for arrays, such
as per-element stats.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-08-08 15:24:49 BUG #18578: Broken postgresql12-*-12.20-1 rpms
Previous Message Tender Wang 2024-08-08 14:27:49 Re: BUG #18541: Reattaching a partition referenced by a foreign key fails with an error