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 1pzuqY-0007Cu-TZ for pgsql-hackers@arkaria.postgresql.org; Fri, 19 May 2023 07:48:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pzuqX-0007M9-RP for pgsql-hackers@arkaria.postgresql.org; Fri, 19 May 2023 07:48:17 +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 1pzuqX-0007Lz-Hv for pgsql-hackers@lists.postgresql.org; Fri, 19 May 2023 07:48:17 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pzuqU-000dSq-Ve for pgsql-hackers@lists.postgresql.org; Fri, 19 May 2023 07:48:16 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f42769a0c1so29047915e9.2 for ; Fri, 19 May 2023 00:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684482493; x=1687074493; h=content-transfer-encoding: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=/acyZJKfp44Tjo4jfcpAJ8Aj4oVnkzikR7F9gFgFZ6A=; b=Z8BrpamAjO2sdZUKOcJwNI1i7UH1gzW1dtT1vg1N7sG0GnpC8uzZMf5PFIkcvjcVus 5HjltUsTaRjPae9+a5bsnEAp5FVJpmng9eGclZu6uI9bK8rhWjurm7QGMWVcC4DRmtwn IVVAgJ0wFSa/52B5B78ubvBmNWkG4CvtnM8gsgrYY2S5HJZ2xLSxUGxcRXNEr8GcyfVE UvSJpGF7cZGUWN3zZ9GuSj+V5fGnSsSp6mLuImnDYrlhlI9UrAmEgG5eTW2pOban0K1I HJpMhB6F0r+5MsK/hJJ0zh7GIdatAKlX5YbYyDh4lLiM12Q+/CL9YQNGvR0UnVul5rRo O1sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684482493; x=1687074493; h=content-transfer-encoding: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=/acyZJKfp44Tjo4jfcpAJ8Aj4oVnkzikR7F9gFgFZ6A=; b=Ob2dEIReHzQcmtVWNnZ/po5mqsSKoEveMGeSX1wytcMuFha0cM8E/vdFZQqpPBm4Xg pjCyyqUFzwv43hVAukuK4C9DmSwDHggbiRVV3Sxa8ew49p75+jDGzk32ene8OI8dvWAG 9ho4q1jBOOquAK9bs8FbZfLweDzt2M6sNUQ7pzOJs8ZatFLAfmXUugPTsNlYLV0Vi2VT +gea4uz41iPdOtwRrGYrk7AJI1O2ULOT08hrxlyK7P/aiegOx90hnL0hIqzCPSeS0Ehk nfDLvAl3I091wGZBX7Y+f0PXH9Vd4JRLPo8FVPRMnsfSZY57uxdzK3RLh0IpkmMyJJUZ FdaQ== X-Gm-Message-State: AC+VfDzXpegz2gF6bvWETa1Y7sFyV2il/QRQFeDuwqQRGzrsYZscg4tt ng4J8DZa/VVU5oObshBA4qU= X-Google-Smtp-Source: ACHHUZ6UWBnFR5rkrU9KE+9iQc/pxYBqjS4DZAPbBxNlhtY29rBh0K1eYLsae4Y0WH//YjxPLqQKiA== X-Received: by 2002:a05:600c:364b:b0:3f4:ef3c:a89f with SMTP id y11-20020a05600c364b00b003f4ef3ca89fmr629185wmq.1.1684482493159; Fri, 19 May 2023 00:48:13 -0700 (PDT) Received: from [192.168.26.145] ([54.239.6.184]) by smtp.gmail.com with ESMTPSA id m8-20020a7bca48000000b003f427687ba7sm1472782wml.41.2023.05.19.00.48.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 May 2023 00:48:12 -0700 (PDT) Message-ID: <81290a48-b25c-22a5-31a6-3feff5864fe3@gmail.com> Date: Fri, 19 May 2023 09:48:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN Content-Language: en-US To: Michael Paquier , Robert Haas Cc: Andres Freund , PostgreSQL Hackers References: <20230515182956.5lavflljhpgpokxc@awork3.anarazel.de> <20230516001716.iy7no2q77vwdt5w2@awork3.anarazel.de> <20230516010102.jwmsuaoynz6zfqmn@awork3.anarazel.de> <20230517233832.si5zpq3qnxmx3swb@awork3.anarazel.de> From: "Drouvot, Bertrand" 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 Hi, On 5/19/23 12:36 AM, Michael Paquier wrote: > On Thu, May 18, 2023 at 12:28:20PM -0400, Robert Haas wrote: >> I mean, I agree that it would probably be hard to measure any real >> performance difference. But I'm not sure that's a good reason to add >> cycles to a path where we don't really need to. > > Honestly, I am not sure that it's worth worrying about performance > here, Same feeling here and as those new functions will be used "only" from pg_stat_get_activity() / pg_stat_get_backend_wait_event(). > or perhaps you know of some external stuff that could set the > extension class type in a code path hot enough that it would matter. And that would matter, only when making use of pg_stat_get_activity() / pg_stat_get_backend_wait_event() at the time the "extension is waiting" on this wait event. While at it, I think that making use of an enum might also be an open door (need to think more about it) to allow extensions to set their own wait event. Something like RequestNamedLWLockTranche()/GetNamedLWLockTranche() are doing. Currently we have "only" the "extension" wait event which is not that useful when there is multiples extensions installed in a database. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com