Re: Parallel Seq Scan - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Parallel Seq Scan
Date
Msg-id CA+TgmoYs2rre4tGE9o=T4c2gnKopamWOUD1kuRF1KwhuPXUeGQ@mail.gmail.com
Whole thread Raw
In response to Re: Parallel Seq Scan  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Responses Re: Parallel Seq Scan  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
List pgsql-hackers
On Tue, Sep 22, 2015 at 9:12 PM, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
> Oh... I did exactly duplicated job a few days before.
>   https://github.com/kaigai/sepgsql/blob/readfuncs/src/backend/nodes/readfuncs.c

Please post the patch here, and clarify that it is under the PostgreSQL license.

> Regarding of CustomScan node, I'd like to run on worker process as soon as
> possible once it gets supported. I'm highly motivated.

Great.

> Andres raised a related topic a few weeks before:
> http://www.postgresql.org/message-id/20150825181933.GA19326@awork2.anarazel.de
>
> Here are two issues:
>
> * How to reproduce "methods" pointer on another process. Extension may not be
>   loaded via shared_preload_libraries.

The parallel mode stuff already has code to make sure that the same
libraries that were loaded in the original backend get loaded in the
new one.  But that's not going to make the same pointer valid there.

> -> One solution is to provide a pair of library and symbol name of the method
>    table, instead of the pointer. I think it is a reasonable idea.

I agree.

> * How to treat additional output of TextOutCustomScan.
> -> Here are two solutions. (1) Mark TextOutCustomScan as an obsolete callback,
>    however, it still makes Andres concern because we need to form/deform private
>    data for copyObject safe. (2) Add TextReadCustomScan (and NodeEqualCustomScan?)
>    callback to process private fields.

I don't see how making it obsolete solves anything.  Any node that
wants to run in a worker needs to have outfuncs and readfuncs support.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Parallel Seq Scan
Next
From: Kouhei Kaigai
Date:
Subject: Re: planstate_tree_walker oversight CustomScan