From: Oliver Jowett <oliver@opencloud.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: setBinaryStream can abandon connection
Date: Mon, 18 Oct 2004 15:02:11 +1300
Message-ID: <41732423.1080407@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0410171635180.16087@leary.csoft.net>
References: <Pine.BSO.4.56.0410170735120.16087@leary.csoft.net>
<4172CCFC.3030503@opencloud.com>
<Pine.BSO.4.56.0410171602050.16087@leary.csoft.net>
<4172E3AC.1040102@opencloud.com>
<Pine.BSO.4.56.0410171635180.16087@leary.csoft.net>
Kris Jurka wrote:
> OK. So we should calculate the total message length using a "long"
> variable to guard against overflow and then check that it doesn't exceed
> MaxAllocSize. If it does, do not issue the bind at all and throw an
> Exception in a fashion that keeps the connection in working order.
Sounds reasonable.
I was wondering if it was worth teaching PGstream (or a subclass) about
the protocol format. Then it could automatically check for oversize
messages, that we wrote as much data we claimed, and that when reading a
server message we consumed the entire message. I don't know what the
overhead of doing this would be, though.
-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, books@ejurka.com
Subject: Re: setBinaryStream can abandon connection
In-Reply-To: <41732423.1080407@opencloud.com>
References: <Pine.BSO.4.56.0410170735120.16087@leary.csoft.net> <4172CCFC.3030503@opencloud.com> <Pine.BSO.4.56.0410171602050.16087@leary.csoft.net> <4172E3AC.1040102@opencloud.com> <Pine.BSO.4.56.0410171635180.16087@leary.csoft.net> <41732423.1080407@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