postgresql/src/include/storage
Michael Paquier a14354cac0 Add GUC parameter "huge_pages_status"
This is useful to show the allocation state of huge pages when setting
up a server with "huge_pages = try", where allocating huge pages would
be attempted but the server would continue its startup sequence even if
the allocation fails.  The effective status of huge pages is not easily
visible without OS-level tools (or for instance, a lookup at
/proc/N/smaps), and the environments where Postgres runs may not
authorize that.  Like the other GUCs related to huge pages, this works
for Linux and Windows.

This GUC can report as values:
- "on", if huge pages were allocated.
- "off", if huge pages were not allocated.
- "unknown", a special state that could only be seen when using for
example postgres -C because it is only possible to know if the shared
memory allocation worked after we can check for the GUC values, even if
checking a runtime-computed GUC.  This value should never be seen when
querying for the GUC on a running server.  An assertion is added to
check that.

The discussion has also turned around having a new function to grab this
status, but this would have required more tricks for -DEXEC_BACKEND,
something that GUCs already handle.

Noriyoshi Shinoda has initiated the thread that has led to the result of
this commit.

Author: Justin Pryzby
Reviewed-by: Nathan Bossart, Kyotaro Horiguchi, Michael Paquier
Discussion: https://postgr.es/m/TU4PR8401MB1152EBB0D271F827E2E37A01EECC9@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM
2023-07-06 14:42:36 +09:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
barrier.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
block.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
buf.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
buf_internals.h Add writeback to pg_stat_io 2023-05-17 11:18:35 -07:00
buffile.h Add BufFileRead variants with short read and EOF detection 2023-01-16 11:01:31 +01:00
bufmgr.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
bufpage.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
checksum.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
checksum_impl.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
condition_variable.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
copydir.h Constify the arguments of copydir.h functions 2023-01-18 08:55:26 +09:00
dsm.h Avoid type cheats for invalid dsa_handles and dshash_table_handles. 2023-01-25 11:48:38 -05:00
dsm_impl.h Avoid type cheats for invalid dsa_handles and dshash_table_handles. 2023-01-25 11:48:38 -05:00
fd.h Add io_direct setting (developer-only). 2023-04-08 16:35:07 +12:00
fileset.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
freespace.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
fsm_internals.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
indexfsm.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
ipc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
item.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
itemid.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
itemptr.h Consolidate ItemPointer to Datum conversion functions 2023-02-13 09:57:15 +01:00
large_object.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
latch.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
lmgr.h Perform apply of large transactions by parallel workers. 2023-01-09 07:52:45 +05:30
lock.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
lockdefs.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
lwlock.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
md.h Add smgrzeroextend(), FileZero(), FileFallocate() 2023-04-05 10:06:39 -07:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
off.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_sema.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_shmem.h Add GUC parameter "huge_pages_status" 2023-07-06 14:42:36 +09:00
pmsignal.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
predicate.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
predicate_internals.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
proc.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
procarray.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
proclist.h Constify proclist.h 2023-01-19 09:45:34 +01:00
proclist_types.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
procsignal.h Handle logical slot conflicts on standby 2023-04-08 00:05:44 -07:00
reinit.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
relfilelocator.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
s_lock.h Fix some typos and some incorrectly duplicated words 2023-04-18 14:03:49 +12:00
sharedfileset.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
shm_mq.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
shm_toc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
shmem.h Remove SHM_QUEUE 2023-01-19 18:55:51 -08:00
sinval.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
sinvaladt.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
smgr.h Remove bogus #include added by d4e71df6d7. 2023-04-26 10:43:53 +12:00
spin.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
standby.h Remove vacuum_defer_cleanup_age 2023-04-24 12:21:02 -07:00
standbydefs.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
sync.h Update copyright for 2023 2023-01-02 15:00:37 -05:00