| От | Tom Lane |
|---|---|
| Тема | Re: notify problem |
| Дата | |
| Msg-id | 12203.1062772241@sss.pgh.pa.us обсуждение |
| Ответ на | notify problem (Alessandro GARDICH <gremlin@gremlin.it>) |
| Список | pgsql-general |
Alessandro GARDICH <gremlin@gremlin.it> writes:
> res = PQexec(conn, "LISTEN alert");
> for(i = 0; i < 80 ; ++i) {
> sleep(1);
> PQconsumeInput(conn);
> while ((notify = PQnotifies(conn)) != NULL) {
> fprintf(stderr,"\nGOT NOTIFY!!!\n");
> free(notify);
> }
> fprintf(stderr,".");
> }
> On a console with psql I issue some notify with
> NOTIFY alert; COMMIT;
> but nothing are catched !!!
Hm. Should I guess from the above that you've set autocommit off in
postgresql.conf? If so, your problem is you didn't commit the LISTEN.
Notifications are not sent to clients that are in open transactions.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера