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 1peDE5-0000Ju-Nb for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 10:58:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1peDE4-0006pK-B7 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 10:58:52 +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 1peDE3-0006pB-Vv for pgsql-hackers@lists.postgresql.org; Mon, 20 Mar 2023 10:58:52 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1peDE1-00060x-6O for pgsql-hackers@lists.postgresql.org; Mon, 20 Mar 2023 10:58:51 +0000 Received: by mail-wr1-x435.google.com with SMTP id i9so9900793wrp.3 for ; Mon, 20 Mar 2023 03:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679309928; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ynZQeyZccGIA5ivLzi8R5pIB5NXjAkKeaue/CTxDJhI=; b=lYQWRoDMKJ2qEJTcUG/o/iU9CitdrqyJUmVVjnxz6HI1CnjZIdZL45kjrlS6XIz1Mo Jt/tpDDFA+ttyAvcR94kr8Q6ekwXcDJp6oMBOVUyH88YxbpGNSfoWHExPBaIbYp3K847 dbIFATzkAe1+NXsJWbyrozP3+0BwvyHYi4BgeaS3ci8CLucLEELVolKwfbJA7XVZU+/O +gtElZgosHPe+quQ6BVbR2TBr7+o7DyH4D6y3eKxLmhxAEMJelQBfikfHpsb+Jmr+X3E ZBj1Z22piI722L4DF/4EDjAev6fLf6tgHRj4dD2es4X88ktFkx3su4iyzFZk5i7UNuol qZKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679309928; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ynZQeyZccGIA5ivLzi8R5pIB5NXjAkKeaue/CTxDJhI=; b=ZSR8ZNQsAhcqp2X8X2AXBwPnK5MDeO8jbN4vdu90gYyimpv3neUC4trlmnIcKSUZeq tV5Hs6dfd7gqgD4+TiO+gFmpMrv9Prb+/hRqO9hKYanuLNXY0mrPvC5nxBMCg37xnLxJ Cs5tHnVY4YsVYo7P6xzRLvBnZNaWxcyFPu61aSQ9xbl4k2Ej/ZHU2tj3ixrKvYZnnxmJ 0fFF1HNusFe9y4/Iw4LjHI574UwezdEze6CuPDVNT/ftF0fWPowPOyN3HD+EBYyTi/sO 8HaiGIoAZlu4B6MOjbNdwv3awkhkwwfohFzWW5QhIpRgfNKoKYwz2PvGXrhhfR2QJpxF e+ZQ== X-Gm-Message-State: AO0yUKUaGmESymlvtQ5vbOQ/sG5csleUOxQ7AzQhdqGZYNPIQUdQPUVb K2LYdU2KWCcapVwsA2Ghyr6lSjtoQfPanQ== X-Google-Smtp-Source: AK7set/jan7677a4XqW8C/+iwBWLuSGzhp4x8j47871gdpTvpAZpfJwRUaMR/K3flOa58V4pyTmpsA== X-Received: by 2002:adf:e645:0:b0:2d8:36de:bb79 with SMTP id b5-20020adfe645000000b002d836debb79mr546885wrn.9.1679309927819; Mon, 20 Mar 2023 03:58:47 -0700 (PDT) Received: from [192.168.29.209] ([54.239.6.187]) by smtp.gmail.com with ESMTPSA id k18-20020a05600c1c9200b003dc434b39c7sm26020578wms.0.2023.03.20.03.58.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Mar 2023 03:58:47 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------DXh56tCQLAnlsgZM1OggGx5j" Message-ID: <9ecfa109-7ef8-26bb-3881-f14741abad66@gmail.com> Date: Mon, 20 Mar 2023 11:57:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry Content-Language: en-US To: Michael Paquier Cc: Andres Freund , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org References: <20230214.151102.1070436528757437157.horikyota.ntt@gmail.com> <9262b2a9-6785-1f83-bf7f-7fcf90c2c113@gmail.com> <20230215.095644.822493184688844040.horikyota.ntt@gmail.com> <130095b4-7c6d-b6f1-69d4-94f66231f81d@gmail.com> <20230216212121.uvav7xgdh2ysqjy5@awork3.anarazel.de> <621ed53c-4d9a-8f77-ab8c-20235f2d95a1@gmail.com> From: "Drouvot, Bertrand" In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------DXh56tCQLAnlsgZM1OggGx5j Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 3/20/23 12:43 AM, Michael Paquier wrote: > At the > end, documenting both still sounds like the best move to me. Agree. Please find attached v1-0001-pg_stat_get_xact_blocks_fetched-and_hit-doc.patch doing so. I did not put the exact same wording as the one being removed in ddfc2d9, as: - For pg_stat_get_xact_blocks_hit(), I think it's better to be closer to say the pg_statio_all_tables.heap_blks_hit definition. - For pg_stat_get_xact_blocks_fetched(), I think that using "buffer" is better (than block) as at the end it's related to pgstat_count_buffer_read(). At the end there is a choice to be made for both for the wording between block and buffer. Indeed their counters get incremented in "buffer" macros while retrieved in those "blocks" functions. "Buffer" sounds more appropriate to me, so the attached has been done that way. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --------------DXh56tCQLAnlsgZM1OggGx5j Content-Type: text/plain; charset=UTF-8; name="v1-0001-pg_stat_get_xact_blocks_fetched-and_hit-doc.patch" Content-Disposition: attachment; filename*0="v1-0001-pg_stat_get_xact_blocks_fetched-and_hit-doc.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2RvYy9zcmMvc2dtbC9tb25pdG9yaW5nLnNnbWwgYi9kb2Mvc3JjL3Nn bWwvbW9uaXRvcmluZy5zZ21sCmluZGV4IDYyNDliYjUwZDAuLmZiYThlODkyY2YgMTAwNjQ0 Ci0tLSBhL2RvYy9zcmMvc2dtbC9tb25pdG9yaW5nLnNnbWwKKysrIGIvZG9jL3NyYy9zZ21s L21vbml0b3Jpbmcuc2dtbApAQCAtNTY5Nyw2ICs1Njk3LDMyIEBAIFNFTEVDVCBwaWQsIHdh aXRfZXZlbnRfdHlwZSwgd2FpdF9ldmVudCBGUk9NIHBnX3N0YXRfYWN0aXZpdHkgV0hFUkUg d2FpdF9ldmVudCBpCiAgICAgICAgPC9wYXJhPjwvZW50cnk+CiAgICAgICA8L3Jvdz4KIAor ICAgICAgPHJvdz4KKyAgICAgICA8ZW50cnkgcm9sZT0iZnVuY190YWJsZV9lbnRyeSI+PHBh cmEgcm9sZT0iZnVuY19zaWduYXR1cmUiPgorICAgICAgICA8aW5kZXh0ZXJtPgorICAgICAg ICAgPHByaW1hcnk+cGdfc3RhdF9nZXRfeGFjdF9ibG9ja3NfZmV0Y2hlZDwvcHJpbWFyeT4K KyAgICAgICAgPC9pbmRleHRlcm0+CisgICAgICAgIDxmdW5jdGlvbj5wZ19zdGF0X2dldF94 YWN0X2Jsb2Nrc19mZXRjaGVkPC9mdW5jdGlvbj4gKCA8dHlwZT5vaWQ8L3R5cGU+ICkKKyAg ICAgICAgPHJldHVybnZhbHVlPmJpZ2ludDw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