Re: Passing query string to workers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Passing query string to workers
Date: 2017-01-12 03:25:33
Message-ID: CA+TgmoYfYwyeat5=p4u6Vn52b3inL6H96P+CD8batgfuF6vjOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 11, 2017 at 6:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Jan 11, 2017 at 7:37 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> As far as reproducing the pg_stat_activity query goes, you could probably
>>> grab that string out of the master backend's pgstat entry and pass it over
>>> at parallel query start. But please don't confuse it with either
>>> debug_query_string or the string referenced by the QueryDesc; I do not
>>> think there's any guarantee that those are the same.
>
>> I think we should pass only the string referenced by the QueryDesc to
>> the worker, and on the worker side report that via debug_query_string
>> and pg_stat_activity and attach it to the QueryDesc itself. Is that
>> also your view?
>
> 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?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-01-12 03:37:28 Re: WIP: [[Parallel] Shared] Hash
Previous Message Merlin Moncure 2017-01-12 03:21:50 Re: merging some features from plpgsql2 project