Re: How to kill a Background worker and Its metadata
От
Michael Paquier
Тема
Re: How to kill a Background worker and Its metadata
Дата
Msg-id
CAB7nPqQzd0Q9eJKjL43PGBXuCc=pyh_Wy+b2fHwkf=SPycZ-6Q@mail.gmail.com
Ответ на
How to kill a Background worker and Its metadata (Akash Agrawal)
Список
Дерево обсуждения
How to kill a Background worker and Its metadata Akash Agrawal <aagrawa6@ncsu.edu>
Re: How to kill a Background worker and Its metadata Michael Paquier <michael.paquier@gmail.com>
Re: How to kill a Background worker and Its metadata Akash Agrawal <aagrawa6@ncsu.edu>
Re: How to kill a Background worker and Its metadata Craig Ringer <craig@2ndquadrant.com>
Re: How to kill a Background worker and Its metadata Craig Ringer <craig@2ndquadrant.com>
Re: How to kill a Background worker and Its metadata Akash Agrawal <aagrawa6@ncsu.edu>
On Tue, Jun 28, 2016 at 3:27 AM, Akash Agrawal wrote: > I've created a background worker and I am using Postgresql-9.4. This > bgworker handles the job queue dynamically and goes to sleep if there is no > job to process within the next 1 hour. > > Now, I want to have a mechanism to wake the bgworker up in case if someone > adds a new job while the bgworker is in sleep mode. So to do it, I have > created a trigger which initially removes the existing background worker and > then registers a new one. I am using the following two queries inside it: Why don't you just register and use a signal in this case? You could even do something with SIGHUP... -- Michael
В списке pgsql-hackers по дате отправления