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 1sQyLB-00Cc8c-JR for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jul 2024 00:04:17 +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 1sQyL9-00ApeY-LP for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jul 2024 00:04:15 +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 1sQyL9-00ApeP-1Q for pgsql-hackers@lists.postgresql.org; Tue, 09 Jul 2024 00:04:15 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sQyL2-00181n-F5 for pgsql-hackers@postgresql.org; Tue, 09 Jul 2024 00:04:14 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3d92bbadfd6so1249422b6e.3 for ; Mon, 08 Jul 2024 17:04:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1720483445; x=1721088245; 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=62s2EBQc2ROf75q13TG36tPk37fS/EIg8vroioaGDks=; b=A9yZ3MnDmni5WxSHrJZ5WuSJI7QUkDMUgYdGVkUEHA/WYrJ9usf6H09/mWrUq2uCB2 1/yANokVqFY2MIPaH9JEEY7+ofwpoy43l3BuH/srR+hxKT1zAMQCvDsTpzF0ZI3fB686 QUrkvYbUnCuDlrzQnc9p+CjaqnA9JS4QFtBF4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720483445; x=1721088245; 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=62s2EBQc2ROf75q13TG36tPk37fS/EIg8vroioaGDks=; b=wvz2MlM4CTgvHj1bii7tDb91ts9ryU2g5oSXhWVlHZ7w5uc5N+sePpziHB6RcgrwmY kUS0EaX8TjkleMD1mM+DxF95ZNkoXkz8hBGlXayTy0j78AvhnaMUvM/T6yFqFTbp1aS2 OFfj2txT1uvohsSOgVgaW+SJUrb7zuVkV1/2nAdgONtYytUMOa44iC/qSrI8X5ZWadIP ExG1NtioBk3fRbNg98Z2xYBPS+f3ZteOTmgxAelVqt3dY1ZRz1nE6IMSt+GIp0QYc6SH 6mMjzbJwbO6gFwldLfqj3evDo/Gon6m2FWsfsJNxco7CGAhVjpeH9t7tItd85m2xSodW DjLQ== X-Gm-Message-State: AOJu0Yx97HGY3zHcqH2HKLm8MU6n/YKJPeTU5ym8yDlW5yNxUCOjEbfC q/FkXNOkSTWQ7MdgpS9jaWSUZSTK0CLc2Rt6W/6xlCPq+CvYMzRQuEd7ZkmQGRx9xSTPDxkDXrY = X-Google-Smtp-Source: AGHT+IFTDp3eJlvIn//pAq5gsBSvciSCZVv4Nu6DLTIjR0Kmr69TBfxTHDObBef2uGrLmgCRH11IoQ== X-Received: by 2002:a05:6808:2208:b0:3d9:24b6:96d9 with SMTP id 5614622812f47-3d93bffcddamr1016841b6e.13.1720483444902; Mon, 08 Jul 2024 17:04:04 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3d93ada7659sm193954b6e.57.2024.07.08.17.04.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jul 2024 17:04:04 -0700 (PDT) Date: Mon, 8 Jul 2024 17:04:01 -0700 From: Noah Misch To: Jacob Champion Cc: PostgreSQL Hackers , Euler Taveira Subject: Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible Message-ID: <20240709000401.0b.nmisch@google.com> References: <20240630174812.d1.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 Mon, Jul 08, 2024 at 02:09:21PM -0700, Jacob Champion wrote: > On Sun, Jun 30, 2024 at 10:48 AM Noah Misch wrote: > > That said, it > > may be more fruitful to arrange for authentication timeout to cut through PAM > > etc. > > That seems mostly out of our hands -- the misbehaving modules are free > to ignore our signals (and do). Is there another way to force the > issue? Two ways at least (neither of them cheap): - Invoke PAM in a subprocess, and SIGKILL that process if needed. - Modify the module to be interruptible. > > Hanging connection slots hurt even if they lack an xmin. > > Oh, would releasing the xmin not really move the needle, then? It still moves the needle.