On Wed, Apr 08, 2026 at 05:59:36PM -0400, Andres Freund wrote:
> On 2026-04-08 16:23:45 -0500, Nathan Bossart wrote:
>> What's interesting is that I cannot reproduce similar usage with views like
>> pg_stat_all_tables.
>
> Hm? That would be very surprising. Is it possible you used LIMIT 1 or such?
> The way the pg_stat_all_tables view works it only accesses stats data for
> returned rows (because it does all the stats lookups with individiual columns,
> which also makes it really slow, but avoids having to form datums for not
> returned columns).
*facepalm*
I was using count(*). If I do something like sum(n_dead_tup), I see much
more memory used by pg_stat_all_tables. Sorry for the noise.
--
nathan