aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/transam/parallel.c7
-rw-r--r--src/backend/optimizer/plan/planner.c4
-rw-r--r--src/backend/storage/ipc/dsm.c15
-rw-r--r--src/backend/storage/ipc/dsm_impl.c3
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample1
5 files changed, 1 insertions, 29 deletions
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c
index 1d631b72755..4e32cfff500 100644
--- a/src/backend/access/transam/parallel.c
+++ b/src/backend/access/transam/parallel.c
@@ -162,13 +162,6 @@ CreateParallelContext(const char *library_name, const char *function_name,
Assert(nworkers >= 0);
/*
- * If dynamic shared memory is not available, we won't be able to use
- * background workers.
- */
- if (dynamic_shared_memory_type == DSM_IMPL_NONE)
- nworkers = 0;
-
- /*
* If we are running under serializable isolation, we can't use parallel
* workers, at least not until somebody enhances that mechanism to be
* parallel-aware. Utility statement callers may ask us to ignore this
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index fd45c9767df..eeebf775a40 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -335,7 +335,6 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
*/
if ((cursorOptions & CURSOR_OPT_PARALLEL_OK) != 0 &&
IsUnderPostmaster &&
- dynamic_shared_memory_type != DSM_IMPL_NONE &&
parse->commandType == CMD_SELECT &&
!parse->hasModifyingCTE &&
max_parallel_workers_per_gather > 0 &&
@@ -6050,8 +6049,7 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
double allvisfrac;
/* Return immediately when parallelism disabled */
- if (dynamic_shared_memory_type == DSM_IMPL_NONE ||
- max_parallel_maintenance_workers == 0)
+ if (max_parallel_maintenance_workers == 0)
return 0;
/* Set up largely-dummy planner state */
diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c
index f1f75b73f50..9629f22f7af 100644
--- a/src/backend/storage/ipc/dsm.c
+++ b/src/backend/storage/ipc/dsm.c
@@ -150,10 +150,6 @@ dsm_postmaster_startup(PGShmemHeader *shim)
Assert(!IsUnderPostmaster);
- /* If dynamic shared memory is disabled, there's nothing to do. */
- if (dynamic_shared_memory_type == DSM_IMPL_NONE)
- return;
-
/*
* If we're using the mmap implementations, clean up any leftovers.
* Cleanup isn't needed on Windows, and happens earlier in startup for
@@ -219,10 +215,6 @@ dsm_cleanup_using_control_segment(dsm_handle old_control_handle)
uint32 i;
dsm_control_header *old_control;
- /* If dynamic shared memory is disabled, there's nothing to do. */
- if (dynamic_shared_memory_type == DSM_IMPL_NONE)
- return;
-
/*
* Try to attach the segment. If this fails, it probably just means that
* the operating system has been rebooted and the segment no longer
@@ -391,13 +383,6 @@ dsm_postmaster_shutdown(int code, Datum arg)
static void
dsm_backend_startup(void)
{
- /* If dynamic shared memory is disabled, reject this. */
- if (dynamic_shared_memory_type == DSM_IMPL_NONE)
- ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("dynamic shared memory is disabled"),
- errhint("Set dynamic_shared_memory_type to a value other than \"none\".")));
-
#ifdef EXEC_BACKEND
{
void *control_address = NULL;
diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c
index c6382ec031b..77e1bab54be 100644
--- a/src/backend/storage/ipc/dsm_impl.c
+++ b/src/backend/storage/ipc/dsm_impl.c
@@ -106,7 +106,6 @@ const struct config_enum_entry dynamic_shared_memory_options[] = {
#ifdef USE_DSM_MMAP
{"mmap", DSM_IMPL_MMAP, false},
#endif
- {"none", DSM_IMPL_NONE, false},
{NULL, 0, false}
};
@@ -210,8 +209,6 @@ dsm_impl_can_resize(void)
{
switch (dynamic_shared_memory_type)
{
- case DSM_IMPL_NONE:
- return false;
case DSM_IMPL_POSIX:
return true;
case DSM_IMPL_SYSV:
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 9e39baf4668..657c3f81f8f 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -133,7 +133,6 @@
# sysv
# windows
# mmap
- # use none to disable dynamic shared memory
# (change requires restart)
# - Disk -