Re: setBinaryStream can abandon connection
От | Oliver Jowett |
---|---|
Тема | Re: setBinaryStream can abandon connection |
Дата | |
Msg-id | 4172E3AC.1040102@opencloud.com обсуждение исходный текст |
Ответ на | Re: setBinaryStream can abandon connection (Kris Jurka <books@ejurka.com>) |
Ответы |
Re: setBinaryStream can abandon connection
|
Список | pgsql-jdbc |
Kris Jurka wrote: > The message length will not cause the backend to allocate large amounts of > memory, the individual parameter lengths are what actually allocates > memory. Are you sure about this? I see in pq_getmessage (called from the main backend loop via SocketBackend): if (len > 0) { /* Allocate space for message */ enlargeStringInfo(s, len); /* And grab the message */ if (pq_getbytes(s->data, len) == EOF) // ... } 'len' is the total packet length, not a per-parameter length. > So if we don't have a problem with a broken connection we don't actually > need to check for these errors because they don't do anything terrible, > but obviously I believe a broken connection is bad. I'd still like to see a more useful error message in the overflow case. We really shouldn't be generating a negative message length in the first place. -O
В списке pgsql-jdbc по дате отправления: