From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Robert Treat <rob@xzilla.net>
Cc: satyanarlapuram@gmail.com, pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: tndrwang@gmail.com
Subject: Re: Add pg_stat_autovacuum_priority
Date: Wed, 8 Apr 2026 19:57:23 -0500
Message-ID: <adb5c_x34Gn94BXk@nathan> (raw)
In-Reply-To: <3nob5fjwrar3shffl5yo7im4qlnxxa475pi6fohemodsvwpl5g@l5cbmz5dqtjm>
References: <adQsdvPPNviWMCXb@nathan>
<5684f479-858e-4c5d-b8f5-bcf05de1f909@gmail.com>
<3077290.1775668665@sss.pgh.pa.us>
<adaWuTR7oCKodH7k@nathan>
<3097984.1775674400@sss.pgh.pa.us>
<adan_E0o69p81lIj@nathan>
<3101163.1775676098@sss.pgh.pa.us>
<u3akkfw3vaocviudt6f7ft4kxjc2273rh3tfhz5rfwg6jrcc2t@wurwws6wgjjz>
<adbHYQMZ0pHQttWa@nathan>
<3nob5fjwrar3shffl5yo7im4qlnxxa475pi6fohemodsvwpl5g@l5cbmz5dqtjm>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, andres@anarazel.de, tgl@sss.pgh.pa.us, exclusion@gmail.com, samimseih@gmail.com, bharath.rupireddyforpostgres@gmail.com, rob@xzilla.net, tndrwang@gmail.com
Subject: Re: Add pg_stat_autovacuum_priority
In-Reply-To: <adb5c_x34Gn94BXk@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox