Re: Passing query string to workers

From: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
To: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Passing query string to workers
Date: 2017-02-16 11:36:10
Message-ID: CAGz5QCK9K1jk8uWEpT8BLUhp8WpNhHzeUfNWq25qwqUVMf7q=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 11, 2017 at 8:38 AM, Rafia Sabih
<rafia(dot)sabih(at)enterprisedb(dot)com> wrote:
>
>>
>> Another question is don't we need to set debug_query_string in worker?
>
> In the updated version I am setting it in ParallelQueryMain.
>
Ahh, I missed that. debug_query_string is used to show the log
statements. Hence, it should be set.

> Please find the attached file for the revised version.
>
+ queryString = shm_toc_lookup(toc, PARALLEL_KEY_QUERY_TEXT);
+ debug_query_string = shm_toc_lookup(toc, PARALLEL_KEY_QUERY_TEXT);
+ pgstat_report_activity(STATE_RUNNING, shm_toc_lookup(toc,
PARALLEL_KEY_QUERY_TEXT));
Just one lookup is sufficient.

--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2017-02-16 11:45:37 Re: Measuring replay lag
Previous Message Simon Riggs 2017-02-16 11:32:38 Re: Partitioned tables and relfilenode