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: Mon, 10 Apr 2023 10:41:38 +0300
Message-ID: <beccfab0-8142-1526-c219-2e8352977629@postgrespro.ru> (raw)
In-Reply-To: <CAAKRu_ZKYT=FMV2OME5J7Da1roD4cBOiRho3RCu1rNYN98hbtA@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>
<d9913624-9cb1-d238-21f7-266f0a1eef82@postgrespro.ru>
<CAAKRu_ZKYT=FMV2OME5J7Da1roD4cBOiRho3RCu1rNYN98hbtA@mail.gmail.com>
On 05.04.2023 03:41, Melanie Plageman wrote:
> On Tue, Apr 4, 2023 at 4:35 PM Pavel Luzanov <p.luzanov@postgrespro.ru> wrote:
>
>> After a little thought... I'm not sure about the term 'bootstrap
>> process'. I can't find this term in the documentation.
> There are various mentions of "bootstrap" peppered throughout the docs
> but no concise summary of what it is. For example, initdb docs mention
> the "bootstrap backend" [1].
>
> Interestingly, 910cab820d0 added "Bootstrap superuser" in November. This
> doesn't really cover what bootstrapping is itself, but I wonder if that
> is useful? If so, you could propose a glossary entry for it?
> (preferably in a new thread)
I'm not sure if this is the reason for adding a new entry in the glossary.
>> Do I understand correctly that this is a postmaster? If so, then the
>> postmaster process is not shown in pg_stat_activity.
> No, bootstrap process is for initializing the template database. You
> will not be able to see pg_stat_activity when it is running.
Oh, it's clear to me now. Thank you for the explanation.
> You can query pg_stat_activity from single user mode, so it is relevant
> to pg_stat_activity also. I take your point that bootstrap mode isn't
> relevant for pg_stat_activity, but I am hesitant to add that distinction
> to the pg_stat_io docs since the reason you won't see it in
> pg_stat_activity is because it is ephemeral and before a user can access
> the database and not because stats are not tracked for it.
>
> Can you think of a way to convey this?
See my attempt attached.
I'm not sure about the wording. But I think we can avoid the term
'bootstrap process'
by replacing it with "database cluster initialization", which should be
clear to everyone.
--
Pavel Luzanov
Postgres Professional: https://postgrespro.comAttachments:v2-0001-PATCH-v2-Document-standalone-backend-type-in-pg_s.patch (text/x-patch, 1.3K) download
From ff76b81a9d52581f6fdaf9c1f3885e8272d2ae3c Mon Sep 17 00:00:00 2001
From: Pavel Luzanov <p.luzanov@postgrespro.ru>
Date: Mon, 10 Apr 2023 10:25:52 +0300
Subject: [PATCH v2] [PATCH v2] Document standalone backend type in
pg_stat_activity
Reported-by: Pavel Luzanov <p.luzanov@postgrespro.ru>
Discussion: https://www.postgresql.org/message-id/fcbe2851-f1fb-9863-54bc-a95dc7a0d946%40postgrespro.ru
---
doc/src/sgml/monitoring.sgml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgmlindex 3f33a1c56c..45e20efbfb 100644--- a/doc/src/sgml/monitoring.sgml+++ b/doc/src/sgml/monitoring.sgml@@ -991,6 +991,9 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<literal>archiver</literal>,
<literal>startup</literal>, <literal>walreceiver</literal>,
<literal>walsender</literal> and <literal>walwriter</literal>.
+ The special type <literal>standalone backend</literal> is used+ when initializing a database cluster by <xref linkend="app-initdb"/>+ and when running in the <xref linkend="app-postgres-single-user"/>.
In addition, background workers registered by extensions may have
additional types.
</para></entry>
--
2.34.1
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: <beccfab0-8142-1526-c219-2e8352977629@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