Re: auto_explain vs. parallel query - Mailing list pgsql-hackers

From Robert Haas
Subject Re: auto_explain vs. parallel query
Date
Msg-id CA+TgmoYe1U=yx2N700AaHUz+oYZm_qYc0HS-4Rm9EAe-mEvTjg@mail.gmail.com
Whole thread Raw
In response to Re: auto_explain vs. parallel query  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: auto_explain vs. parallel query  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Tue, Nov 1, 2016 at 10:21 AM, Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> Clearly we need to pass some information to the worker processes, so that
> they know whether to instrument the query or not. I don't know if there's a
> good non-invasive way to do that from an extension - the easiest way I can
> think of is using a bit of shared memory to pass the "sample query" flag -
> attached is a patch that does that, and it seems to be working fine for me.

Uh, isn't this going to break as soon as there are multiple parallel
queries in process at the same time?

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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: auto_explain vs. parallel query
Next
From: Robert Haas
Date:
Subject: Re: Proposal for changes to recovery.conf API