From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Barry Lind <barry(at)xythos(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: problem with notify/listen |
Date: | 2002-01-15 15:25:51 |
Message-ID: | 24756.1011108351@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Barry Lind <barry(at)xythos(dot)com> writes:
> If I run jdbc with setAutoCommit=true then notifications work as
> expected, however if I run with setAutoCommit=false then notifications
> are not being sent from the backend to the client.
You are aware that notifications are only sent at transaction commit,
right?
> The only thing that is unusual about this is that the
> "commit;begin;" command string is sent to the server as a single query
> to be processed.
Hm. The response to this string (assuming that there's a notify
waiting) would look like
N foo (NOTIFY)
C COMMIT (commit command complete)
C BEGIN (begin command complete)
Z (ready for new query)
(that's from memory, so forgive any minor inaccuracy). I speculate that
either JDBC or your test code is dropping the NOTIFY in this situation.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-01-15 15:32:00 | Re: FATAL 1: Relation 'pg_shadow' does not exist |
Previous Message | Tom Lane | 2002-01-15 15:15:20 | Re: 7.1 vs. 7.2 on AIX 5L |