diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 0c3193bfeb..b5d06b49e2 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1664,7 +1664,9 @@ include_dir 'conf.d' At present, this setting is supported only on Linux and Windows. The setting is ignored on other systems when set to - try. + try. On Linux, it is only supported when + shared_memory_type is set to mmap + (the default). diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 9de96edf6a..35cce89e9c 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -686,6 +686,12 @@ PGSharedMemoryCreate(Size size, errmsg("huge pages not supported on this platform"))); #endif + /* For now, we don't support huge pages in SysV memory */ + if (huge_pages == HUGE_PAGES_ON && shared_memory_type != SHMEM_TYPE_MMAP) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("huge pages not supported with the current shared_memory_type setting"))); + /* Room for a header? */ Assert(size > MAXALIGN(sizeof(PGShmemHeader)));