Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database)
От | Alvaro Herrera |
---|---|
Тема | Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database) |
Дата | |
Msg-id | 20121122171856.GC8996@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database) (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: [v9.3] Extra Daemons (Re: elegant and effective way
for running jobs inside a database)
|
Список | pgsql-hackers |
Heikki Linnakangas escribió: > On 21.11.2012 23:29, Alvaro Herrera wrote: > >Alvaro Herrera escribió: > >>FWIW I have pushed this to github; see > >>https://github.com/alvherre/postgres/compare/bgworker > >> > >>It's also attached. > >> > >>The UnBlockSig stuff is the main stumbling block as I see it because it > >>precludes compilation on Windows. Maybe we should fix that by providing > >>another function that the module is to call after initialization is done > >>and before it gets ready to work ... but having a function that only > >>calls PG_SETMASK() feels somewhat useless to me; and I don't see what > >>else we could do in there. > > > >I cleaned up some more stuff and here's another version. In particular > >I added wrapper functions to block and unblock signals, so that this > >doesn't need exported UnBlockSig. > > Could you just unblock the signals before calling into the > background worker's main() function? Yes, but what if a daemon wants to block/unblock signals later? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: