DBI Proxy and transparent compression supported?

DBI Proxy and transparent compression supported?

am 07.11.2007 20:38:36 von schuler

Hello.

I am trying to get the DBI::Proxy module to talk with the dbiproxy server
with compression turned on and am not having much luck. I am using the
section on Compression in the Programming the Perl DBI book as a starting
point.

My client script (running on a Suse Linux host, Perl 5.8.7 and DBI 1.48)
is connecting and communicating to the DB server (running SLES 10, Perl
5.8.8 and DBI 1.50) via DBI::Proxy without compression just fine.

However, when I attempt to add compression to the mix, I am having troubles.

I am running dbiproxy with the following:

% /usr/bin/dbiproxy --debug --configfile proxy_postgres.cfg --compression
gzip

The client script is connecting with the following DSN:

$dsn = 'DBI:Proxy:hostname=build;port=12400;compression=gzip;dsn=DB I:Pg:';
$db_user = 'foo';
$db_pass = 'bar';
$dbh = DBI->connect($dsn, $db_user,$db_pass, {RaiseError => 1});

From dbiproxy, I get:

err, Child died: Unexpected EOF from client at
/usr/lib/perl5/vendor_perl/5.8.8/RPC/PlServer.pm line 146

Running dbiproxy in the debugger, I see that it is attempting to run
Compress::Zlib::uncompress on the message in RPC::PlServer::Comm::Read,
but that the message is not compressed. This is triggering the error
above.

I stepped through the client connection and don't see anything that
compresses the data. I also don't see any mention in the DBD or DBI
documentation that suggests that compression=gzip is a recognized option.

In other words, it appears that the compression option to dbiproxy is
doing something, but that the client side doesn't support it. Is this
true or am I just missing the boat on something obvious?

I posted this question on perlmonks as
http://www.perlmonks.org/index.pl?node_id=649101 and was pointed in this
direction.

Thanks for any hints.

Ben