public inbox for [email protected]
help / color / mirror / Atom feedFrom: =?GBK?B?wODR08G8?= <[email protected]>
To: John Wiencek <[email protected]>
Cc: [email protected]
Subject: Re:Re: PostgreSQL14.2 can not start because of huge_page_size is equal to 1048576
Date: Mon, 9 May 2022 23:20:14 +0800 (CST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
Thanks a lot for your reply!
huge_page_size parameter is PG 14 new parameter.
the error is---“DETAIL: huge_page_size must be 0 on this platform”。
my os is rhel linux , in the linux platform , is there no method to change huge_page_size ???
but in the pg14 documents,there is some words about ---“Non-default settings are currently supported only on Linux”。
so ,I do not know which one is correct
[root@localhost ~]# echo 2072 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
[root@localhost ~]# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
2057
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cd $PGDATA
[root@localhost data]# grep huge postgresql.conf
grep: postgresql.conf: No such file or directory
[root@localhost data]# su - pg142
Last login: Mon May 9 22:47:48 CST 2022 on pts/0
[pg142@localhost ~]$ cd $PGDATA
[pg142@localhost data]$ grep huge postgresql.conf
huge_pages = try# on, off, or try
huge_page_size = 2048# zero for system default
[pg142@localhost data]$ hugeadm --pool-list
Size Minimum Current Maximum Default
2097152 2057 2057 2057 ---->>>but non-default hugepagesize is 2048KB
1073741824 3 3 3 * ---->>>default hugepagesize is 1gb
[pg142@localhost data]$ pg_ctl start
waiting for server to start....2022-05-09 15:09:15.023 GMT [1733] LOG: invalid value for parameter "huge_page_size": 2048
2022-05-09 15:09:15.023 GMT [1733] DETAIL: huge_page_size must be 0 on this platform.
2022-05-09 23:09:15.023 CST [1733] FATAL: configuration file "/home/pg142/data/postgresql.conf" contains errors
stopped waiting
pg_ctl: could not start server
Examine the log output.
[pg142@localhost data]$
At 2022-05-09 22:09:20, "John Wiencek" <[email protected]> wrote:
Found this:
https://www.postgresql.org/docs/current/kernel-resources.html#LINUX-HUGE-PAGES
See section: 19.4.5. Linux Huge Pages
"The default behavior for huge pages in PostgreSQL is to use them when possible, with the system's default huge page size, and to fall back to normal pages on failure. To enforce the use of huge pages, you can set huge_pages to on in postgresql.conf. Note that with this setting PostgreSQL will fail to start if not enough huge pages are available.”
On May 9, 2022, at 8:56 AM, 类延良 <[email protected]> wrote:
My rhel 7.9 enabled 1GB hugepagesize,and in this rhel7.9,there is a postgresql 14.2 (from compile installation).
[root@localhost ~]# cat /proc/meminfo |grep -i hugep
AnonHugePages: 8192 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 1048576 kB
[root@localhost ~]# hugeadm --pool-list
Size Minimum Current Maximum Default
1073741824 0 0 0 *
[root@localhost ~]#
after I change pg parameter huge_page_size to 1048576, I can not start PostgreSQL 14.2 . the following is the error,
[pg142@localhost data]$ grep huge postgresql.conf
#huge_pages = try# on, off, or try
huge_page_size = 1048576# zero for system default
[pg142@localhost data]$ pg_ctl start
waiting for server to start....2022-05-09 04:36:58.220 GMT [1719] LOG: invalid value for parameter "huge_page_size": 1048576
2022-05-09 04:36:58.220 GMT [1719] DETAIL: huge_page_size must be 0 on this platform.
2022-05-09 12:36:58.220 CST [1719] FATAL: configuration file "/home/pg142/data/postgresql.conf" contains errors
stopped waiting
pg_ctl: could not start server
Examine the log output.
[pg142@localhost data]$
I want to know why ?
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re:Re: PostgreSQL14.2 can not start because of huge_page_size is equal to 1048576
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox