···9999 gettext,
100100101101 # NUMA
102102- numaSupport ?
103103- lib.versionAtLeast version "18"
104104- && lib.meta.availableOn stdenv.hostPlatform numactl
105105- # NUMA can fail in 18beta2 on some hardware with:
106106- # ERROR: invalid NUMA node id outside of allowed range [0, 0]: 1
107107- # https://github.com/NixOS/nixpkgs/pull/411958#issuecomment-3031680123
108108- # https://www.postgresql.org/message-id/flat/E1u1tr8-003BbN-2E%40gemulon.postgresql.org
109109- && version != "18beta2",
102102+ numaSupport ? lib.versionAtLeast version "18" && lib.meta.availableOn stdenv.hostPlatform numactl,
110103 numactl,
111104112105 # PAM
···432425 substituteInPlace "src/Makefile.global.in" --subst-var out
433426 substituteInPlace "src/common/config_info.c" --subst-var dev
434427 cat ${./pg_config.env.mk} >> src/common/Makefile
428428+429429+ # This test always fails on hardware with >1 NUMA node: the sysfs
430430+ # dirs providing information about the topology are hidden in the sandbox,
431431+ # so postgres assumes there's only a single node `0`. However,
432432+ # the test checks on which NUMA nodes the allocated pages are which is >1
433433+ # on such hardware. This in turn triggers a safeguard in the view
434434+ # which breaks the test.
435435+ # Manual tests confirm that the testcase behaves properly outside of the
436436+ # Nix sandbox.
437437+ substituteInPlace src/test/regress/parallel_schedule \
438438+ --replace-fail numa ""
435439 ''
436440 # This check was introduced upstream to prevent calls to "exit" inside libpq.
437441 # However, this doesn't work reliably with static linking, see this and following: