I have a script that connects to a Postgres DB and writes data. Simple enough - however, this script will be run from multiple hosts and send loads of data.
I would like to toy with compressing the data to save on some network bandwidth and came across dbiproxy. I have dbiproxy running on the DB host and my script connecting to it successfully on the client hosts. However, when I attempt to add compression, I have failures.
I am running the dbiproxy thusly:
/usr/bin/dbiproxy --debug --configfile proxy_postgres.cfg --compression gzipMy script is connecting as such:
$dsn = 'DBI:Proxy:hostname=build;port=12400;compression=gzip;dsn=DBI:P +g:'; $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
I've stepped through the dbiproxy and it appears that when I have compression set, it attempts to uncompress every single message that comes through the socket, including the 'connect'. However, I can't find any mention of compressing in DBI, DBD::Pg, etc.
I've played around with a couple of versions of the components (perl 5.8.8/DBI 1.50 and perl 5.8.7/DBI 1.48).
The man page for dbiproxy and DBI::ProxyServer don't mention compression either, though dbiproxy's help option lists it.
Frankly, the only place I have seen this mentioned is in O'Reilly's Programming with DBI book and some sundry Google hits.
My question? Is this supposed to work? Is there an alternative?
In reply to dbiproxy and compression by bcrust
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |