Re: [HACKERS] auto_explain vs. parallel query

2016-11-03 Thread Robert Haas
On Thu, Nov 3, 2016 at 12:11 PM, Tomas Vondra wrote: >> Sure, the Gather node creates it. There's generally only one per >> query, though, and that's how most information is communicated from >> leader to workers. > > Ah, right. I haven't realized there's just a single Gather per query. That's no

Re: [HACKERS] auto_explain vs. parallel query

2016-11-03 Thread Tomas Vondra
On 11/03/2016 03:59 PM, Robert Haas wrote: On Wed, Nov 2, 2016 at 12:49 PM, Tomas Vondra wrote: On 11/01/2016 08:32 PM, Robert Haas wrote: On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra wrote: Damn! You're right of course. Who'd guess I need more coffee this early? Attached is a fix replaci

Re: [HACKERS] auto_explain vs. parallel query

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 12:49 PM, Tomas Vondra wrote: > On 11/01/2016 08:32 PM, Robert Haas wrote: >> On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra >> wrote: >>> >>> Damn! You're right of course. Who'd guess I need more coffee this early? >>> >>> Attached is a fix replacing the flag with an array

Re: [HACKERS] auto_explain vs. parallel query

2016-11-02 Thread Tomas Vondra
On 11/01/2016 08:32 PM, Robert Haas wrote: On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra wrote: Damn! You're right of course. Who'd guess I need more coffee this early? Attached is a fix replacing the flag with an array of flags, indexed by ParallelMasterBackendId. Hopefully that makes it work

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra wrote: > Damn! You're right of course. Who'd guess I need more coffee this early? > > Attached is a fix replacing the flag with an array of flags, indexed by > ParallelMasterBackendId. Hopefully that makes it work with multiple > concurrent parallel qu

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Tomas Vondra
On 11/01/2016 03:29 PM, Robert Haas wrote: On Tue, Nov 1, 2016 at 10:21 AM, Tomas Vondra 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 extensio

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Robert Haas
On Tue, Nov 1, 2016 at 10:21 AM, Tomas Vondra 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

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Tomas Vondra
On 11/01/2016 02:15 PM, Robert Haas wrote: On Mon, Oct 31, 2016 at 6:35 PM, Tomas Vondra wrote: While debugging something on 9.6, I've noticed that auto_explain handles parallel queries in a slightly strange way - both the leader and all the workers log their chunk of the query (i.e. the leader

Re: [HACKERS] auto_explain vs. parallel query

2016-11-01 Thread Robert Haas
On Mon, Oct 31, 2016 at 6:35 PM, Tomas Vondra wrote: > While debugging something on 9.6, I've noticed that auto_explain handles > parallel queries in a slightly strange way - both the leader and all the > workers log their chunk of the query (i.e. the leader logs explain for the > whole query, whi

[HACKERS] auto_explain vs. parallel query

2016-10-31 Thread Tomas Vondra
Hi, While debugging something on 9.6, I've noticed that auto_explain handles parallel queries in a slightly strange way - both the leader and all the workers log their chunk of the query (i.e. the leader logs explain for the whole query, while workers only log the parts they've been executing)