=== Applying patches on top of PostgreSQL commit ID 51da766494dcc84b6f8d793ecaa064363a9243c2 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Nov 22 03:22:21 UTC 2025 On branch cf/6171 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-Make-pg_numa_init-cope-with-Docker.patch === Applying: Make pg_numa_init() cope with Docker Using index info to reconstruct a base tree... M src/port/pg_numa.c Falling back to patching base and 3-way merge... Auto-merging src/port/pg_numa.c CONFLICT (content): Merge conflict in src/port/pg_numa.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Make pg_numa_init() cope with Docker When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Unstaged changes after reset: M src/port/pg_numa.c === using patch(1) to apply patch ./v2-0001-Make-pg_numa_init-cope-with-Docker.patch === patching file src/port/pg_numa.c Hunk #1 FAILED at 43. 1 out of 1 hunk FAILED -- saving rejects to file src/port/pg_numa.c.rej Removing src/port/pg_numa.c.rej === using 'git apply' to apply patch ./v2-0001-Make-pg_numa_init-cope-with-Docker.patch === Applied patch to 'src/port/pg_numa.c' with conflicts. U src/port/pg_numa.c diff --cc src/port/pg_numa.c index 540ada3f8ef,932099be1e5..00000000000 --- a/src/port/pg_numa.c +++ b/src/port/pg_numa.c @@@ -47,19 -54,9 +54,25 @@@ int pg_numa_init(void) { ++<<<<<<< ours + int r; + + /* + * XXX libnuma versions before 2.0.19 don't handle EPERM by disabling + * NUMA, which then leads to unexpected failures later. This affects + * containers that disable get_mempolicy by a seccomp profile. + */ + if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && (errno == EPERM)) + r = -1; + else + r = numa_available(); + + return r; ++======= + if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && (errno == ENOSYS || errno == EPERM)) + return -1; + return 0; ++>>>>>>> theirs } /*