Hi, Over [1] Peter mentioned that PG_MMAP_FLAGS is not used for portability even though it's placed in portability/mem.h. That might have been the intention when it was added in b0fc0df9364d2d2d17c0162cf3b8b59f6cb09f67. But history does not show it being used that way at any point in time. Per suggestion removing that macro and instead using the flags directly in CreateAnonymousSegment() which is the only place where it's used.
PFA patch for the same. -- Best Wishes, Ashutosh Bapat
From 8558a47360a31f9d9b10133702b40b1398bdce99 Mon Sep 17 00:00:00 2001 From: Ashutosh Bapat <[email protected]> Date: Mon, 12 Jan 2026 14:34:01 +0530 Subject: [PATCH v20260112] Fix PGShmemType and HugePagesType typedefs The automatic process for collecting typedefs in the buildfarm only picks up typedef names that are used to declare objects (variables, struct fields, function parameters or results). The typedef names mentioned in the subject are not referenced at all, anywhere. Hence they are not picked up by the buildfarm process causing their declarations to be wrongly indented. This commit changes them to plain enums thus avoiding the wrong indentation. Author: Ashutosh Bapat <[email protected]> Fix suggested by: Tom Lane <[email protected]> --- src/include/storage/pg_shmem.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h index 3aeada554b2..b1803278542 100644 --- a/src/include/storage/pg_shmem.h +++ b/src/include/storage/pg_shmem.h @@ -48,21 +48,21 @@ extern PGDLLIMPORT int huge_page_size; extern PGDLLIMPORT int huge_pages_status; /* Possible values for huge_pages and huge_pages_status */ -typedef enum +enum HugePagesType { HUGE_PAGES_OFF, HUGE_PAGES_ON, HUGE_PAGES_TRY, /* only for huge_pages */ HUGE_PAGES_UNKNOWN, /* only for huge_pages_status */ -} HugePagesType; +}; /* Possible values for shared_memory_type */ -typedef enum +enum PGShmemType { SHMEM_TYPE_WINDOWS, SHMEM_TYPE_SYSV, SHMEM_TYPE_MMAP, -} PGShmemType; +}; #ifndef WIN32 extern PGDLLIMPORT unsigned long UsedShmemSegID; base-commit: 707f905399b4e47c295fe247f76fbbe53c737984 -- 2.34.1
