PostgresNotifier: LISTEN/NOTIFY for real-time event delivery #6

Closed
opened 2026-02-19 21:28:02 +00:00 by ash · 4 comments
Owner

What

Implement StoreNotifier for Postgres using LISTEN/NOTIFY.

Design

  • After event append, fire NOTIFY on a channel with the sequence number
  • PostgresNotifier listens and wakes EventSubscription instantly
  • Include SQL trigger for the events table
  • Fallback: periodic polling if LISTEN connection drops

Performance

  • Benchmark notification latency vs pure polling
  • Test under high write load
  • Test connection recovery
## What Implement StoreNotifier for Postgres using LISTEN/NOTIFY. ## Design - After event append, fire NOTIFY on a channel with the sequence number - PostgresNotifier listens and wakes EventSubscription instantly - Include SQL trigger for the events table - Fallback: periodic polling if LISTEN connection drops ## Performance - Benchmark notification latency vs pure polling - Test under high write load - Test connection recovery
Author
Owner

Deferred to post-v1. Deferred: polling fallback works. LISTEN/NOTIFY is latency optimization.

**Deferred to post-v1.** Deferred: polling fallback works. LISTEN/NOTIFY is latency optimization.
Author
Owner

Re-prioritized to CRITICAL. YoYoPass requires clustering for production scalability. Not optional.

**Re-prioritized to CRITICAL.** YoYoPass requires clustering for production scalability. Not optional.
Author
Owner

PostgresNotifier (LISTEN/NOTIFY) implemented and tested: auto-reconnect, multiple listeners, store integration with WithNotifyChannel, NotifyAppend helper. Benchmarked at ~37ms latency over SSH tunnel.

PostgresNotifier (LISTEN/NOTIFY) implemented and tested: auto-reconnect, multiple listeners, store integration with WithNotifyChannel, NotifyAppend helper. Benchmarked at ~37ms latency over SSH tunnel.
ash closed this issue 2026-02-20 08:16:57 +00:00
Author
Owner

PostgresNotifier LISTEN/NOTIFY implemented and tested.

PostgresNotifier LISTEN/NOTIFY implemented and tested.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#6
No description provided.