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 1tvVK3-005Gtn-4c for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Mar 2025 05:53:35 +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 1tvVK1-00Gxh2-Dy for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Mar 2025 05:53:33 +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 1tvVK1-00Gxgu-3z for pgsql-hackers@lists.postgresql.org; Fri, 21 Mar 2025 05:53:33 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tvVJy-000Gn9-36 for pgsql-hackers@postgresql.org; Fri, 21 Mar 2025 05:53:32 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id 4C4E013833A4; Fri, 21 Mar 2025 01:53:29 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Fri, 21 Mar 2025 01:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1742536409; x=1742622809; bh=0ylXhqYa3Y knrDq4hi+2wbHgmOh1nL4PphgrwZDLpG4=; b=vQf9hXABrUjNHLX/s54/KWDXuv CAdReb9Wahl1AY36kBxExqiGY6pSPQpOwErlNYzPJIMblTWiaWpwjsqS7THblCfO T4Fl9pr6g5YgPZmNs4gfl2Q0A+9VK1qGZ4aMT+PnYayNXUBWqJhJdALeZIQZckmT IAT60e0iu7hh92VOzGSzidqI2fiqyHb9lsD+QwUQCNXpOwvifEiFtB+ycyTGd9Lk PHLLQci5FuI2ZcCqGC7OCATzA5oYlO9mHB72CRGgOMo/nrDlr43ptE1ChBJ7nXM+ A+dKC/7F20KtBOdZH1HRHlJ1qVwXCUUPPQt+fkkOVQ84IWTGtlEpms01dh5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1742536409; x=1742622809; bh=0ylXhqYa3YknrDq4hi+2wbHgmOh1nL4Pphg rwZDLpG4=; b=527d9gRqypxii8AU7vkDV4arXADiwG0wZZoDhTyOXIDOOk6lA0W lMk912O2D4w1o3e1ibFTfouBviywoian8x+EueyoKNyAqXTyyCrB5dxmGKAlq7QT G6/seqZKS4uGRvSYsh4EIbfM5H/CT3sWxl3cPMIN/Ea1PJhWgHifPyDfInPbEJyM Qv/5JRbA/r3FCFbIm4SMk+j0JBTRtSsYnR+jczvUSDPW9KZsEIXf5jJ8kfxfALZ6 DwFBgVwMBWBMy0c7cDkx2X6cNy0RzdsdCvFP3itra5K6YQ0S845AdE26L2Ow6BUR /RIq4dnsb1Tj6nLXUykYjaS8wKeyjLh4wFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduhedtfedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefu kfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivg hruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhep teelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggv lhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepkedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepjhgrtghosgdrtghhrghmphhiohhnsegvnhhtvghrphhrihhs vggusgdrtghomhdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprh gtphhtthhopehrohgsvghrthhmhhgrrghssehgmhgrihhlrdgtohhmpdhrtghpthhtohep nhhorghhsehlvggruggsohgrthdrtghomhdprhgtphhtthhopegrnhgurhgvfiesughunh hslhgrnhgvrdhnvghtpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshht ghhrvghsqhhlrdhorhhgpdhrtghpthhtohepvghulhgvrhdrthgrvhgvihhrrgesvghnth gvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtohepuggrnhhivghlseihvghsqhhlrdhs vg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 21 Mar 2025 01:53:24 -0400 (EDT) Date: Fri, 21 Mar 2025 14:53:12 +0900 From: Michael Paquier To: Jacob Champion Cc: Andres Freund , Robert Haas , Noah Misch , Andrew Dunstan , PostgreSQL Hackers , Euler Taveira , Daniel Gustafsson Subject: Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xPJhzt5FfLAwg9sb" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xPJhzt5FfLAwg9sb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 17, 2025 at 10:22:47AM -0700, Jacob Champion wrote: > I looked into switching over to pgstat_report_activity(), but that > wasn't designed to be called in the middle of backend initialization. > It would take more work to make those calls safe/sane when `st_state > =3D=3D STATE_STARTING`. I plan to mark this patchset as Withdrawn for now. Okay, fine by me. I had the impression that it would have been possible to salvage some of the wait event states, but at least the=20 starting state showing up in pg_stat_activity will be able to provide some information, so it's better than none. Unfortunately, I don't have any room until the feature freeze for that. Outside the stat report activity calls, I've been wondering if we should add some dynamic tracking of which hba/ident entry a backend PID is working with. For example, if we knew the file and the entry line number, we would know on which auth method this backend is bumping into. That maybe of course limited if someone modifies and reloads the HBA file while a backend is stuck. Now, these files are mostly static, and we have system views that provide the contents of the ident and HBA files as SQL, so with a JOIN.. -- Michael --xPJhzt5FfLAwg9sb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmfc/sgACgkQnvQgOdby QH16LQ/+MDXYKv2Tqew7WOa/JWz2wZWp6oFiHfMOds5OI2qO23CjFQrcMyy4nhXo hjD6GHBr1nSRCfj0G63PW7W9ATNsXKgKVD+xDZVRTNoAKkRRxsBV0Y2P3S9vzjeP fVobs7bhImBxpnX5vsfZmF3vKEZUCsOPm9xSY5ZXI2BHYUaR2xKeEHnCLfwOXldP pCQ+GR6i40ro5DpvFW0BtPgK0Q1Jv4paUpyaqnPXoQqh4BJbwCJ3c/WGjgV51erh 11VSioeLg4NmI/XHQNeF1hy1RUPRI4Hae+jiDx7sQ0elWjGzXi/OQPvk/+BvSnsj 1gVCXfVwkWilkVi0sqL+0hjG0qHf63FX/+Z4FPyxuowkNat5XCibutAkAhFDUlyV DcC1QPhdMhk85YhMgqZ8VQKMrX1rs3K3tO2uKvnqCc9rBEMz4hMGbhYR5xaTKnBH U3atuhW/wJVXph+b4wQhpxXGYkAtOKgzz4VR9kwgBsxiCVFFx5lY0CdeU9BcYQRT qNjIufzPsYsvBjBwfn5DytSZ4EpzDf+a8/hjbe9BfEoZWRhJeBNVQbmkUg0pa6LW KHkjLcQIDjjQE+mH9+F1xY+JedKHnN8DVKLDKomuetApvXwIiNzNU4w4xkWH7EE9 9t0aCTBtuIFuvtbvntiy5hf8EvykN/1GmfnbhLfSYY3PmCbpsnM= =sJqK -----END PGP SIGNATURE----- --xPJhzt5FfLAwg9sb--