docs: the pg LISTEN identifier-truncation wake-collision note (review 004 item 13)
deployment.md's Postgres co-tenancy paragraph and engine-postgres.md's connection-architecture wake-substrate section now carry the 63-byte identifier-truncation collision note as dated annotations: two names longer than 63 bytes sharing a 63-byte prefix silently register the same server-side wake channel; pg_notify (the parameter path, untrun- cated, rejecting >= 64-byte channels) is unaffected, so the collapse is on the registration side. Mitigation: keep mechanism names at most 63 bytes (byte count). The naming contract's deliberate no-cap verdict is untouched. Discharges review 004 'findings recorded, not fixed' item 13 (task docs-pg-identifier-truncation-note).
This commit is contained in:
1 parent
f2f5e03d7c
commit
6a6ffd68de
3 files changed
+82
-9
No files matched your search
@@ -1,6 +1,9 @@
|
||||
---
|
||||
status: stable
|
||||
last_updated: "2026-10-10 (review-wave-5 gate: the verification backlog fully discharged in the version-stamped contract suite, green against this engine; spec flipped draft → stable)"
|
||||
last_updated: "2026-10-11 (review 004 item 13's wake-channel
|
||||
identifier-truncation note — the doc-fix disposition — added to the
|
||||
connection-architecture wake-substrate section).
|
||||
Earlier, 2026-10-10 (review-wave-5 gate: the verification backlog fully discharged in the version-stamped contract suite, green against this engine; spec flipped draft → stable)"
|
||||
---
|
||||
|
||||
# Postgres engine
|
||||
@@ -60,6 +63,26 @@ obligations live in the core spec.
|
||||
broadcast re-subscribe (no server round-trips); per-channel
|
||||
connections are never warranted at this scale (POC-verified).
|
||||
|
||||
One wake-channel naming hazard, noted per the review 004 item 13
|
||||
disposition *(annotated 2026-10-11)*: the forwarder's
|
||||
`LISTEN`/`UNLISTEN` carry the channel as a quoted SQL identifier
|
||||
(`quote_ident` — the POC's quoting shape), and PostgreSQL truncates
|
||||
identifiers to 63 bytes
|
||||
(`NAMEDATALEN` − 1) server-side — with only a `NOTICE`, never an
|
||||
error — so two distinct names longer than 63 bytes sharing a
|
||||
63-byte prefix register the same server-side wake channel, silently.
|
||||
The `pg_notify` path is unaffected by the truncation — it carries
|
||||
the channel as a text parameter, not an identifier (channels of 64
|
||||
bytes or more are rejected there server-side) — so the collapse is
|
||||
on the registration side, not the send side. Names are unbounded by
|
||||
the contract's naming rules (deliberate; [ADR-008](decisions/008-contract-v1-pinning.md)
|
||||
§4), nothing engine-side warns, and the machinery itself is
|
||||
name-length agnostic (63 bytes is a server-side limit, not an
|
||||
engine check). Mitigation is a consumer obligation: keep channel
|
||||
names under the PostgreSQL identifier limit (at most 63 bytes; the
|
||||
limit counts bytes, not characters) — the operator-facing statement
|
||||
lives in the [deployment matrix](deployment.md).
|
||||
|
||||
## Mapping the contract
|
||||
|
||||
| Contract piece | Engine realization |
|
||||
|
||||
Reference in new issue
Block a user