On Sat, Aug 3, 2013 at 5:43 AM, Alvaro Herrera <alvhe...@2ndquadrant.com>wrote:

> Tomas Vondra wrote:
> > I'm learning how to use the "background worker processes" commited in
> > 9.3. The usage basics are quite nicely illustrated in the worker_spi
> > extension (kudos to those who designed the feature / extension).
> Thanks!
> > I'm not quite sure how to pass data between the regular backend and a
> > worker. Implementing the channel (socket/pipe/...) itself is not a big
> > deal, that's IPC 101, but deciding which data to copy (and how) is.
> >
> > [...]
> Were you able to figure it out?  If so, would you share?

I'm also in the middle of doing some experiments with bgworkers, and for me
it's the IPC part that's proving tricky.  I'd love to have a simple socket
that can be used to communicate with the bgworker.  But because the
bgworker is launched by the postmaster -- and not the backend which
registers it -- there's no chance for the bgworker to inherit one end of
the socketpair().

Tomas:  in the end, what approach did you use for IPC?

Robert:  any chance you could share a few more details on the enhancements
you're planning for bgworkers?  I seem to recall reading that communicating
with the dynamic bgworkers after they had been launched was next on your

Andrew Tipton

Reply via email to