Re: problem with notify/listen

From: Bruce Momjian <pgman(at)candle(dot)pha(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-25 01:52:38
Message-ID: 200201250152.g0P1qcQ01758@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I assume this item is still open. I put it in the 7.3 queue:

http://candle.pha.pa.us/cgi-bin/pgpatches2

---------------------------------------------------------------------------

Barry Lind wrote:
> I have just been looking into a bug report against the jdbc driver and I
> found the following behavior that I can't explain.
>
> 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.
>
> With autoCommit=false the jdbc driver is sending the following SQL
> commands to the server:
>
> begin
> select 1
> commit;begin;
> select 1
> commit;begin;
> select 1
> ...
>
> My test code is using the select statement as a means to poll for the
> notifications. 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.
>
> With autoCommit=true the SQL commands are simply:
>
> select 1
> select 1
> select 1
> ...
>
> In this mode the notifications work correctly.
>
> Is there something I am doing wrong, or is this expected behavior for
> the server?
>
> thanks,
> --Barry
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-01-25 02:08:19 Re: Problem in ResultSet#getTimestamp() of 7.2b4
Previous Message Justin Clift 2002-01-25 01:52:18 Re: PostgreSQL crashes with Qmail-SQL