Avoid server crash when worker registration fails at execution time.

Robert Haas <rhaas@postgresql.org>

Commit: 6c878a7553680579f287e4659592c0b874fb2377
Author: Robert Haas <rhaas@postgresql.org>
Date: 2015-11-20T18:03:39Z
Releases: 9.6.0
Avoid server crash when worker registration fails at execution time.

The previous coding attempts to destroy the DSM in this case, but
child nodes might have stored data there and still be holding onto
pointers in this case.  So don't do that.

Also, free the reader array instead of leaking it.

Extracted from two different patch versions both by Amit Kapila.

Files

PathChange+/−
src/backend/executor/nodeGather.c modified +3 −1