Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread David Rowley
On 1 October 2016 at 10:10, Tom Lane wrote: > David Rowley writes: >> On 1 October 2016 at 05:47, Tom Lane wrote: >>> Somebody will need to trace through this on Windows and see where it's >>> going off the rails. > >> I tried the test case on 9.6.0 on a Windows 8.1 machine, and it works >> fine

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Tom Lane
David Rowley writes: > On 1 October 2016 at 05:47, Tom Lane wrote: >> Somebody will need to trace through this on Windows and see where it's >> going off the rails. > I tried the test case on 9.6.0 on a Windows 8.1 machine, and it works > fine for me. Hm, but if we assume that EXPLAIN ANALYZE i

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread David Rowley
On 1 October 2016 at 05:47, Tom Lane wrote: > FWIW, I tried your original example on Linux yesterday, and it seemed to > work fine --- it only wanted to use 1 worker, but the speedup was just > about exactly 2X with or without "explain analyze". So this is somehow > Windows specific. That's darn

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Tom Lane
Jay Knight writes: > I've tried this on a CentOS VM (VirtualBox on Windows) that I gave 2 cores, > and it worked as expected (it launched workers with and without explain > analyze), so I've only been able to reproduce this on Windows. FWIW, I tried your original example on Linux yesterday, and i

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Jay Knight
I've upped max_worker_processes to 16, but I still can't get it to launch workers unless I use EXPLAIN ANALYZE. I've also found that this simplified setup exhibits the same behavior: create table big as ( SELECT generate_series(1,3000) AS id ); explain analyze SELECT avg(id) from big where

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-29 Thread David Rowley
On 30 September 2016 at 10:47, Jay Knight wrote: >>What's max_worker_processes set to? > > 8 > >>One theory would be that, the worker might not have been available >>when you performed the query execution, but it just happened to be >>when you did the EXPLAIN ANALYZE > > This happens consistently

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-29 Thread Jay Knight
>What's max_worker_processes set to? 8 >One theory would be that, the worker might not have been available >when you performed the query execution, but it just happened to be >when you did the EXPLAIN ANALYZE This happens consistently this way. Every time I run it with explain analyze it uses p

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-29 Thread David Rowley
On 30 September 2016 at 08:52, Jay Knight wrote: > So, why might postgres parallelize the query when I explain analyze it, but > not when I just run it by itself? One theory would be that, the worker might not have been available when you performed the query execution, but it just happened to be