Re: How to share the result data of separated plan - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to share the result data of separated plan
Date
Msg-id 25961.1289234753@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to share the result data of separated plan  (Hitoshi Harada <umi.tanuki@gmail.com>)
List pgsql-hackers
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> But reading closer your response, it occurred to me that ModifyTable
> can be the storage to be shared among separated plans instead of newly
> invented DtScan. Are you suggesting embed ModifyTable into the main
> query, that is also on the top of child plans? In this way we can
> still separate plans and scan the result of child plans without much
> modification of portal/explain?

There is noplace where we need to "scan the result of child plans".
We need to scan the set of RETURNING tuples emitted by a child
ModifyTable node.  That has nothing whatever to do with what it wrote to
disk.  We would hardly wish to try to reconstruct those tuples from
re-reading what it wrote to disk anyway --- that idea fails completely
for a DELETE RETURNING subquery, for example.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to share the result data of separated plan
Next
From: Tom Lane
Date:
Subject: Re: Protecting against unexpected zero-pages: proposal