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 1qCKP1-0005Uv-I4 for pgsql-general@arkaria.postgresql.org; Thu, 22 Jun 2023 13:31:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qCKO0-0000XC-Na for pgsql-general@arkaria.postgresql.org; Thu, 22 Jun 2023 13:30:08 +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 1qCKO0-0000X1-CT for pgsql-general@lists.postgresql.org; Thu, 22 Jun 2023 13:30:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qCKNt-003cqr-Qo for pgsql-general@lists.postgresql.org; Thu, 22 Jun 2023 13:30:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 35MDTxNb4047831; Thu, 22 Jun 2023 09:29:59 -0400 From: Tom Lane To: Dominique Devienne cc: pgsql-general@lists.postgresql.org Subject: Re: Catalog for LISTEN'ed to notification channels? In-reply-to: References: Comments: In-reply-to Dominique Devienne message dated "Thu, 22 Jun 2023 10:22:41 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4047829.1687440599.1@sss.pgh.pa.us> Date: Thu, 22 Jun 2023 09:29:59 -0400 Message-ID: <4047830.1687440599@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > Can I introspect which "channel(s)" the current (or any other session) is > LISTEN'ing to? The pg_listening_channels() function will show you channel names the current session is listening to. There's no way to find out about other sessions, because that state is only backend-local. regards, tom lane