Re: Who is LISTENing? - Mailing list pgsql-general

From Sim Zacks
Subject Re: Who is LISTENing?
Date
Msg-id 507D2A6A.10402@compulab.co.il
Whole thread Raw
In response to Re: Who is LISTENing?  (Raghavendra <raghavendra.rao@enterprisedb.com>)
List pgsql-general
<meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    body p { margin-bottom: 0cm; margin-top: 0pt; }

  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="latin-charset" text="#000000"
    bgcolor="#FFFFFF">
    On 10/16/2012 07:49 AM, Raghavendra
      wrote:

    <blockquote
cite="mid:CA+h6Ahiy7n-FEydc8M3BLPoCunVRV3cmwHvtxXqougDwM3uwgw@mail.gmail.com"
      type="cite">
      On Tue, Oct 16, 2012 at 11:01 AM, Sim
        Zacks <<a moz-do-not-send="true"
            href="mailto:sim@compulab.co.il" target="_blank">sim@compulab.co.il>
        wrote:
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">


              On 10/15/2012 06:11 PM, rektide wrote:


                Hi pgsql-general,

I'm interested in writing a supervisory process that can insure worker processes are
running/spawn new ones if not. These workers will mainly be responsible for LISTENing to
the db, which is emitting triggered_change_notification s.

Is there any means to check a NOTIFY queue to see who or if anyone is LISTEN ing on it?

Links:
http://www.postgresql.org/docs/9.2/interactive/sql-notify.html
http://www.postgresql.org/docs/9.2/interactive/tcn.html

Regards,



            You can look in the pg_listener table. The relname is the
            Listen/notify code that you call and the listenerpid is the
            OS pid. You can see more details of that in the
            pg_stat_activity

                Sim




      I guess  pg_listener table is deprecated and no longer exist
        in PG 9.0 onwards. 


      --Raghav

    I guess I'm dating myself (still on 8.2)
    This discussion indicates that it is not possible.
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a

href="http://archives.postgresql.org/pgsql-hackers/2011-06/msg00016.php">http://archives.postgresql.org/pgsql-hackers/2011-06/msg00016.php

pgsql-general by date:

Previous
From: Condor
Date:
Subject: Re: return query execute SQL-problem
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: return query execute SQL-problem