feat: expose signal wait marker on instances#268
Conversation
|
Thanks for this — the implementation itself is clean (backward-compat probing, terminal-state guards, grant replay, and docs are all solid, and it builds/clippy/fmt cleanly locally). That said, I'd like to hold off on merging until #239 is better specified, because I think the underlying data model is still an open question rather than a code-quality one. The key issue: an instance can be blocked on multiple signals concurrently. Parallel JOIN ( There are also some design tradeoffs worth weighing against the benefit:
I've left a longer write-up in #239 proposing we first decide scalar-single vs. set-of-many, and whether a read-side view/function over Not a criticism of the execution here — just want the spec nailed down before we commit to a schema/write-path change. |
Summary
Closes #239.
This adds a nullable df.instances.blocked_on_signal column so an instance exposes the signal name while it is parked on a SIGNAL node. The existing update-node-status activity now keeps that marker in sync when SIGNAL nodes enter or leave running, recomputing from currently running SIGNAL nodes so overlapping waits do not clear the marker too early.
Terminal instance transitions clear the marker, and df.cancel() clears it atomically with the cancellation update. Fresh-install DDL, the 0.2.3 to 0.2.4 upgrade script, grant/revoke helpers, and security/upgrade notes are updated so runtime-status privileges include the new column. Signal E2E SQL now asserts that the marker is set while waiting and cleared after signal receipt or timeout.
Verification
I could not run cargo check locally because PGRX_HOME is not configured on this host. I also could not run scripts/pgspot-gate.sh because the environment could not fetch pgspot==0.9.2 from PyPI.