mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Reject huge_pages=on if shared_memory_type=sysv.
It doesn't work (it could, but hasn't been implemented). Back-patch to 12, where shared_memory_type arrived. Reported-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/163271880203.22789.1125998876173795966@wrigleys.postgresql.org
This commit is contained in:
@ -703,6 +703,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)));
|
||||
|
||||
|
Reference in New Issue
Block a user