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 1prJ4p-0008Ab-SD for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Apr 2023 13:51:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1prJ4o-0000sY-Au for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Apr 2023 13:51:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1prJ4o-0000sO-1P for pgsql-hackers@lists.postgresql.org; Tue, 25 Apr 2023 13:51:26 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1prJ4g-001p58-WA for pgsql-hackers@postgresql.org; Tue, 25 Apr 2023 13:51:24 +0000 Received: from [192.168.11.8] (p3342141-ipngn9201funabasi.chiba.ocn.ne.jp [180.15.124.141]) by oss.nttdata.com (Postfix) with ESMTPSA id 90E816015C for ; Tue, 25 Apr 2023 22:51:14 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at oss.nttdata.com Message-ID: <5315aedc-fbca-1556-c5de-dc2e00b23a14@oss.nttdata.com> Date: Tue, 25 Apr 2023 22:51:14 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: pgsql-hackers@postgresql.org From: Fujii Masao Subject: pg_stat_io for the startup process 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 Hi, Regarding pg_stat_io for the startup process, I noticed that the counters are only incremented after the startup process exits, not during WAL replay in standby mode. This is because pgstat_flush_io() is only called when the startup process exits. Shouldn't it be called during WAL replay as well to report IO statistics by the startup process even in standby mode? Also, the pg_stat_io view includes a row with backend_type=startup and context=vacuum, but it seems that the startup process doesn't perform any I/O operations with BAS_VACUUM. If this understanding is right, shouldn't we omit this row from the view? Additionally, I noticed that the view also includes a row with backend_type=startup and context=bulkread / bulkwrite. Do these operations actually occur during startup process? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION