Re: how to pass data (tuples) to worker processes?

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: how to pass data (tuples) to worker processes?
Date: 2013-08-02 21:43:03
Message-ID: 20130802214302.GV5669@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
>
> Say I need to forward a tuple to the worker process - e.g. from a
> nodeAgg node, so that the worker can build the hash table. Is there
> something (a rule of a thumb, method, ...) that would help me to
> identify the pieces of data that need to be copied?
>
> Or do I need to do the go through the objects and decide what to copy
> and how on my own?

Were you able to figure it out? If so, would you share?

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-08-02 21:57:52 Re: Patch for removng unused targets
Previous Message Josh Berkus 2013-08-02 21:37:28 Re: 9.3 Reviewer Credit WAS: Kudos for Reviewers -- wrapping it up