Re: Add pg_stat_autovacuum_priority - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Add pg_stat_autovacuum_priority
Date
Msg-id adb5c_x34Gn94BXk@nathan
Whole thread Raw
In response to Re: Add pg_stat_autovacuum_priority  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgstat vs aset
Next
From: Thomas Munro
Date:
Subject: Centralised architecture detection