From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alessandro GARDICH <gremlin(at)gremlin(dot)it> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: notify problem |
Date: | 2003-09-05 14:30:41 |
Message-ID: | 12203.1062772241@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alessandro GARDICH <gremlin(at)gremlin(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-09-05 14:36:35 | Re: Optimizer picks an ineffient plan |
Previous Message | Ron Johnson | 2003-09-05 14:17:03 | Re: Replaceing records |