Postgres cluster support: advisory locks, LISTEN/NOTIFY, competing projections #31
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Full clustering support using only Postgres. No NATS required.
Components
Single Writer (Distributed)
pg_advisory_xact_lock(hash(stream_id))— one instance per streamNotifications
LISTEN/NOTIFYon event appendeskit_eventschannelCompeting Projections
SELECT ... FOR UPDATE SKIP LOCKEDfor claiming partitionsPartition Strategy
API
Tests
Deferred to post-v1. Deferred: single Postgres instance works fine for v1. Clustering when we scale.
Re-prioritized to CRITICAL. YoYoPass requires clustering for production scalability. Not optional.
Postgres clustering implemented: ClusterStore (read/write pool splitting), PgLockRegistry (advisory locks for distributed single writer), PartitionManager (competing projections with FOR UPDATE SKIP LOCKED, lease-based assignment). All tested on real Postgres.
Postgres clustering: ClusterStore, PgLockRegistry, PartitionManager implemented and tested.