From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: V3 protocol gets out of sync on messages that cause allocation |
Date: | 2004-10-20 21:19:02 |
Message-ID: | 4176D646.9050803@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> I wrote:
>
>>Yeah. The intent of the protocol design was that the recipient could
>>skip over the correct number of bytes even if it didn't have room to
>>buffer them, but the memory allocation mechanism in the backend makes
>>it difficult to actually do that. Now that we have PG_TRY, though,
>>it might not be out of reach to do it right.
>
>
> And indeed it wasn't. Patch committed.
Thanks!
Re your commit comment:
> I'm a bit dubious that this is a real problem, since the client likely
> doesn't have any more space available than the server, but it's not hard
> to make it behave according to the protocol intention.
It's quite possible that the client isn't keeping the whole parameter in
memory. For example, JDBC has a method that allows a streamable
parameter (with prespecified length) to be set, and the stream contents
could be coming from disk or computed on demand. That is actually where
I came across the problem in the first place.
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2004-10-21 01:08:05 | Re: Using ALTER TABLESPACE in pg_dump |
Previous Message | David Fetter | 2004-10-20 19:59:58 | Re: Why frequently updated tables are an issue |