Re: Question: merit / feasibility of compressing frontend <--> backend transfers w/ zlib

From: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
To: pgsql-general <pgsql-general(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question: merit / feasibility of compressing frontend <--> backend transfers w/ zlib
Date: 2002-07-15 20:10:43
Message-ID: 20020715201043.GA20306@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 15, 2002 at 12:01:03PM -0700, pgsql-general wrote:
> As one of my first projects I'm been asked to compress with zlib
> (www.gzip.org/zlib ) data flowing from postgres clients to and
> especially from the backend server. Our first idea was to write a sort
> of 'compression proxy' with a frontend and backend of its own. The
> postgres client would connect to the compression frontend on their local
> machine which would compress and transfer to the compresss backend on
> the server. Decompressed requests would be forwared to the postgres
> server. This idea was abandoned since: 1.) it means existing clients
> would have to be reconfigured to talk to their local machine, and 2.) it
> destroys host based authentication since all packets arriving at the
> sever would be from the local decompressor.

It also strikes me as inefficient and unnecessarily complicated.

> My questions are: Is there any merit to this idea? i.e would
> compressing large result sets decrease the transfer time?

I'm not too keen about it (as was Tom Lane when someone suggested it
earlier, IIRC). The vast majority of PostgreSQL installations place
both the clients and the RDBMS on the same LAN, so I'd expect
that few people would find it useful. And among those that would,
you can get that functionality in other ways (e.g. ssh forwarding,
a generic zlib tunnel if one exists -- similar to stunnel for SSL),
without needing to bloat PostgreSQL.

> How easy or difficult would it be to incorporate such change into the
> postgres frontend and backend source?

Doesn't seem like it would be very difficult, IMHO.

Cheers,

Neil

--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2002-07-15 20:20:10 table size growing out of control
Previous Message scott.marlowe 2002-07-15 20:08:46 Re: HowTo move indices' files to other hdd ?