aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/port/sysv_shmem.c14
-rw-r--r--src/backend/port/win32_shmem.c4
-rw-r--r--src/backend/utils/misc/guc.c30
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
-rw-r--r--src/include/storage/pg_shmem.h12
5 files changed, 31 insertions, 31 deletions
diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c
index 65ad59570cb..51c1a2b71f8 100644
--- a/src/backend/port/sysv_shmem.c
+++ b/src/backend/port/sysv_shmem.c
@@ -333,12 +333,12 @@ CreateAnonymousSegment(Size *size)
int mmap_errno = 0;
#ifndef MAP_HUGETLB
- if (huge_tlb_pages == HUGE_TLB_ON)
+ if (huge_pages == HUGE_PAGES_ON)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("huge TLB pages not supported on this platform")));
#else
- if (huge_tlb_pages == HUGE_TLB_ON || huge_tlb_pages == HUGE_TLB_TRY)
+ if (huge_pages == HUGE_PAGES_ON || huge_pages == HUGE_PAGES_TRY)
{
/*
* Round up the request size to a suitable large value.
@@ -364,13 +364,13 @@ CreateAnonymousSegment(Size *size)
ptr = mmap(NULL, allocsize, PROT_READ | PROT_WRITE,
PG_MMAP_FLAGS | MAP_HUGETLB, -1, 0);
mmap_errno = errno;
- if (huge_tlb_pages == HUGE_TLB_TRY && ptr == MAP_FAILED)
+ if (huge_pages == HUGE_PAGES_TRY && ptr == MAP_FAILED)
elog(DEBUG1, "mmap with MAP_HUGETLB failed, huge pages disabled: %m");
}
#endif
- if (huge_tlb_pages == HUGE_TLB_OFF ||
- (huge_tlb_pages == HUGE_TLB_TRY && ptr == MAP_FAILED))
+ if (huge_pages == HUGE_PAGES_OFF ||
+ (huge_pages == HUGE_PAGES_TRY && ptr == MAP_FAILED))
{
/*
* use the original size, not the rounded up value, when falling
@@ -431,10 +431,10 @@ PGSharedMemoryCreate(Size size, bool makePrivate, int port)
Size sysvsize;
#if defined(EXEC_BACKEND) || !defined(MAP_HUGETLB)
- if (huge_tlb_pages == HUGE_TLB_ON)
+ if (huge_pages == HUGE_PAGES_ON)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("huge TLB pages not supported on this platform")));
+ errmsg("huge pages not supported on this platform")));
#endif
/* Room for a header? */
diff --git a/src/backend/port/win32_shmem.c b/src/backend/port/win32_shmem.c
index 9b0cceb5309..dca371cce62 100644
--- a/src/backend/port/win32_shmem.c
+++ b/src/backend/port/win32_shmem.c
@@ -128,10 +128,10 @@ PGSharedMemoryCreate(Size size, bool makePrivate, int port)
DWORD size_high;
DWORD size_low;
- if (huge_tlb_pages == HUGE_TLB_ON)
+ if (huge_pages == HUGE_PAGES_ON)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("huge TLB pages not supported on this platform")));
+ errmsg("huge pages not supported on this platform")));
/* Room for a header? */
Assert(size > MAXALIGN(sizeof(PGShmemHeader)));
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index b27cb89a289..c76edb48a9b 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -393,16 +393,16 @@ static const struct config_enum_entry synchronous_commit_options[] = {
* Although only "on", "off", "try" are documented, we accept all the likely
* variants of "on" and "off".
*/
-static const struct config_enum_entry huge_tlb_options[] = {
- {"off", HUGE_TLB_OFF, false},
- {"on", HUGE_TLB_ON, false},
- {"try", HUGE_TLB_TRY, false},
- {"true", HUGE_TLB_ON, true},
- {"false", HUGE_TLB_OFF, true},
- {"yes", HUGE_TLB_ON, true},
- {"no", HUGE_TLB_OFF, true},
- {"1", HUGE_TLB_ON, true},
- {"0", HUGE_TLB_OFF, true},
+static const struct config_enum_entry huge_pages_options[] = {
+ {"off", HUGE_PAGES_OFF, false},
+ {"on", HUGE_PAGES_ON, false},
+ {"try", HUGE_PAGES_TRY, false},
+ {"true", HUGE_PAGES_ON, true},
+ {"false", HUGE_PAGES_OFF, true},
+ {"yes", HUGE_PAGES_ON, true},
+ {"no", HUGE_PAGES_OFF, true},
+ {"1", HUGE_PAGES_ON, true},
+ {"0", HUGE_PAGES_OFF, true},
{NULL, 0, false}
};
@@ -470,7 +470,7 @@ int tcp_keepalives_count;
* This really belongs in pg_shmem.c, but is defined here so that it doesn't
* need to be duplicated in all the different implementations of pg_shmem.c.
*/
-int huge_tlb_pages;
+int huge_pages;
/*
* These variables are all dummies that don't do anything, except in some
@@ -3497,12 +3497,12 @@ static struct config_enum ConfigureNamesEnum[] =
},
{
- {"huge_tlb_pages", PGC_POSTMASTER, RESOURCES_MEM,
- gettext_noop("Use of huge TLB pages on Linux"),
+ {"huge_pages", PGC_POSTMASTER, RESOURCES_MEM,
+ gettext_noop("Use of huge pages on Linux"),
NULL
},
- &huge_tlb_pages,
- HUGE_TLB_TRY, huge_tlb_options,
+ &huge_pages,
+ HUGE_PAGES_TRY, huge_pages_options,
NULL, NULL, NULL
},
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index ce56059ceb2..3629a52c9fe 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -115,7 +115,7 @@
#shared_buffers = 32MB # min 128kB
# (change requires restart)
-#huge_tlb_pages = try # on, off, or try
+#huge_pages = try # on, off, or try
# (change requires restart)
#temp_buffers = 8MB # min 800kB
#max_prepared_transactions = 0 # zero disables the feature
diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h
index 0d607298fbd..0dc960b597f 100644
--- a/src/include/storage/pg_shmem.h
+++ b/src/include/storage/pg_shmem.h
@@ -39,15 +39,15 @@ typedef struct PGShmemHeader /* standard header for all Postgres shmem */
} PGShmemHeader;
/* GUC variable */
-extern int huge_tlb_pages;
+extern int huge_pages;
-/* Possible values for huge_tlb_pages */
+/* Possible values for huge_pages */
typedef enum
{
- HUGE_TLB_OFF,
- HUGE_TLB_ON,
- HUGE_TLB_TRY
-} HugeTlbType;
+ HUGE_PAGES_OFF,
+ HUGE_PAGES_ON,
+ HUGE_PAGES_TRY
+} HugePagesType;
#ifndef WIN32
extern unsigned long UsedShmemSegID;