Re: Who is LISTENing?

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Who is LISTENing?
Date: 2012-10-16 05:31:41
Message-ID: 507CF13D.5080600@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/15/2012 06:11 PM, rektide wrote:<br>
</div>
<blockquote cite="mid:20121015161138(dot)GA17738(at)eldergods(dot)com"
type="cite">
<pre wrap="">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 class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/9.2/interactive/sql-notify.html">http://www.postgresql.org/docs/9.2/interactive/sql-notify.html</a>
<a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/9.2/interactive/tcn.html">http://www.postgresql.org/docs/9.2/interactive/tcn.html</a>

Regards,
</pre>
</blockquote>
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<br>
<br>
Sim<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra 2012-10-16 05:49:26 Re: Who is LISTENing?
Previous Message John R Pierce 2012-10-16 04:45:52 Re: Application takes longer time to fetch large no of records from Postgresql 9.0.3