3 ms·
> LISTEN/NOTIFY doesn't work through connection pooling What's the problem with using it with connection pooling?
by ulrikrasmussen 2y ago
> LISTEN/NOTIFY doesn't work through connection pooling
What's the problem with using it with connection pooling?
- jeeybee 2y agoasyncpg clears out any listeners you have setup once a connection is returned to pool. This will lead to 'missed' events. I guess its something of the same story with psycopg? If event(s) any jobs will be picked up by the next event or by a timer that checks every 30 seconds or so (can be set by the dev.)
- jashmatthews 2y agoBest to just forget about it and listen on a connection not using pooling. https://jpcamara.com/2023/04/12/pgbouncer-is-useful.html#listen-notify https://jpcamara.com/2023/04/12/pgbouncer-is-useful.html#lis...