Re: [GENERAL] Create Action for psql when NOTIFY Recieved - Mailing list pgsql-general

From Steve Atkins
Subject Re: [GENERAL] Create Action for psql when NOTIFY Recieved
Date
Msg-id 836CE0BD-553A-4A1F-80FC-E8F136D0F372@blighty.com
Whole thread Raw
In response to Re: [GENERAL] Create Action for psql when NOTIFY Recieved  (Nico Williams <nico@cryptonector.com>)
Responses Re: [GENERAL] Create Action for psql when NOTIFY Recieved
List pgsql-general
> On Sep 3, 2017, at 3:32 PM, Nico Williams <nico@cryptonector.com> wrote:
>
>
> My principal problem with psql(1) relative to NOTIFY/LISTEN is that
> psql(1) won't check for them until it has had some input on stdin.  So
> it will appear to do nothing when it's idle, even if there millions of
> notifies for it to respond to!
>
> So I wrote a program to just LISTEN: https://github.com/twosigma/postgresql-contrib/blob/master/pqasyncnotifier.c

Me too.

https://github.com/wttw/pgsidekick

Select-based, sends periodic keep-alives to keep the connection open, outputs payloads in a way that's friendly to pipe
intoxargs. (Also the bare bones of a notify-based scheduler). 

Cheers,
  Steve



pgsql-general by date:

Previous
From: Seamus Abshere
Date:
Subject: [GENERAL] Surprising locking behavior with CTE, FOR SHARE, and UPDATE
Next
From: Ryan Murphy
Date:
Subject: [GENERAL] What's the best way in postgres to use ANY() with LIKE '%'?