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.96) (envelope-from ) id 1whNRN-000BVT-1y for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2026 08:15:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whNRL-006AAT-2t for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2026 08:15:32 +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.96) (envelope-from ) id 1whNRL-006AAL-22 for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2026 08:15:32 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1whNRJ-00000000CeI-1iPz for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2026 08:15:32 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-493bf73ec2aso2082185e9.2 for ; Wed, 08 Jul 2026 01:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783498529; x=1784103329; 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=Z4DUbJLLKVVz477rMfkcgnAeW0Bxc01g7u0JGXpecEM=; b=UlEHFsStUwPUNrvCLJ1I9ZgxMqBHeFLxYzQ4ANxpbcQuWaJ1zMZYlH+6QchGP6TSXp ttTsAdgBPPkaLkt0bmem8m6RHAhQECzgzpBD3RacZs1ckIEfs28pml4YTG/n1/zsXlk7 eoyav5D7eMsDXJ48n8VCZbWSjyYgBhLY1dmG2zB4UZpzBOrXBtpTvgidJh0xrZRMfI7I TdpP1phiBw31zkhagz6v0s1YJ6hZRUtxIeenudeOnnYtXasdGG1dTVi2z2Rnz2a9EZN2 TnKGiXwOcZBV5V3Pv02bsoKC2kqzHMDaWViohkPiWc3TP7NqLfPurb+S0zIHv/TBPv7f vBDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783498529; x=1784103329; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z4DUbJLLKVVz477rMfkcgnAeW0Bxc01g7u0JGXpecEM=; b=BOu2zxEYyruK5wrX/zlQ/tUKNHmm4p6U8fYTTnLxbEQio+Qv15tYNCESMYTZawLFD7 U06pUa1MrJNyL1atWj22Sb+zOqF6bVfTfqsdk6d2+R4sHMMp0zIEI7CcMCGHuUEVfc4w fvXRTr4lFHKXzv2a0aFWNDCTXjwPZmL6ayy+KhMZ3TFjaZx/3PDr9aLncPemv4OjLnAP orcNAFvutnV3Xh+dCFFD/m4cPaVqU9dgSfhJVfSW76wbVarvuBxCdGIPFF/AKLm2tDwp vR2x+TdORWVloC1D5WP/owWMhoUQlc4scbmfDtDbEzBRAaiSgHOgTKSIFZQYK2gicXSL Wclw== X-Gm-Message-State: AOJu0Ywfombm+c8vNzTCGSofP+1tQVHH76AQKnixuPQxto097dWWXDww IgUttEZiti8fytqugb4UuNNDF6/J1UZFPyUihvFc0b9Iu3GM2OrCTi5Pz/H3PA== X-Gm-Gg: AfdE7clxJbs3mx2VBGf7LrM8+JukX2KMhNJG0hsHtytoDRam+t8R9/TGrt7TLAH0F85 IDVyhHtWOh0/LIGMTCpCwQz6cyMZpe3/H2v1OQyJ0fxGT2sZFqJ/eOFIeRQOCBZ4GVkPKk1hekN wgZK0NVHwCw7DKc9L2CLUiTCyokmS/FiGADehu0FWKECHYovXIQhuE/zC9dnGtuH4VdbBYZwmjH zfFDJvBqjPPeLyxYxo5CwJWkVQ2tzxod5REeiTUbJCUWNeQCJm3KognTPBsekESPegYpq/m6VYm Fkis66NhWOWSKJbpmPnuNHrp+cQtgc8gZqdChfbrD6jGHZ9rHx5hlzkTHXMlRxNTpXNXXZ+AZU9 6W5522DsN+SVeoSpmeZJb+MH9ZHQVXGg9bw4U6N+bW6a3XspApjFhj5Ow1P0mqGBAqITqUmIz4X WJdQnXoyutA0vK/VQ70gJZAbeLaQ/i1Xs+y9iWJptx5nwM3HAm93ksikEuWsSLfW9qFnSQ9Z+4 X-Received: by 2002:a05:600c:4753:b0:493:b84f:9c28 with SMTP id 5b1f17b1804b1-493e6892e6dmr11827185e9.4.1783498528265; Wed, 08 Jul 2026 01:15:28 -0700 (PDT) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493e0f439fesm123650605e9.8.2026.07.08.01.15.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 01:15:27 -0700 (PDT) Date: Wed, 8 Jul 2026 08:15:26 +0000 From: Bertrand Drouvot To: Michael Paquier Cc: pgsql-hackers@lists.postgresql.org, Andres Freund Subject: Re: Add per-backend AIO statistics Message-ID: References: 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 Wed, Jul 08, 2026 at 03:52:20PM +0900, Michael Paquier wrote: > On Tue, Jul 07, 2026 at 11:02:03AM +0000, Bertrand Drouvot wrote: > > 1/ pg_aios that lists all AIO handles that are currently in use. That shows > > what's happening right now, but not what has happened. > > > > 2/ pg_stat_get_backend_io() that shows how much IO was done, but not how it > > was done. There's no way to see whether IOs ran synchronously or > > asynchronously, whether a backend was stalling on handle exhaustion, or how > > completions are distributed across backends. > > While the information may be useful, Thanks for looking at it! > Andres is usually able to catch bottlenecks that everybody else is > unable to see, so perhaps checking with him the location of these > extra function calls would be a good first step. Your proposal goes > down to pgaio_io_stage(), pgaio_io_process_completion() and > pgaio_submit_staged() to track these counter increments. yeah, and also to 1/ confirm that I did understand this area of the AIO code correctly and 2/ see if other counters could make sense. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com