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 1htbjX-0005cJ-6u for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 17:52:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1htbjU-0005mL-Hy for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 17:52:48 +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 1htbjU-0005mD-8o for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2019 17:52:48 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htbjR-00013U-7v for pgsql-hackers@postgresql.org; Fri, 02 Aug 2019 17:52:47 +0000 Received: by mail-wm1-x344.google.com with SMTP id v15so68771834wml.0 for ; Fri, 02 Aug 2019 10:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4hq9CrxKwERadfMp842L850VrvxQTSw2LcpoP3QzTrM=; b=dqlYIt27n0fkVqr9FmOylg8Sel/2P6EnwU2tptKXmUNNH93A13zMM3YaU5ISWpnN0/ Ura4Qd7jyqIttAS4xTCc6JxCdH+Ka6B9JzlEpO76P4xu3WhtzdFsOXAGqXaqDFPpfgAc pTpjT24YkCir/yAQfZOCB6nghHewzhKhU0w2QWjPMHQD9i0Q8sNkPzlGVewdmKU1l3US 6HTyq/ZcqEyEIzj4Y5VQs3i7tzvBasiMbIq+rtKLGgN+aXBW4ErL9TxKlTJsciQwRYPR rH6aVH0YoQpSYgrAC9RY7OxvKD//OVmaeasX7sgky3Bb9ZJTB0mC6MD7CfUOZP2VMcYV 1A4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4hq9CrxKwERadfMp842L850VrvxQTSw2LcpoP3QzTrM=; b=nhYmRxETmZP3hrLsvP5dN2bWpZsM8UWh9TRZfzPx0jfBt2cRmJiGTw2bf6KHn7thsn JLfj60/0xqiUTzha86V79dchcGzP46ZK7Cy1t8AYpQpVXuJyvKMYe024Aw9HNiSbD9uR j3gMF53BtH8c4KWnvV7iCNoKYBH4GqvkopR7c1kqi5idRbO4B6NZgEj9Y8gDKC6J4sJm uSOKFot4Mwhc4rDdqkvL+eh4S5ZXLnYM9vnytwFwn1GE8OT5tm8MtnGZtydapF6dki9X Q5FxeRYVKsa2tVBMnFVCFydlowTkqXdKq1+Pqr2/49/i5WgBmNm0vtB+OyQ1rKx+PGZF atYQ== X-Gm-Message-State: APjAAAV5S+1zzqZucSa75CaUxV7hNfH603ndqM20NjwoahfZ9rTK3qVp l4LpOvqQtW/JgdfnrxG2hPjLgw== X-Google-Smtp-Source: APXvYqwbuHDbs9/89TRCOKec1T1i90i0NRwjJ0LWINlP7lFy58dSdwjPMRifz0blIHkQw9MLKL10xA== X-Received: by 2002:a7b:cc86:: with SMTP id p6mr4946138wma.123.1564768364147; Fri, 02 Aug 2019 10:52:44 -0700 (PDT) Received: from localhost (ip-86-49-253-160.net.upcbroadband.cz. [86.49.253.160]) by smtp.gmail.com with ESMTPSA id s15sm60110095wrw.21.2019.08.02.10.52.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 10:52:41 -0700 (PDT) Date: Fri, 2 Aug 2019 19:52:39 +0200 From: Tomas Vondra To: Andres Freund Cc: Andrey Borodin , Konstantin Knizhnik , Michael Paquier , pgsql-hackers , Vladimir Leskov Subject: Re: pglz performance Message-ID: <20190802175239.5ds6rhdso6hwy4vk@development> References: <469C9ED9-348C-4FE7-A7A7-B0FA671BEE4C@yandex-team.ru> <20190513071427.GB2273@paquier.xyz> <169163A8-C96F-4DBE-A062-7D1CECBE9E5D@yandex-team.ru> <20190802144345.d62jtiyyx6r2y73f@development> <20190802163948.i6mjypdgujeorrbi@alap3.anarazel.de> <20190802170039.o4pabnzm4xy3z7uj@development> <20190802171258.nob5zo2vu7siqo2b@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190802171258.nob5zo2vu7siqo2b@alap3.anarazel.de> User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Aug 02, 2019 at 10:12:58AM -0700, Andres Freund wrote: >Hi, > >On 2019-08-02 19:00:39 +0200, Tomas Vondra wrote: >> On Fri, Aug 02, 2019 at 09:39:48AM -0700, Andres Freund wrote: >> > Hi, >> > >> > On 2019-08-02 20:40:51 +0500, Andrey Borodin wrote: >> > > We have some kind of "roadmap" of "extensible pglz". We plan to >> > > provide implementation on Novembers CF. >> > >> > I don't understand why it's a good idea to improve the compression side >> > of pglz. There's plenty other people that spent a lot of time >> > developing better compression algorithms. >> > >> >> Isn't it beneficial for existing systems, that will be stuck with pglz >> even if we end up adding other algorithms? > >Why would they be stuck continuing to *compress* with pglz? As we >fully retoast on write anyway we can just gradually switch over to the >better algorithm. Decompression speed is another story, of course. > Hmmm, I don't remember the details of those patches so I didn't realize it allows incremental recompression. If that's possible, that would mean existing systems can start using it. Which is good. Another question is whether we'd actually want to include the code in core directly, or use system libraries (and if some packagers might decide to disable that, for whatever reason). But yeah, I agree you may have a point about optimizing pglz compression. > >Here's what I had a few years back: > >https://www.postgresql.org/message-id/20130621000900.GA12425%40alap2.anarazel.de >see also >https://www.postgresql.org/message-id/20130605150144.GD28067%40alap2.anarazel.de > >I think we should refresh something like that patch, and: >- make the compression algorithm GUC an enum, rename >- add --with-system-lz4 >- obviously refresh the copy of lz4 >- drop snappy > That's a reasonable plan, I guess. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services