From: Oliver Jowett <oliver@opencloud.com>
To: Andres Olarte <olarte.andres@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problem with Async (multiple) notifications
Date: Sat, 25 Jun 2005 12:55:02 +1200
Message-ID: <42BCAB66.3050707@opencloud.com> (raw)
In-Reply-To: <3fccaa6905062416392e578f58@mail.gmail.com>
References: <3fccaa6905062416392e578f58@mail.gmail.com>
Andres Olarte wrote:
> I've been playing with async notifications lately, and I've found a
> small problem: when several notifications are issued at once (for
> example within a transaction) normally only one of those gets to the
> client. The rest of the notifications are not received until
> something happens on the connection, for example a query or another
> notification.
Ok, this looks like a bug in some newish code that allows you to do this
at all (previously, you *always* had to issue a query to notice async
notifications). It's checking only for new data available on the
underlying socket, and not our input buffer -- if we read multiple
notifications into our input buffer, consuming all the data at the
socket level, we only process one before returning to the client, and
don't look for any more until more data arrives at the socket level.
I've applied a fix to CVS HEAD (only org/postgresql/core/PGStream.java
affected), can you try that out?
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, olarte.andres@gmail.com
Subject: Re: Problem with Async (multiple) notifications
In-Reply-To: <42BCAB66.3050707@opencloud.com>
References: <3fccaa6905062416392e578f58@mail.gmail.com> <42BCAB66.3050707@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox