Patch for allowing explicit enable/disable of binary transfer for each OID type

Поиск
Список
Период
Сортировка
От Mikko Tiihonen
Тема Patch for allowing explicit enable/disable of binary transfer for each OID type
Дата
Msg-id 4E7E5D9D.2070409@nitorcreations.com
обсуждение исходный текст
Ответ на Re: Patch for binary receive of basic array types  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-jdbc
On 09/24/2011 05:46 PM, Kevin Grittner wrote:
>> Mikko Tiihonen  wrote:
>
>> In general could add a mechanism to add/remove specific oids from
>> the binary transfer mode as a configuration option to the jdbc
>> driver.
>>
>> The same mechanism could be used for by application code that uses
>> custom types inside PostgreSQL to take advantage of binary
>> transfers.
>>
>> There will always be trade-offs between txt and bin encoding and
>> sometimes the differences are large enough to change from driver
>> defaults.
>
> Yeah, all I'm saying is that when there are such large trade-offs
> between CPU usage and network traffic requirements, it might be a
> good idea to allow a user to choose with some connection option.  For
> perspective, just within our organization we have cases where we're
> communicating between busy machines on the same 1Gbps switch, and
> cases where we're communicating between nearly-idle machines over a
> sometimes-saturated 3Mbps WAN connection.  This change would be a big
> win for one and could potentially be a big problem in the other.

Here is a patch that allows using binaryTransferEnable and
binaryTransferDisable options to allow driver used to override the
defaults.

It accepts a comma separated list of OID names (much match names in
org.postgres.core.Oid) or any numeric oid value.

For example one can use
binaryTransferDisable=INT4_ARRAY,1016
binaryTransferEnable=TEXT

It will also be useful if for some reason the binary encoding of a
variable changes in the server to allow using of old jdbc driver by
disabling the binary transfer for one type as a workaround while
waiting for a new jdbc driver release.

-Mikko

Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: alexbruy
Дата:
Сообщение: Re: Prepared statement with function as argument: how to bind values?
Следующее
От: Mikko Tiihonen
Дата:
Сообщение: Patch for binary transfer of UUID type