Add flags argument to dsm_create

Enterprise / PostgreSQL - Robert Haas [postgresql.org] - 19 March 2015 12:03 UTC

Right now, there's only one flag, DSM_CREATE_NULL_IF_MAXSEGMENTS, which suppresses the error that would normally be thrown when the maximum number of segments already exists, instead returning NULL. It might be useful to add more flags in the future, such as one to ignore allocation errors, but I haven't done that here.

12968cf Add flags argument to dsm_create.
src/backend/storage/ipc/dsm.c | 31 +++++++++++++++++++++++++++++--
src/include/storage/dsm.h | 4 +++-
src/test/modules/test_shm_mq/setup.c | 2 +-
3 files changed, 33 insertions(+), 4 deletions(-)

Upstream: git.postgresql.org


  • Share