Volter World

T10: why the catalog PostgreSQL server uses EXEC_BACKEND

Reading dated 2026-10-13, against browser-substrate e329f2937e699cea48a5395ad15b7487571d51cd. The recipe remains unchanged: EXEC_BACKEND with SYS_spawn_vm addresses a current memory mechanism limit.

The choice is explicit in programs/postgres/17.9/build.sh:84: CPPFLAGS includes -DEXEC_BACKEND. It was introduced by recipe commit 35dcba65, rather than selected by PostgreSQL's default configure behavior. The recipe's 0001-exec-backend-spawn-vm.patch replaces the Wasm build's internal_forkexec launch with SYS_spawn_vm. Each backend therefore starts as a new, separately based instance in the postmaster's memory, with its own C globals and the same live shared segment.

ADR-0132 records the reason. Ordinary fork preserves shared mappings through ADR-0125's memory group: one guest execution token, with the outgoing and incoming members' private images copied at each handover. SYS_spawn_vm avoids those handovers for PostgreSQL's concurrent backends.

That behavior remains in the inspected implementation:

Basic fork admission and SysV inheritance are implemented. The current recipe already lists wali.SYS_fork in its Asyncify imports. A fast initial fork snapshot does not remove the subsequent memory-group handovers.

The ceiling is separate private C memory and live shared regions for concurrent fork descendants. These Wasm32 programs address one linear memory with absolute C pointers; separate WebAssembly.Memory objects cannot alias just the shared range. Putting both private images in the same memory would also require preserving their existing pointer addresses. ADR-0125's constraint names that limitation. It could be lifted by a toolchain/runtime that lowers C pointers across private and shared memories, for example keeping each process's C heap and stack in its own memory while accessing a separate shared memory, or by genuine shared-page aliasing between independent memories. Enabling a multi-memory feature alone would not implement that pointer model.

T10 therefore retains the existing recipe. The postmaster's executable version self-check and fresh-image launch costs belong to T5's exec path. This reading makes no new timing, build, query or application claim; no tests or program executions were run.

View Markdown source