pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: tgl@sss.pgh.pa.us
Cc: vignesh21@gmail.com
Cc: lukas@fittl.com
Cc: alvherre@alvh.no-ip.org
Cc: magnus@hagander.net
Cc: pgsql-hackers@postgresql.org
Cc: thomas.munro@gmail.com
Cc: m.sakrejda@gmail.com
Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
Date: Tue, 4 Apr 2023 23:35:13 +0300
Message-ID: <d9913624-9cb1-d238-21f7-266f0a1eef82@postgrespro.ru> (raw)
In-Reply-To: <CAAKRu_bk1LTUezVwTO+NLcXp9TTmLtdUnmFHskzniNo6ThqxvQ@mail.gmail.com>
References: <20230306.152425.316894602450485455.horikyota.ntt@gmail.com>
	<20230306.154843.178021884584228317.horikyota.ntt@gmail.com>
	<CAAKRu_ZRKp-zDCSVk9p8XE=ZKTn3WiJD6Mt=n=eSPQ7Kg-=HRw@mail.gmail.com>
	<20230306190919.ai6mxdq3sygyyths@awork3.anarazel.de>
	<20230306192409.daz5ivq4mbbr2ye7@liskov>
	<20230306193404.3btuacgc6um33mt2@awork3.anarazel.de>
	<CAAKRu_ZmAhCGzk2GkNeMHTu0Oh=rtNKU7Q+fkzLs-PZBp1sicg@mail.gmail.com>
	<20230307181844.hxnlfi3wa5lm7sm2@awork3.anarazel.de>
	<ZAnWU8WbXEDjrfUE@telsasoft.com>
	<20230309194301.mjdddcoswgr6xoxa@awork3.anarazel.de>
	<ZAuQuBQa7eKAITeA@telsasoft.com>
	<CAAKRu_YHKj73MjgTLZUraQ72VFm=CWg14Dp0BDbsM5YUgWG89Q@mail.gmail.com>
	<fcbe2851-f1fb-9863-54bc-a95dc7a0d946@postgrespro.ru>
	<CAAKRu_bk1LTUezVwTO+NLcXp9TTmLtdUnmFHskzniNo6ThqxvQ@mail.gmail.com>

On 03.04.2023 23:50, Melanie Plageman wrote:
> Attached is a tiny patch to add standalone backend type to
> pg_stat_activity documentation (referenced by pg_stat_io).
>
> I mentioned both the bootstrap process and single user mode process in
> the docs, though I can't imagine that the bootstrap process is relevant
> for pg_stat_activity.

After a little thought... I'm not sure about the term 'bootstrap 
process'. I can't find this term in the documentation.
Do I understand correctly that this is a postmaster? If so, then the 
postmaster process is not shown in pg_stat_activity.

Perhaps it may be worth adding a description of the standalone backend 
to pg_stat_io, not to pg_stat_activity.
Something like: backend_type is all types from pg_stat_activity plus 
'standalone backend',
which is used for the postmaster process and in a single user mode.

> I also noticed that the pg_stat_activity docs call background workers
> "parallel workers" (though it also mentions that extensions could have
> other background workers registered), but this seems a bit weird because
> pg_stat_activity uses GetBackendTypeDesc() and this prints "background
> worker" for type B_BG_WORKER. Background workers doing parallelism tasks
> is what users will most often see in pg_stat_activity, but I feel like
> it is confusing to have it documented as something different than what
> would appear in the view. Unless I am misunderstanding something...

'parallel worker' appears in the pg_stat_activity for parallel queries. 
I think it's right here.

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com






view thread (173+ messages)  latest in thread

Message-ID: <d9913624-9cb1-d238-21f7-266f0a1eef82@postgrespro.ru>
Permalink:  ../d9913624-9cb1-d238-21f7-266f0a1eef82@postgrespro.ru/
Also on:    postgresql.org/message-id/d9913624-9cb1-d238-21f7-266f0a1eef82@postgrespro.ru

 · 

reply

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: p.luzanov@postgrespro.ru, melanieplageman@gmail.com, pryzby@telsasoft.com, andres@anarazel.de, horikyota.ntt@gmail.com, tgl@sss.pgh.pa.us, vignesh21@gmail.com, lukas@fittl.com, alvherre@alvh.no-ip.org, magnus@hagander.net, thomas.munro@gmail.com, m.sakrejda@gmail.com
  Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
  In-Reply-To: <d9913624-9cb1-d238-21f7-266f0a1eef82@postgrespro.ru>

* 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