On Thu, Jan 12, 2017 at 6:24 PM, Robert Haas <robertmh...@gmail.com> wrote:
> On Wed, Jan 11, 2017 at 11:12 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmh...@gmail.com> writes:
>>> On Wed, Jan 11, 2017 at 6:36 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>>>> That would work, if you had a way to get at the active QueryDesc ...
>>>> but we don't pass that down to executor nodes.
>>> Hmm, that is a bit of a problem.  Do you have a suggestion?
>> Copy that string pointer into the EState, perhaps?
> OK, that sounds good.

Thanks a lot Tom and Robert for the suggestions. Please find the
attached file for the revised version of the patch, wherein I added an
extra pointer for queryString in EState and populated it with
queryDesc->sourceText in standard_ExecutorStart. Later, in
ExecInitParallelPlan a token for queryString is created in shared
memory which is used in ExecParallelGetQueryDesc and
ParallelWorkerMain as before (in version 1 of patch).

Please let me know your feedback over the same.

Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/

Attachment: pass_queryText_to_workers_v2.patch
Description: Binary data

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to