summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-03-18 07:58:53 -0400
committerRobert Haas <rhaas@postgresql.org>2014-03-18 07:58:53 -0400
commit79a4d24f31e09eb3c421deb34829eee0bf6acd67 (patch)
tree8b0bba2d25d63961f2c4ac287034347372d6e7de /src/include
parent551fb5ac742eb7dbf92aa80743aa5a52b8a0189f (diff)
Make it easy to detach completely from shared memory.
The new function dsm_detach_all() can be used either by postmaster children that don't wish to take any risk of accidentally corrupting shared memory; or by forked children of regular backends with the same need. This patch also updates the postmaster children that already do PGSharedMemoryDetach() to do dsm_detach_all() as well. Per discussion with Tom Lane.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/dsm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/storage/dsm.h b/src/include/storage/dsm.h
index 03dd7679ffd..e4669a1e3c1 100644
--- a/src/include/storage/dsm.h
+++ b/src/include/storage/dsm.h
@@ -20,6 +20,7 @@ typedef struct dsm_segment dsm_segment;
/* Startup and shutdown functions. */
extern void dsm_postmaster_startup(void);
extern void dsm_backend_shutdown(void);
+extern void dsm_detach_all(void);
/* Functions that create, update, or remove mappings. */
extern dsm_segment *dsm_create(Size size);