On 06.06.2018 19:33, Konstantin Knizhnik wrote:
>
>
> 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.
>
>
Well, psql really allows to specify complete connection string with -d
options (although it is not mentioned in help).
But still I think that it is inconvenient to require user to write
complete connection string to be able to specify compression option,
while everybody prefer to use -h, -U, -p options to specify
correspondent components of connection string.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company