Re: Who is LISTENing?

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Who is LISTENing?
Date: 2012-10-16 09:35:38
Message-ID: 507D2A6A.10402@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" text="#000000"
bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 10/16/2012 07:49 AM, Raghavendra
wrote:<br>
</div>
<blockquote
cite="mid:CA+h6Ahiy7n-FEydc8M3BLPoCunVRV3cmwHvtxXqougDwM3uwgw(at)mail(dot)gmail(dot)com"
type="cite"><br>
<div class="gmail_quote">On Tue, Oct 16, 2012 at 11:01 AM, Sim
Zacks <span dir="ltr">&lt;<a moz-do-not-send="true"
href="mailto:sim(at)compulab(dot)co(dot)il" target="_blank">sim(at)compulab(dot)co(dot)il</a>&gt;</span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="direction:ltr" text="#000000" bgcolor="#FFFFFF">
<div class="im">
<div>On 10/15/2012 06:11 PM, rektide wrote:<br>
</div>
<blockquote type="cite">
<pre>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:
<a moz-do-not-send="true" href="http://www.postgresql.org/docs/9.2/interactive/sql-notify.html" target="_blank">http://www.postgresql.org/docs/9.2/interactive/sql-notify.html</a>
<a moz-do-not-send="true" href="http://www.postgresql.org/docs/9.2/interactive/tcn.html" target="_blank">http://www.postgresql.org/docs/9.2/interactive/tcn.html</a>

Regards,
</pre>
</blockquote>
</div>
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<span class="HOEnZb"><font color="#888888"><br>
<br>
Sim<br>
</font></span></div>
</blockquote>
</div>
<br>
<div>I guess &nbsp;pg_listener table is deprecated and no longer exist
in PG 9.0 onwards.&nbsp;</div>
<div><br>
</div>
<div>--Raghav</div>
</blockquote>
I guess I'm dating myself (still on 8.2)<br>
This discussion indicates that it is not possible.<br>
<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</a><br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.8 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2012-10-16 09:37:29 Re: return query execute SQL-problem
Previous Message Maximilian Tyrtania 2012-10-16 09:25:49 Re: return query execute SQL-problem