Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tYfVE-00Cw03-R0 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2025 06:06:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tYfVC-008tn6-LJ for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2025 06:06:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tYfVC-008tgg-Ai for pgsql-hackers@lists.postgresql.org; Fri, 17 Jan 2025 06:06:42 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tYfV9-000tJh-14 for pgsql-hackers@lists.postgresql.org; Fri, 17 Jan 2025 06:06:41 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3862ca8e0bbso1293548f8f.0 for ; Thu, 16 Jan 2025 22:06:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737093998; x=1737698798; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ttap/dhqA2Ph+Inv35pNbzDZ3001cofHTHWTB+0H8XM=; b=kORTVQl8dusJVSRK0PsPJE1Gx/6gmoqpQ31aZE86eiqLb42VW8lL4lNZCWnNB8sifb a2c0eXZehzDESRDgc2/PpFjAWMwE59gK0YgOtJAc3HHncseTveB4MpOFkU6k2KXrOkLu 7eHQP+UejzVINNER89xS+fowVknZYxbDS6g+H3xaniT9H2siPV0Biv47LfXioAgoz7y8 5t8N7AtHrFWmmubSQ7LCehoSf5YsRKMAaVK6Q8FzuK1jsgLWpNAN4NsHBmzA35MZ22lB 4LNOaEumd3QXMz3KDSIvZB2u/PcS8vj+qgX9H4GZdr+TW3Rw+W3Ltqox9zPfRuo1n6bP rBaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737093998; x=1737698798; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ttap/dhqA2Ph+Inv35pNbzDZ3001cofHTHWTB+0H8XM=; b=TTr3+m3xqh8mUndh/GSYcB3+8TfrR4gsRLLvf3evwlnQ2hrJd9wy7ovYMtVvX6KGSZ WRZcTrX0dqcRdhw/IFtaYAvJnifhuziOmrXuYMZXYt6t6XD11K7bF5DU6nmGcVkOlywZ 2jEoDYcx12sDCjAaUV/cHJZStb+RvQ7vGizYks4l2mLrTYscqzIXx/tZLQq8sIL8Dc3z YKrzKt/LzR0Tg0JcQ9Ub5aoPs6o291CV2L6704eha92bGUnbH4AHeaOHGq6MHTkYvAdk 7n9vxxK8NQ7qkqYU/PNb8G49xRHzbkLXPuGYBGElFJIMN1ZPPw4wk0D/8KXC6LkNy5HK 7N/A== X-Forwarded-Encrypted: i=1; AJvYcCXTQbCf+JeA88q2+j5sx4Re3gUQB+XvqJxXkVZTwXIUmZYVO1S7mKvlphMzo/ENZE/lhYCMmQ6vZn/1/7pc@lists.postgresql.org X-Gm-Message-State: AOJu0Yy4fZ5GMOnzQVWQmTz3Kxt257Txf7VArX8gfGcY0kRLxoCq60+N L8BeB9025Q8KJVJgN05lqd39zNhckX0hpiLUMbP6Bdo6KSuFa5LI X-Gm-Gg: ASbGncuIt9ozDonK7QoKFPKyEifAEh2CpbfaVbsPV7QJxdqO/GXHq3Hew2xrYGBBqCe dU0coLO8uZhY7dtX9742M9j2Fehr7QLspNNp3fp6ZDjjAzCAorl25UXLp52j+cIXC5g8xXkeTFi VqQK8KfGoFc628ZV8Toi+erCEcjj2TXRaGHdSNH3Op623xQcab5W+XE+11fquIK2+LeY6z2Pi6h TcUDI+xh2NkOnb3GlvnysuU3y3UIbdh2pftIw1afe6BZNGxBQwQZGnN9BHSpyUuLE3td1iwV6Vg ERLf9zb9etiqn5z5h3JCAQNh7VFHebQSLqXRN1ogRKhNiIKr0DJpTERtbozfB0hClfqzDysNXlq EAutwDIY= X-Google-Smtp-Source: AGHT+IHGtXdZhmkQfOs6Hs+7zwbgZhSZM9LAdPIh2RHyjffgPlE+peVuLdaqvDMc6O4xql3xDmjCRA== X-Received: by 2002:a5d:54ce:0:b0:38a:88ac:ed14 with SMTP id ffacd0b85a97d-38bf5659e26mr649089f8f.19.1737093997847; Thu, 16 Jan 2025 22:06:37 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438904623a8sm21158615e9.26.2025.01.16.22.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 22:06:37 -0800 (PST) Date: Fri, 17 Jan 2025 06:06:35 +0000 From: Bertrand Drouvot To: Michael Paquier Cc: Andres Freund , Nazir Bilal Yavuz , Alvaro Herrera , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: per backend I/O statistics Message-ID: References: <66efowskppsns35v5u2m7k4sdnl7yoz5bo64tdjwq7r5lhplrz@y7dme5xwh2r5> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Fri, Jan 17, 2025 at 09:08:02AM +0900, Michael Paquier wrote: > Anyway, let's just switch pgstat_backend.c so as we use a static > PgStat_BackendPending (pending name) to store the pending IO stats > that could be reused for also the WAL bits. It does not seem that > complicated as far as I can see, removing pgstat_prep_backend_pending > and changing pgstat_flush_backend_entry_io to use the static pending > data. The patch set posted here is doing that within its > pgstat_flush_backend_entry_wal(): > https://www.postgresql.org/message-id/Z4DrFhdlO6Xf13Xd@ip-10-97-1-34.eu-west-3.compute.internal > > I could tweak that around the beginning of next week with a proposal > of patch. Bertrand, perhaps you'd prefer hack on this one? Yeah, I had in mind to work on it (in the exact same line as you are describing above). I'll work on it. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com