On Wed, Nov 18, 2015 at 10:41 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> I think whats going on here is that when any of the session doesn't
> get any workers, we shutdown the Gather node which internally destroys
> the dynamic shared memory segment as well. However the same is
> needed as per current design for doing scan by master backend as
> well. So I think the fix would be to just do shutdown of workers which
> actually won't do anything in this scenario.
It seems silly to call ExecGatherShutdownWorkers() here when that's
going to be a no-op. I think we should just remove that line and the
if statement before it altogether and replace it with a comment
explaining why we can't nuke the DSM at this stage.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company