Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
Date
Msg-id 20230222015035.GQ1653@telsasoft.com
Whole thread Raw
In response to Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)  (Andres Freund <andres@anarazel.de>)
Responses Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Sat, Feb 11, 2023 at 10:24:37AM -0800, Andres Freund wrote:
> On 2023-02-08 21:03:19 -0800, Andres Freund wrote:
> > Pushed the first (and biggest) commit. More tomorrow.
> 
> Just pushed the actual pg_stat_io view, the splitting of the tablespace test,
> and the pg_stat_io tests.

pg_stat_io says:

         * Some BackendTypes do not currently perform any IO in certain
         * IOContexts, and, while it may not be inherently incorrect for them to
         * do so, excluding those rows from the view makes the view easier to use.

        if (bktype == B_AUTOVAC_LAUNCHER && io_context == IOCONTEXT_VACUUM)
                return false;

        if ((bktype == B_AUTOVAC_WORKER || bktype == B_AUTOVAC_LAUNCHER) &&
                io_context == IOCONTEXT_BULKWRITE)
                return false;

What about these combinations?  Aren't these also "can't happen" ?

 relation      | bulkread   | autovacuum worker
 relation      | bulkread   | autovacuum launcher
 relation      | vacuum     | startup

-- 
Justin



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: logical decoding and replication of sequences, take 2