Re: libpq compression - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: libpq compression
Date
Msg-id 5656c747-f275-5f91-c5a3-045e5ab2a773@postgrespro.ru
Whole thread Raw
In response to Re: libpq compression  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: libpq compression
List pgsql-hackers

On 05.06.2018 20:06, Peter Eisentraut wrote:
> On 6/5/18 03:09, Michael Paquier wrote:
>> I just had a quick look at this patch, lured by the smell of your latest
>> messages...  And it seems to me that this patch needs a heavy amount of
>> work as presented.  There are a couple of things which are not really
>> nice, like forcing the presentation of the compression option in the
>> startup packet to begin with.
> Yeah, at this point we will probably need a discussion and explanation
> of the protocol behavior this is adding, such as how to negotiate
> different compression settings.
>
> Unrelatedly, I suggest skipping the addition of -Z options to various
> client-side tools.  This is unnecessary, since generic connection
> options can already be specified via -d typically, and it creates
> confusion because -Z is already used to specify output compression by
> some programs.
>

Sorry, psql is using '-d' option for specifying database name and 
pgbench is using '-d' option for toggling debug output.
So may be there is some other way to pass generic connection option, but 
in any case it seems to be less convenient for users.
Also I do not see any contradiction with using -Z option in some other 
tools (pg_basebackup, pg_receivewal, pg_dump)
for enabling output compression. It will be bad if that option has 
contradictory meaning in different tools. But if it is used for toggling 
compression
(doesn't matter at which level), then I do not see that it can be source 
of confusion.

The only problem is with pg_dump which establish connection with server 
to fetch data from the database and is able to compress output data.
So here we may need two options: compress input and compress output.  
But I do not think that because of it -Z option should be removed from 
psql and pgbench.


-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Portability concerns over pq_sendbyte?
Next
From: Alvaro Herrera
Date:
Subject: Re: Supporting tls-server-end-point as SCRAM channel binding forOpenSSL 1.0.0 and 1.0.1