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 1sp7jl-00GmOx-BH for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2024 14:57:30 +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 1sp7jl-004Zfn-0F for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2024 14:57:29 +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 1sp7is-004V2c-9U for pgsql-hackers@lists.postgresql.org; Fri, 13 Sep 2024 14:56:34 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sp7in-0010Qr-UR for pgsql-hackers@postgresql.org; Fri, 13 Sep 2024 14:56:33 +0000 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2d8b68bddeaso950118a91.1 for ; Fri, 13 Sep 2024 07:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1726239389; x=1726844189; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yBM76N+ZnTp8aXqmEYpHuP4NwUmYNn+8pzs2lyiVl5M=; b=JZ45HeLuBzOx5DO8GeKAzbRZu82V+7HYKwc8DsSetB9+CDNlWy3F2TbAdfd4XCtfCm hTl+p2/xUchg84Hppzkp19CTi90hda50kIKEXmTNEG3eTPE/JGS1D9ZyYZ9rY1GGYChn yVSxuiucWopmY+X7i2U30Mi3QLxERHItym1J8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726239389; x=1726844189; h=user-agent:in-reply-to:content-transfer-encoding :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=yBM76N+ZnTp8aXqmEYpHuP4NwUmYNn+8pzs2lyiVl5M=; b=D65zcp9I9jfu1a4gke/tJXwD8C0K65IEvvJxhpRN/z5fx+acC2xG4hpt+TTuQLxQ16 dvGlYUq6aVgo2WMEmjUh21IU2ugODcNlLT8gyygS8hZNMWHYeAfZVyd2Fg/7dk8jFOjU HkpBWtXt9gOeGWf7oWMF7byH+lETjzkEGeayRRysUMdLAVPt1rotLeyteCuBOWJAoVd4 hNpaXtgl+QA9x8LUcKfTC3MBfNYrw3wV+bZjs9BcXll04wboue5iDVv0EkFfc0ooJB9r FBZg/72xgswTLEczTiuBNWQE5ycNHXdg0NoAtbp4pJ9zEy16MiABDKDSsgbBYHhc+C+4 jWaw== X-Forwarded-Encrypted: i=1; AJvYcCWKGV6FsX6fKB+mfMq64NHIbpnBr8BFBvjaBUQDF/xJmVvvbqqYvm2VKL8DCla6xeV7kL1d2JJPPf6TNXKm@postgresql.org X-Gm-Message-State: AOJu0YxoNxDYY9GAVAzCunUadKJI+bCpLkNpmEGfZw+aaIcjLUo4iT4S FUXb9mbGDKJwLWbnLdpL8VsMgxJy7MUJPaZxaamN7WaYHC1oDm6vYK2msgd2sw== X-Google-Smtp-Source: AGHT+IEo8XiG2N0qbgvF7r342rmwF8MX6wybMCVsxmXPCAUEOX/iGC1j1r86nG5avNOosX/slLniTg== X-Received: by 2002:a17:90a:12c1:b0:2c8:858:7035 with SMTP id 98e67ed59e1d1-2dbb9f3a559mr4005729a91.25.1726239388969; Fri, 13 Sep 2024 07:56:28 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dbb9d3a504sm1841217a91.53.2024.09.13.07.56.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Sep 2024 07:56:28 -0700 (PDT) Date: Fri, 13 Sep 2024 07:56:21 -0700 From: Noah Misch To: Robert Haas Cc: Michael Paquier , Jacob Champion , Andrew Dunstan , PostgreSQL Hackers , Euler Taveira Subject: Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible Message-ID: <20240913145621.43.nmisch@google.com> References: <20240630174812.d1.nmisch@google.com> <34cc0828-d988-4503-9944-ea6288f0ca8a@dunslane.net> <20240910172712.e8.nmisch@google.com> <20240910205850.5d.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 11, 2024 at 09:00:33AM -0400, Robert Haas wrote: > On Tue, Sep 10, 2024 at 4:58 PM Noah Misch wrote: > > ... a rule of "each wait event appears in one > > pgstat_report_wait_start()" would be a rule I don't want. > > As the original committer of the wait event stuff, I intended for the > rule that you do not want to be the actual rule. However, I see that I > didn't spell that out anywhere in the commit message, or the commit > itself. > > > I see this level of fine-grained naming > > as making the event name a sort of stable proxy for FILE:LINE. I'd value > > exposing such a proxy, all else being equal, but I don't think wait event > > names like AuthLdapBindLdapbinddn/AuthLdapBindUser are the right way. Wait > > event names should be more independent of today's code-level details. > > I don't agree with that. One of the most difficult parts of supporting > PostgreSQL, in my experience, is that it's often very difficult to > find out what has gone wrong when a system starts behaving badly. It > is often necessary to ask customers to install a debugger and do stuff > with it, or give them an instrumented build, in order to determine the > root cause of a problem that in some cases is not even particularly > complicated. While needing to refer to specific source code details > may not be a common experience for the typical end user, it is > extremely common for me. This problem commonly arises with error > messages That is a problem. Half the time, error verbosity doesn't disambiguate enough for me, and I need backtrace_functions. I now find it hard to believe how long we coped without backtrace_functions. I withdraw the objection to "each wait event appears in one pgstat_report_wait_start()".