Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsEMJ-0005SL-4z for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Feb 2019 22:10:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gsEMF-0004MU-OV for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Feb 2019 22:10:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsEMF-0004ME-EK for pgsql-hackers@lists.postgresql.org; Fri, 08 Feb 2019 22:10:51 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gsEMC-0003XW-Go for pgsql-hackers@lists.postgresql.org; Fri, 08 Feb 2019 22:10:50 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 99DA421CC4BB; Sat, 9 Feb 2019 01:10:46 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.0.43] (unknown [92.243.182.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 3403221CBBA2; Sat, 9 Feb 2019 01:10:46 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1549663846; bh=McmiRo6LCIR64kg595Z//GMo0sH7vIudvqKFrsLGVBs=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=R7QLtSiTutDaNReqA8GQg7Vd4z6JJ3n754ZIc24lK4mCMEIrwuADjoacsQcJLvwcK 861Q16szZkeWFI6ctqO4B33iGqxq56dCMD6L+HKQ2RsMdwjF8B7Inf1kKX2nDs/1pb 4VBsXi9ftncrja4RUdOWRx4Y0kYF/iIJweL72Syc= Subject: Re: libpq compression To: Andres Freund Cc: "Iwata, Aya" , Michael Paquier , Andrew Dunstan , Robert Haas , "rharwood@redhat.com" , Thomas Munro , "g.smolkin@postgrespro.ru" , PostgreSQL Developers , 'Dmitry Dolgov' <9erthalion6@gmail.com> References: <8d9386be-a567-c526-2fc1-153d6ffd3507@2ndQuadrant.com> <17747c8b-c088-6f92-38e9-98316910202a@postgrespro.ru> <20181001064903.GG11712@paquier.xyz> <71E660EB361DF14299875B198D4CE5423DEB752E@g01jpexmbkw25> <1b2d418b-f3b1-620e-8456-145d6e943da6@postgrespro.ru> <71E660EB361DF14299875B198D4CE5423DED67E5@g01jpexmbkw25> <20190208185703.xy35plk7mb4ve57d@alap3.anarazel.de> From: Konstantin Knizhnik Message-ID: <512b537f-ca42-1f61-4f87-d7197949c455@postgrespro.ru> Date: Sat, 9 Feb 2019 01:10:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190208185703.xy35plk7mb4ve57d@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08.02.2019 21:57, Andres Freund wrote: > On 2019-02-08 12:15:58 +0300, Konstantin Knizhnik wrote: >> Frankly speaking, I do not think that such flexibility in choosing >> compression algorithms is really needed. >> I do not expect that there will be many situations where old client has to >> communicate with new server or visa versa. >> In most cases both client and server belongs to the same postgres >> distributive and so implements the same compression algorithm. >> As far as we are compressing only temporary data (traffic), the problem of >> providing backward compatibility seems to be not so important. > I think we should outright reject any patch without compression type > negotiation. Does it mean that it is necessary to support multiple compression algorithms and make it possible to perform switch between them at runtime? Right now compression algorithm is linked statically. Negotiation of compression type is currently performed but it only checks that server and client are implementing the same algorithm and disables compression if it is not true. If we are going to support multiple compression algorithms, do we need dynamic loading of correspondent compression libraries or static linking is ok? In case of dynamic linking we need to somehow specify information about available compression algorithms. Some special subdirectory for them so that I can traverse this directory and try to load correspondent libraries? Only I find it too complicated for the addressed problem?