Re: elegant and effective way for running jobs inside a database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elegant and effective way for running jobs inside a database
Date: 2012-03-06 22:53:00
Message-ID: 21910.1331074380@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I was thinking that the connection would be kept open but no query would
> be running. Does this preclude reception of notifies? I mean, you
> don't sleep via "SELECT pg_sleep()" but rather a select/poll in the
> daemon.

No. If you're not inside a transaction, notifies will be sent
immediately. They'd be pretty useless if they didn't work that way ---
the whole point is for clients not to have to busy-wait.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2012-03-06 23:12:25 Re: elegant and effective way for running jobs inside a database
Previous Message Alvaro Herrera 2012-03-06 22:26:29 Re: elegant and effective way for running jobs inside a database