Re: notify problem

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Replaceing records
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Optimizer picks an ineffient plan