Teach on_exit_reset() to discard pending cleanups for dsm.

Robert Haas <rhaas@postgresql.org>

Commit: cb9a0c7987466b130fbced01ab5d5481cf3a16df
Author: Robert Haas <rhaas@postgresql.org>
Date: 2014-03-10T14:17:19Z
Releases: 9.4.0
Teach on_exit_reset() to discard pending cleanups for dsm.

If a postmaster child invokes fork() and then calls on_exit_reset, that
should be sufficient to let it exit() without breaking anything, but
dynamic shared memory broke that by not updating on_exit_reset() to
discard callbacks registered with dynamic shared memory segments.

Per investigation of a complaint from Tom Lane.

Files

PathChange+/−
src/backend/storage/ipc/dsm.c modified +31 −0
src/backend/storage/ipc/ipc.c modified +1 −0
src/include/storage/dsm.h modified +1 −0