mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Remove dynamic_shared_memory_type=none
PostgreSQL nowadays offers some kind of dynamic shared memory feature on all supported platforms. Having the choice of "none" prevents us from relying on DSM in core features. So this patch removes the choice of "none". Author: Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
This commit is contained in:
@ -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;
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user