Re: Passing query string to workers

From: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Kuntal Ghosh <kuntalghosh(dot)2007(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-11 03:08:58
Message-ID: CAOGQiiOWSTW0fyk8rKLfEXxL7r9TkDVxDo58X2D0GQzZMR4MRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> >
> > There are some spacing issues in the code. For example,
> > + estate->es_queryString = (char
> > *)palloc0(strlen(queryDesc->sourceText) + 1);
> > + /*Estimate space for query text. */
> > pgindent might be helpful to track all such changes.
> >
>
Fixed.

> > +#define PARALLEL_KEY_QUERY_TEXT UINT64CONST(0xE000000000000010)
> > I'm uncomfortable with declaring the same macro in two
> > files(parallel.c, execParallel.c). My suggestion would be to move
> > pgstat_report_activity in ParallelQueryMain instead of
> > ParallelWorkerMain. Then, you can remove the macro definition from
> > parallel.c. Thoughts?
> >

Yes, I also don't see any need of defining it in parallel.c. I think
> she has kept to report it in pg_stat_activity, but I feel that code
> can also be moved to execParallel.c.
>
> Agree and fixed.

> Another question is don't we need to set debug_query_string in worker?

In the updated version I am setting it in ParallelQueryMain.

Please find the attached file for the revised version.

--
Regards,
Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/

Attachment Content-Type Size
pass_queryText_to_workers_v4.patch application/octet-stream 4.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-02-11 04:22:34 Re: Parallel Index Scans
Previous Message Tomas Vondra 2017-02-11 01:54:27 Re: Should we cacheline align PGXACT?