Image missing.
System View for Inspecting DSM Registry Allocations in PostgreSQL

fforflo

created: July 24, 2025, 11:20 a.m. | updated: July 24, 2025, 1:55 p.m.

The dynamic shared memory (DSM) registry (introduced in 8b2bcf3) is a convenient way for PostgreSQL extensions (and core components) to allocate dynamic shared memory and associate it with a string name. These simplify allocating Dynamic Shared Areas (DSA) and dynamic shared hash tables (dshash) within the DSM registry itself. Personally, I’ve been (ab)using the DSM registry quite a lot because I find it incredibly powerful. With these facilities, you can design really sophisticated interactions, leveraging PostgreSQL’s shared memory to store arbitrary metadata across backends. It exposes shared memory allocations tracked in the DSM registry, including memory allocated by extensions using the mechanisms described here.

1 week, 4 days ago: Hacker News: Front Page