Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fef901

Browse files
committed
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
1 parent90eb170 commit8fef901

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,9 @@ include_dir 'conf.d'
15731573
<para>
15741574
At present, this setting is supported only on Linux and Windows. The
15751575
setting is ignored on other systems when set to
1576-
<literal>try</literal>.
1576+
<literal>try</literal>. On Linux, it is only supported when
1577+
<varname>shared_memory_type</varname> is set to <literal>mmap</literal>
1578+
(the default).
15771579
</para>
15781580

15791581
<para>

‎src/backend/port/sysv_shmem.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,12 @@ PGSharedMemoryCreate(Size size, int port,
649649
errmsg("huge pages not supported on this platform")));
650650
#endif
651651

652+
/* For now, we don't support huge pages in SysV memory */
653+
if (huge_pages==HUGE_PAGES_ON&&shared_memory_type!=SHMEM_TYPE_MMAP)
654+
ereport(ERROR,
655+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
656+
errmsg("huge pages not supported with the current shared_memory_type setting")));
657+
652658
/* Room for a header? */
653659
Assert(size>MAXALIGN(sizeof(PGShmemHeader)));
654660

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp