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 1p6gZV-00012q-Kt for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Dec 2022 23:26:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p6gZT-0001xv-Dq for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Dec 2022 23:26:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p6gZT-0001xm-0Y for pgsql-hackers@lists.postgresql.org; Sat, 17 Dec 2022 23:26:23 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p6gZP-0002cU-FK for pgsql-hackers@lists.postgresql.org; Sat, 17 Dec 2022 23:26:21 +0000 Received: by mail-io1-xd34.google.com with SMTP id n63so3026146iod.7 for ; Sat, 17 Dec 2022 15:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=N7Rgqm9IzFvestjeVCpH/1lCADCrtbYIjdSRLZ36ybo=; b=O5ZCG94aqgLAHdAScXttjHElfmgVLQ4F754tiEpyM0mHVlw7qSz6TS5CNB6OEAj55H nGPhif+4jkD4YRqJ4teAw+hKres29Gq4Lqdciok+4DwQGP6t4XejLjSXYdqqg9xnJx8U GrYkGApVh0fSUpQp4URN5CE+ALP04YSpIck8AWkV5UjtENF0ICPEDE9ZTxwwFVQcQn+b vMP+1sGAfUBju6EGKNuJ7SMCEDW3xsflq5lrHx5dkTR1bLs5X+8hveFzyhPV2nhntFgv WEQN0aPfmyORFm+gT0XNR/lljmhxeAiPB1+H0QGfPeRZ/W+0i/CbGF/pwxnTmREA4hKH XaIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N7Rgqm9IzFvestjeVCpH/1lCADCrtbYIjdSRLZ36ybo=; b=fTQy4PGkvmTUY+xi6Mr4+tKowESubuuwbtEFwt5OFkQbolFEvNjII96Vj5QH3F91Us IyaL2mXH2Nq9VcOOnJUl/jFz5SysmcWJehipHcSsmp1xBR95a675XxQg4YeT1lG1O9jF Scqi9TsuePhjZwdkHksp3prK9/wi1OjXTFQXrpws8/ui55yBKkR+74fszl9E81feuqQI g+qA7C4DK+Z43YoquOExEyS6bl2/+4yf1V96Q5S+HwkJZCBm7bh4AMfLkpzM5XM3/UDO Mzp7HhuP6TnE9Py3ObqIM64AzWVkCi6yoObW46TM2IYXHxwuuPAJCP5hx7ISqn6TYE4g vYXA== X-Gm-Message-State: ANoB5pmKxVgWxs0EgFsefqzA5aAbSXTgG5HPheyca2O91fNLeoIqYk9J RWAKjK8fid4KWLZbZCBLonD7Pw== X-Google-Smtp-Source: AA0mqf7fNkqL1mibJWDp+Z3SXwuv8ZH05YfNrCGniTxhwHxI5BedkGRRDf/grRhUN3+JYiTW3YSnZg== X-Received: by 2002:a05:6602:3687:b0:6e3:8b2:3ea3 with SMTP id bf7-20020a056602368700b006e308b23ea3mr15733532iob.9.1671319577014; Sat, 17 Dec 2022 15:26:17 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id j5-20020a026305000000b0038a57c147dbsm2068847jac.122.2022.12.17.15.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 15:26:16 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id A017080039C; Sat, 17 Dec 2022 17:26:15 -0600 (CST) Date: Sat, 17 Dec 2022 17:26:15 -0600 From: Justin Pryzby To: gkokolatos@pm.me Cc: Michael Paquier , pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: <20221217232615.GS1153@telsasoft.com> References: <4wfmZ9BuGbkM6JXggut4g_gPl1hLbVeUwPEQh5nGgzlKCgnbtRaw7-nPcyPelGdG8ttH9A7vgyX_Z2fwZxuqHt1xENg9mqDfP_94qoZ5WxQ=@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4wfmZ9BuGbkM6JXggut4g_gPl1hLbVeUwPEQh5nGgzlKCgnbtRaw7-nPcyPelGdG8ttH9A7vgyX_Z2fwZxuqHt1xENg9mqDfP_94qoZ5WxQ=@pm.me> 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 001: still refers to "gzip", which is correct for -Fp and -Fd but not for -Fc, for which it's more correct to say "zlib". That affects the name of the function, structures, comments, etc. I'm not sure if it's an issue to re-use the basebackup compression routines here. Maybe we should accept "-Zn" for zlib output (-Fc), but reject "gzip:9", which I'm sure some will find confusing, as it does not output. Maybe 001 should be split into a patch to re-use the existing "cfp" interface (which is a clear win), and 002 to re-use the basebackup interfaces for user input and constants, etc. 001 still doesn't compile on freebsd, and 002 doesn't compile on windows. Have you checked test results from cirrusci on your private github account ? 002 says: + save_errno = errno; + errno = save_errno; I suppose that's intended to wrap the preceding library call. 002 breaks "pg_dump -Fc -Z2" because (I think) AllocateCompressor() doesn't store the passed-in compression_spec. 003 still uses and not "lz4.h". Earlier this year I also suggested to include an 999 patch to change to use LZ4 as the default compression, to exercise the new code under CI. I suggest to re-open the cf patch entry after that passes tests on all platforms and when it's ready for more review. BTW, some of these review comments are the same as what I sent earlier this year. https://www.postgresql.org/message-id/20220326162156.GI28503%40telsasoft.com https://www.postgresql.org/message-id/20220705151328.GQ13040%40telsasoft.com -- Justin