Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjnNA-0007e6-Hm for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 20:35:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pjnN8-0007bB-UU for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 20:35:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjnN8-0007b1-GJ for pgsql-hackers@lists.postgresql.org; Tue, 04 Apr 2023 20:35:18 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1pjnN5-000u1c-5I for pgsql-hackers@postgresql.org; Tue, 04 Apr 2023 20:35:17 +0000 Received: from [192.168.0.104] (unknown [62.217.188.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 60A0021CF4D5; Tue, 4 Apr 2023 23:35:13 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1680640513; bh=APZ2zohKH7+QI8xFWp6BMnUATqz8uJpKgG7ieTqSQ8k=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=e0kj9LsJCqZsdcEOu6jKmskMa/j3ld4GnM8m1GdkdhTIbZ8n7q4IBnN1mwp5TJQDk OyRPTdxPWDy438LnYuk7RzOoGANfczTEBUo3k5usB8JS8W35Cj4Wy+UJhpsC3xrAOx mycQU3YRnB2s3LxV8Yb825754w0Yn71pGItpBR4U= Message-ID: Date: Tue, 4 Apr 2023 23:35:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) Content-Language: en-US To: Melanie Plageman Cc: Justin Pryzby , Andres Freund , Kyotaro Horiguchi , tgl@sss.pgh.pa.us, vignesh21@gmail.com, lukas@fittl.com, alvherre@alvh.no-ip.org, magnus@hagander.net, pgsql-hackers@postgresql.org, thomas.munro@gmail.com, m.sakrejda@gmail.com References: <20230306.152425.316894602450485455.horikyota.ntt@gmail.com> <20230306.154843.178021884584228317.horikyota.ntt@gmail.com> <20230306190919.ai6mxdq3sygyyths@awork3.anarazel.de> <20230306192409.daz5ivq4mbbr2ye7@liskov> <20230306193404.3btuacgc6um33mt2@awork3.anarazel.de> <20230307181844.hxnlfi3wa5lm7sm2@awork3.anarazel.de> <20230309194301.mjdddcoswgr6xoxa@awork3.anarazel.de> From: Pavel Luzanov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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