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 1qZYpB-005sOj-UR for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Aug 2023 15:34:13 +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 1qZYoB-003xRv-Qf for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Aug 2023 15:33:11 +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 1qZYoB-003xRj-GK for pgsql-hackers@lists.postgresql.org; Fri, 25 Aug 2023 15:33:11 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qZYo7-000zxr-P9 for pgsql-hackers@postgresql.org; Fri, 25 Aug 2023 15:33:10 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-5633b7e5f90so660594eaf.1 for ; Fri, 25 Aug 2023 08:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692977585; x=1693582385; 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=ZvsABxSV1G47yHS8EPWwICXSeTbOUHKQX9G0eJv/yCM=; b=OP82nh3fYQz6c/Ft0Jk4etbYnSCIWil2CBhMlyFkeUcOylGJ8TblU+NOX+CkUR+kmy tbDku0L6IFkrZyfW17kp4UPfnbO5YGtzXamu2zMkzn0Wm3dAQe1ZKClaM5ZKC3JDgsX+ gl1AyZ2VZKiSpJDeGEYfSRsZpgpAnsofzy/15dHKe9izvCloXKXsoubm+fdZNY8EOYtd BoR2a925Bfayuj0CNA8VT3QI/QQL/1BmFmWxGApoxk5Mlki6ve+sEuWKHafPoNDx70Ei 0jRMafD4TKkNLdFs7PO6Vq6cne+GobWLZX1hxs1o6el6RpVF+APmURg7trwCmMrV+8WS XzSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692977585; x=1693582385; 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=ZvsABxSV1G47yHS8EPWwICXSeTbOUHKQX9G0eJv/yCM=; b=mA5n1YlddokqPUXOzsLUNABy+/nS186cu7OqVS2S45qqzdWGl1j1IOdMAqKMwwv/BX agDAGJKuzqzuOxOem+f5/SdOgDVq7KYIBBuSwzsyY6u6AsLjrivkI7S8ml4sm2i/+oOy yPNEHotVGmJS0iBtl9cg3vsO3CLLtICd1krN5HS2l8FXiOFuX+kYu0PSUJlvlYHRpZi7 eQbOxWNAE7K/M8QZvauCbi/fNVuCyjVIVt+3i2sUSr34HxV8UP6lirlO6wsUGCU3Yda/ 3MBlQFGPBTBaWsWYzmekws5QLZyyO5TsfFsFx42tm7GK4j2L2hqb4PvP6Dz0h9eRyyNQ lwdw== X-Gm-Message-State: AOJu0YyPUstDaQ01QtgtiyiFh05ocq/0JBnJiDq7HDznsW6mJA1ft0wy qWS7e1JqLngamVjx0d8f/60= X-Google-Smtp-Source: AGHT+IEUUFZTJ4GP41AWeIs+3uvbIjeEzDde9i8Pjr7C6jHQMmoyvZEcVmCScS2a9iGB7JE6Cl+lrw== X-Received: by 2002:a4a:9251:0:b0:571:2644:f304 with SMTP id g17-20020a4a9251000000b005712644f304mr5807367ooh.8.1692977580587; Fri, 25 Aug 2023 08:33:00 -0700 (PDT) Received: from nathanxps13 ([2600:1700:48f8:340f:5bd:6ec:2f16:2832]) by smtp.gmail.com with ESMTPSA id d24-20020a4ae838000000b00541fbbbcd31sm973528ood.5.2023.08.25.08.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 08:32:59 -0700 (PDT) Date: Fri, 25 Aug 2023 08:32:51 -0700 From: Nathan Bossart To: Ian Lawrence Barwick Cc: pgsql-hackers , robertmhaas@gmail.com Subject: Re: pg_stat_get_backend_subxact() and backend IDs? Message-ID: <20230825153251.GA1593219@nathanxps13> References: <20230824023206.GA1128857@nathanxps13.lan> <20230824025140.GB1128857@nathanxps13.lan> <20230824161913.GA1394441@nathanxps13.lan> 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 On Fri, Aug 25, 2023 at 09:36:18AM +0900, Ian Lawrence Barwick wrote: > Thanks for looking at this. In summary we now have these functions: > > extern PgBackendStatus *pgstat_get_beentry_by_backend_id(BackendId beid); > extern LocalPgBackendStatus > *pgstat_get_local_beentry_by_backend_id(BackendId beid); > extern LocalPgBackendStatus *pgstat_get_local_beentry_by_index(int beid); > > which LGTM; patches work as expected and resolve the reported issue. On second thought, renaming these exported functions so close to release is probably not a great idea. I should probably skip back-patching that one. Or I could have the existing functions call the new ones in v16 for backward compatibility... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com