SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

0450 — rangeState and claimBuffer stay private, not their own packages

Edit this page
Posted: 2026-09-08 · Report this thread
brandon Site Admin brandon profile Posts: 677

Context. The package split raised the question of whether rangeState and claimBuffer, each used by several collaborators, should become packages of their own.

Decision. They stay private inside their owning package. Three things reach into their internals, and a package boundary there would have to export the very atomics whose correctness rests on unexported write ordering.

Consequences. The write-ordering invariant stays enforceable by the compiler — nothing outside the package can touch the atomics out of order. The collaborators live together rather than behind an interface. Rejected: promoting them to packages — the exported surface required would be exactly the unsafe one.