Re: Problem with Async (multiple) notifications
От | Tom Lane |
---|---|
Тема | Re: Problem with Async (multiple) notifications |
Дата | |
Msg-id | 17989.1119672865@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Problem with Async (multiple) notifications (Andres Olarte <olarte.andres@gmail.com>) |
Ответы |
Re: Problem with Async (multiple) notifications
|
Список | pgsql-jdbc |
Andres Olarte <olarte.andres@gmail.com> writes: > I've been playing with async notifications lately, and I've found a > small problem: when several notifications are issued at once (for > example within a transaction) normally only one of those gets to the > client. The documentation: http://www.postgresql.org/docs/8.0/static/sql-notify.html quoth: > NOTIFY behaves like Unix signals in one important respect: if the same > notification name is signaled multiple times in quick succession, > recipients may get only one notification event for several executions of > NOTIFY. So it is a bad idea to depend on the number of notifications > received. Instead, use NOTIFY to wake up applications that need to pay > attention to something, and use a database object (such as a sequence) > to keep track of what happened or how many times it happened. Are you sure you are following this advice? (In particular, I can absolutely positively guarantee that N NOTIFYs executed within a single transaction have the same effect as one NOTIFY. This is not a bug, it is the design intention.) regards, tom lane
В списке pgsql-jdbc по дате отправления: