model-writtenrun 6123 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Apr 2025 · 1 entry
- The thread began with Tomas Vondra's announcement that Jakub Wartak's pg_shmem_allocations_numa view had landed, exposing shared-memory totals by NUMA node while requiring potentially expensive page touching and excluding anonymous and dynamic shared memory #1.
Jun - Jul 2025 · 10 entries
- Christoph Berg reported EFAULT failures on Debian's 32-bit architectures and proposed removing page touching and skipping invalid NUMA statuses, questioning whether a monitoring view should force memory allocation #2 #3.
- Andres Freund explained that a backend must touch pages even when another process already populated them, so Christoph retained touching in his revision; Andres then challenged silently discarding errors and suggested investigating bogus addresses or representing unavailable nodes separately #5 #7 #8.
- Tomas Vondra and Bertrand Drouvot narrowed the failure to 32-bit userspace on 64-bit kernels, and Bertrand identified incorrect pointer advancement between 16-page chunks in Linux's do_pages_stat(); Christoph tested a kernel correction and proposed larger PostgreSQL chunks on 64-bit builds plus interrupt checks #17 #18 #20 #24 #25.
- The investigation also exposed Valgrind warnings when NUMA introspection touched unpinned buffers: Andres explained the inaccessible-buffer markings, and Tomas chose suppressions over making the NUMA code understand buffer pinning #21 #23.
- Tomas supplied both broad caller suppressions and a narrower inline-helper alternative, while Bertrand requested Addr4 coverage and Christoph proposed using the inline helper in ordinary builds too #29 #32 #34.
- Bertrand supplied the attached 32-bit chunking workaround, replacing the earlier error-skipping approach; although Jakub questioned the usefulness of 32-bit NUMA support, Tomas pointed to Raspberry Pi configurations as useful test systems and retained support #30 #33 #36.
- Tomas combined the work into three patches for chunking, targeted Valgrind suppression, and interrupt checks, reporting successful performance and page-touching tests; Bertrand approved the approach and caught a helper change assigned to the wrong patch, which Tomas corrected while refining comments and terminology #42 #43 #44.
- The chunking component of #44 landed with unchanged code as 7fe2f67c7c, crediting Christoph and Bertrand as authors and adding the kernel-report link requested by Bertrand #45 #46.
- The Valgrind and interrupt components of #44 landed with unchanged code as 81f287dc92 and bf1119d74a, with the interrupt commit message updated to identify the chunking prerequisite; all three fixes were backpatched to PostgreSQL 18 #46.
- Christoph later reported that the kernel correction had reached Linux 6.16-rc7, and subsequently clarified that Debian's remaining caller-side workaround was unnecessary because PostgreSQL now handled chunking inside pg_numa_query_pages() #47 #49 #50.
Sep 2025 - Feb 2026 · 14 entries
- Christoph Berg reported that older libnuma versions caused Docker regression failures and proposed accepting alternate permission-error outputs, while suggesting that detecting the problem during NUMA availability checks might be better #51.
- After Tomas Vondra questioned whether kernel differences explained the failure, Christoph demonstrated different behavior in containers sharing the same kernel and traced it to older numa_available() implementations failing to recognize EPERM from get_mempolicy() #52 #53 #54 #57.
- Tomas replaced the expected-output workaround with an explicit EPERM check before numa_available(), explaining that accepting errors could hide failures and retaining the library call would preserve future libnuma changes #58.
- Christoph independently posted a replacement that inlined the newer numa_available() implementation and reported passing Docker tests, but subsequently tested Tomas's alternative and confirmed that it worked #59 #60.
- Tomas's patch #58 landed unchanged as 482e98ac43, and he announced its backpatch to PostgreSQL 18; the alternate expected outputs and inline library replacement were not used #61.
- Christoph reopened the investigation after intermittent invalid NUMA node -2 errors appeared in ordinary chroot builds, then reproduced the problem under load and suggested that swapped-out pages might require NULL node values #62 #64 #65.
- Tomas observed inconsistent results between the two NUMA views, checked that page-touching logic existed, and eventually reproduced recurring -2 statuses under memory pressure with swap enabled, identifying a race between touching pages and querying their location #67 #69 #70.
- Christoph suggested relaxing the tests, and Jakub Wartak proposed restricting them to huge pages, but Tomas argued that production queries also needed to handle ENOENT; Jakub then discussed either omitting swapped pages or exposing their sizes explicitly #71 #72 #73 #74.
- Tomas posted a separate fix representing unavailable nodes as NULL in both views and accounting for their sizes in pg_shmem_allocations_numa, explaining that existing count-based tests needed no changes and asking whether documentation should describe NULL nodes #75.
- Christoph supplied documentation wording and a typo correction, while Jakub reproduced the unpatched failure and verified that the patch returned NULL-node totals successfully #76 #77.
- The ENOENT fix from #75 landed with equivalent code adapted to the target base as 9796c4f560, and Tomas announced that it too was backpatched to PostgreSQL 18 #78.
- The permission and ENOENT fixes had landed, although the supplied changes did not add the discussed NULL-node documentation; a subsequent question about adding 09c37015d4 to .git-blame-ignore-revs received no answer in the supplied thread #75 #76 #79.
- Heikki Linnakangas discovered that the interrupt checks introduced by bf1119d74a prevented frontend programs from linking pg_numa_query_pages(), and posted a FRONTEND guard even though no frontend currently called the function #80.
- Álvaro Herrera approved the frontend fix and Bertrand also endorsed it; Heikki committed #80 unchanged as d7edcec35c, backpatched it to PostgreSQL 18, and confirmed the push in the last message, leaving no posted functional fix awaiting review #81 #82 #83.