On Tue, Nov 28, 2017 at 8:17 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Wed, Nov 29, 2017 at 1:33 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> Why not? Can't it just be that the workers are slow getting started?
>
> In the normal non-error control flow, don't we expect
> ExecShutdownGather() to run ExecParallelFinish() before
> ExecParallelCleanup(), meaning that the leader waits for workers to
> finish completely before it detaches itself? Doesn't that need to be
> case to avoid random "unable to map dynamic shared memory segment" and
> "dsa_area could not attach to a segment that has been freed" errors,
> and for the parallel instrumentation shown in EXPLAIN to be reliable?
Oh, hmm.
> Could it be that the leader thought that a worker didn't start up, but
> in fact it did?
Well, I don't know how that could happen, but I can't prove it didn't.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company