Join GitHub today
Random error with query #8
The plan you were trying to evaluate should work now - if you have any further problems, please let us know.
Thanks again for reporting this issue - it's really helpful to us. As a thank you, we've added a couple of extra credits to your account, and if you'd like to email me - dave[at]pgmustard[dot]com - your t-shirt size, preferred fit (men's/women's) & postal address, we'll send you a pgMustard tshirt.
We're starting to see more and more of this case - where the main thread does no work, and instead farms it all out to worker threads. We suspect it's a feature of Postgres 11 - out of interest, which version of postgres are you running?
The problem: Imagine you have an operation which takes 2.003ms in total, with one worker thread executing a loop that takes 1.002ms and another executing a loop that takes 1.001ms. Then the query plan looks like this:
(the overall "Total Time" value is an average per-loop value, rounded down).
When the app tried to calculate the amount of time spent on the main thread, it got confused because there was some time unaccounted for :
The solution is that we've stopped calculating main-thread values when the main thread doesn't actually perform any loops, since the plan is telling us that the main thread didn't do any work.
This fix was added in commit a82bc8c136d87e4fff959fc50248a50c91cbc89e, deployed at 11:59 15/07/2019