Thread: pgsql: Teach on_exit_reset() to discard pending cleanups for dsm.

pgsql: Teach on_exit_reset() to discard pending cleanups for dsm.

From
Robert Haas
Date:
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cb9a0c7987466b130fbced01ab5d5481cf3a16df

Modified Files
--------------
src/backend/storage/ipc/dsm.c |   31 +++++++++++++++++++++++++++++++
src/backend/storage/ipc/ipc.c |    1 +
src/include/storage/dsm.h     |    1 +
3 files changed, 33 insertions(+)