Re: [BUGS] BUG #1347: Bulk Import stopps after a while (

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Markus Schaber <schabios(at)logi-track(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #1347: Bulk Import stopps after a while (
Date: 2004-12-14 21:04:20
Message-ID: 41BF5554.4040309@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

Markus Schaber wrote:
> Hi, Oliver,
>
> On Tue, 14 Dec 2004 09:58:16 +1300
> Oliver Jowett <oliver(at)opencloud(dot)com> wrote:
>
>
>>Also, it's never going to be 100% without a separate thread, as the
>>server can spontaneously generate output (e.g. because of NOTIFY)
>>regardless of how careful we are with our queries.

I think my analysis here was wrong. It doesn't matter if the server
unexpectedly fills up its output pipe so long as the driver doesn't do
the same.

> Sadly, we cannot abandon compatibility with older JDK releases, this
> would allow us to use the new asynchroneous I/O interfaces.

Hm, is async I/O standardized yet? I thought JSR203 ("more NIO") covered
this, but it's still in the early stages according to jcp.org.

> Async I/O is a great tool when in the right hands, you might google for
> Felix von Leitner and his "fnord" and "gatling" servers that even beat
> the kernel based khttpd.

Current NIO isn't async I/O, but it's still fairly good (use at least
1.4.2_06, though, or you can have GC problems when collecting direct
buffers). We have written several resource adaptors that use it and they
perform well. The main win is that you don't need N threads for N
clients. That can't really be applied to the JDBC driver easily as the
API means that the client controls most of the threading, but the
ability to get at non-blocking primitives would still be useful.

I wonder if we can have some threads-or-NIO abstraction .. the main
thing we need is the ability to call out to some other code to do reads
either when we discover our writes will block (NIO) or when we have data
ready to read (threads). We then read and process messages until we
would block (NIO) or we *do* block (threads).

I doubt I'll have time to look at this in the near future though.

-O

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Simon Riggs 2004-12-14 22:05:36 Checkpoints occur too frequently
Previous Message Markus Schaber 2004-12-14 14:06:58 Re: [BUGS] BUG #1347: Bulk Import stopps after a while (

Browse pgsql-jdbc by date

  From Date Subject
Next Message Xavier Poinsard 2004-12-15 18:38:00 Updated french translation
Previous Message Csaba Nagy 2004-12-14 15:16:58 Re: query not working with JDBC driver