Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYVPg-0007sh-A0 for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Mar 2022 16:06:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nYVPf-00044e-0h for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Mar 2022 16:06:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYVPe-00044U-Ib for pgsql-hackers@lists.postgresql.org; Sun, 27 Mar 2022 16:06:42 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nYVPa-0008WE-8p for pgsql-hackers@lists.postgresql.org; Sun, 27 Mar 2022 16:06:41 +0000 Received: by mail-io1-xd2e.google.com with SMTP id g21so1179347iom.13 for ; Sun, 27 Mar 2022 09:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XbPuG7dlS+tv5sv+HUMkR/b06EitsU6a72h6wDxh1SI=; b=DfJVnqMSuzZ4so75sdFB4JZ5N1mQn0clBT0d0mDiRkK37X8am2bWYFoeqNPTamJ1UT psIU+fiqO1VO4dXg2K/0HFJEliALV+nYV/O8x9AR4ChJ/W+0NHccJWjC3IiG57iepwWK m4XlQ7Dp75IE85+XKnef75vmurnK8E+GGCVfoecDyHmtkkTQu5kbIzzrSllLh0vKZ+lp trG7ddiaMQSHtssIRJR/Tdysc8necPyHvpxIUAfoKmHtamCg7NFl7rJCBYabCsoEXmM8 XnAgJjL6sv226sCtqkzP8LH2nAjZlIKYnibiVfXtpZ3Zx9igudYVZuargoIhJaQAorBt 2eKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XbPuG7dlS+tv5sv+HUMkR/b06EitsU6a72h6wDxh1SI=; b=lvnE5ZPPZOsdVvmkmrJ/jjTCO82Q0Dcxxqt7awo4kzpavyXhf0jsoEoE1Nj7MNCKyy P8Wtv4Q/828wtw/baH4SNh2/WUZpcXTohO510zNY1gWAiuDt5qokzH5Yni9nE/6Jn7/3 HRPc38CC7YuKESgzSE5LfakLNLcvLox6xB+cPdNiqHt9NskM3JDxhmtrvDyWJFP5YPPt 5LQz8p9GkEyRhipt9KL/v60X3dBW7aquFCzL03r8PEpPq7iaNRNP+wP7Ifa19zMjpONE KCqeycOwCmF6Ia6SYajG4uyBPWGBN7GP/g1oHOXuPkShxWnlqkeyGOlY+Ro6jJV/6NVz BngQ== X-Gm-Message-State: AOAM532o+z++70vXN8V4flFG/JUifbl+n7JnDletJL/Z8TepEYkWSUeg paPcvqN0U8xRSbBw+i6FLEz9bw== X-Google-Smtp-Source: ABdhPJz+N48WEsacNTspJkgTJJFfSifSTKd5Fr22iHu1EIasIc7q0cR/dQqDLNs+mkohB8jxypvang== X-Received: by 2002:a5d:9d84:0:b0:649:d9ea:5390 with SMTP id ay4-20020a5d9d84000000b00649d9ea5390mr4225776iob.116.1648397196862; Sun, 27 Mar 2022 09:06:36 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k2-20020a92b702000000b002c9b14968c6sm833515ili.52.2022.03.27.09.06.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Mar 2022 09:06:36 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 7E607800E60; Sun, 27 Mar 2022 11:06:35 -0500 (CDT) Date: Sun, 27 Mar 2022 11:06:35 -0500 From: Justin Pryzby To: Robert Haas Cc: Georgios , pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: <20220327160635.GL28503@telsasoft.com> References: <20220326162156.GI28503@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Mar 27, 2022 at 10:13:00AM -0400, Robert Haas wrote: > On Sat, Mar 26, 2022 at 12:22 PM Justin Pryzby wrote: > > 0002: I wonder if you're able to re-use any of the basebackup parsing stuff > > from commit ffd53659c. You're passing both the compression method *and* level. > > I think there should be a structure which includes both. In the future, that > > can also handle additional options. I hope to re-use these same things for > > wal_compression=method:level. > > Yeah, we should really try to use that infrastructure instead of > inventing a bunch of different ways to do it. It might require some > renaming here and there, and I'm not sure whether we really want to > try to rush all this into the current release, but I think we should > find a way to get it done. It seems like something a whole lot like parse_compress_options() should be in common/. Nobody wants to write it again, and I couldn't convince myself to copy it when I looked at using it for wal_compression. Maybe it should take an argument which specifies the default algorithm to use for input of a numeric "level". And reject such input if not specified, since wal_compression has never taken a "level", so it's not useful or desirable to have that default to some new algorithm. I could write this down if you want, although I'm not sure how/if you intend other people to use bc_algorithm and bc_algorithm. I don't think it's important to do for v15, but it seems like it could be done after featue freeze. pg_dump+lz4 is targetting v16, although there's a cleanup patch that could also go in before branching. -- Justin