mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Add flags argument to dsm_create.
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.
This commit is contained in:
@ -125,7 +125,7 @@ setup_dynamic_shared_memory(int64 queue_size, int nworkers,
|
||||
segsize = shm_toc_estimate(&e);
|
||||
|
||||
/* Create the shared memory segment and establish a table of contents. */
|
||||
seg = dsm_create(shm_toc_estimate(&e));
|
||||
seg = dsm_create(shm_toc_estimate(&e), 0);
|
||||
toc = shm_toc_create(PG_TEST_SHM_MQ_MAGIC, dsm_segment_address(seg),
|
||||
segsize);
|
||||
|
||||
|
Reference in New Issue
Block a user