Pushy Postgres and Python
summary
Shows how Postgres’ built‑in LISTEN/NOTIFY plus triggers sends payloads (≤8,000 bytes) into worker processes, with Python using psycopg2 AUTOCOMMIT and select.select to block for notifications. Demonstrates a job‑queue: inserts fire triggers that notify a worker farm, which processes millions of jobs in production without hiccup. Notes transaction semantics (notifications only emit on commit, within‑transaction notifications are O(n^2)) and a limitation: notifications are dropped if no listener is present.
AI-written summary · about
chapters (8)
- 0:00Start
- 4:59DEMAND DB
- 6:09UBIQUITOUS CONNECTIVIT
- 11:57DJANGO
- 13:21TRADEOFFS
- 15:07POSTGRESQU NOTIFY/LIST
- 19:57TRANSACTIO INTERACTION
- 23:26USE CASE
related talks
30mCall me back, Postgres
23mRethinking Message Queues: PostgreSQL's Role
26mLISTEN Carefully: How NOTIFY Can Trip Up Your Database
30mQueues in PostgreSQL
23mPostgres as a Message Broker
26mSkip the Queue! Event-Driven Apps for Everyone with Postgres!
48mUsing Asynchronous Message Queues with PostgreSQL
15m"Stress Less: Easy Database Load Testing Using Python and Locust"
