Re: libpq compression

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: libpq compression
Date: 2018-06-06 16:33:41
Message-ID: 5656c747-f275-5f91-c5a3-045e5ab2a773@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-06-06 16:37:00 Re: Supporting tls-server-end-point as SCRAM channel binding for OpenSSL 1.0.0 and 1.0.1
Previous Message Alvaro Herrera 2018-06-06 16:27:58 Re: Portability concerns over pq_sendbyte?