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 1pkRdH-0004H5-CJ for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Apr 2023 15:34:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkRdG-0005EG-99 for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Apr 2023 15:34:38 +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 1pkRdF-0005Bt-UH for pgsql-hackers@lists.postgresql.org; Thu, 06 Apr 2023 15:34:37 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pkRdC-00021F-Ln for pgsql-hackers@postgresql.org; Thu, 06 Apr 2023 15:34:36 +0000 Received: by mail-ej1-x62e.google.com with SMTP id g18so2350135ejx.7 for ; Thu, 06 Apr 2023 08:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1680795272; x=1683387272; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bKgACoXfHNCcp0IIvvUW9L5ZTrCliRDpIM3GdSOXVTk=; b=mI3t3TcDpKsnPN0/5vaMlSH485hw8JQjuiuzFWSDCGDSUXhxD5fJRCYQ9eGSsoC90h iHNDcDpALiqbWirH3aDI6cvYjdt6PH40jcwhiqY2Ftc2+/kY24aqk/QHk4niaOA3b5FQ fsRhkjNJE/bkmwYheGkKEXt1JpGUfobkMvyMimcTtrAHZm6/2i2XWZu+n21BnDpoIwpt m1pcymcxC2w5qBvZtjExAYhrQepVV6JVkaYUAU+JIbB7JBsA5JeLAvcqBq2zbCd9QKsJ Odx8Or7oIgIImcysct/2M6BcHJZC1f2ksz/EEOUg+FYeTsPOtfkhztHjzIB45k9X0Idt J4PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680795272; x=1683387272; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bKgACoXfHNCcp0IIvvUW9L5ZTrCliRDpIM3GdSOXVTk=; b=mJG5lAWXC/UOfkUl+9Pxt9k1uDccHye74LWQ4OxDd20qD0yO+AGN6t123o/Is8qcRm liNNGnsbhH8819FEZPUTA7Q5+TPWUgD0z3fS55E/HT60dZaLSXlT2vPX8HNKsLambnQe VJt/lHB9tmlzi2JJUDmHoskkPOKaA4WoJdn89/vHpOSCtP2t71ndn8S1NgYk92c9ktgg UJJ1IttxyzORvSA4nbsia9zAaqntRKih5FBZhI/KrFunbQM1DU3aIe4yYSI2IjyHpV35 zKME4tsNv9Ody/P968/7GmdAFzIq/woBZa0ARFSRHOQvLATU+GS++XhV6Hk225FrIxCy meYw== X-Gm-Message-State: AAQBX9dtJYg1S6pb59Pa8fJCalznWH8gFwn/b+O8J+Sy+yhShBq2ijbj BwVwMrHr4s1x7vQ1ziGjwDyebe3dYexRR2Db6uD34I8+kUfLffwlTM0Gj/vp/n2vN0/fren5/Mh CL2/MxIBe/sSzrQYn3zb2QGyPiRSh1HikbmZ3TgAQJZjNr+CYIag4cZg6H7L9+6EMJbBtbvOLUs MRYjVcQOJqz8bQlMYoenKB2QIXVIOPo5zsp27g X-Google-Smtp-Source: AKy350Zix1I5ddvK0DqpvrjfCeXHfBWDagORG0fUg4BDwwbu1Wh6WLBpyNCpA0xI+ifY6Ia7IdIHvg== X-Received: by 2002:a17:906:c795:b0:922:8fc9:d235 with SMTP id cw21-20020a170906c79500b009228fc9d235mr5595928ejb.9.1680795272314; Thu, 06 Apr 2023 08:34:32 -0700 (PDT) Received: from [10.137.0.17] (static-84-42-175-93.bb.vodafone.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id r13-20020a170906a20d00b008d044ede804sm938561ejy.163.2023.04.06.08.34.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Apr 2023 08:34:31 -0700 (PDT) Message-ID: Date: Thu, 6 Apr 2023 17:34:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: zstd compression for pg_dump Content-Language: en-US From: Tomas Vondra To: Justin Pryzby Cc: Jacob Champion , pgsql-hackers@postgresql.org, gkokolatos@pm.me, Michael Paquier , Robert Haas , Peter Geoghegan , Peter Eisentraut , Heikki Linnakangas , Thomas Munro , Dipesh Pandit , Andrey Borodin , Mark Dilger References: <0022dd9e-a439-d72f-d09b-ec512c23949b@enterprisedb.com> <4029fe58-f661-7d8d-cbbb-b936a05531e2@enterprisedb.com> <2de3bcad-6da9-9022-bce5-fc0416351d6e@enterprisedb.com> <27eb89fc-8fdd-2988-0959-0af1d6d7a12a@enterprisedb.com> <51013008-6735-96a2-d744-3b0a0413fcdd@enterprisedb.com> In-Reply-To: <51013008-6735-96a2-d744-3b0a0413fcdd@enterprisedb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/5/23 21:42, Tomas Vondra wrote: > On 4/4/23 05:04, Justin Pryzby wrote: >> On Mon, Apr 03, 2023 at 11:26:09PM +0200, Tomas Vondra wrote: >>> On 4/3/23 21:17, Justin Pryzby wrote: >>>> On Sat, Apr 01, 2023 at 10:26:01PM +0200, Tomas Vondra wrote: >>>>>> Feel free to mess around with threads (but I'd much rather see the patch >>>>>> progress for zstd:long). >>>>> >>>>> OK, understood. The long mode patch is pretty simple. IIUC it does not >>>>> change the format, i.e. in the worst case we could leave it for PG17 >>>>> too. Correct? >>>> >>>> Right, libzstd only has one "format", which is the same as what's used >>>> by the commandline tool. zstd:long doesn't change the format of the >>>> output: the library just uses a larger memory buffer to allow better >>>> compression. There's no format change for zstd:workers, either. >>> >>> OK. I plan to do a bit more review/testing on this, and get it committed >>> over the next day or two, likely including the long mode. One thing I >>> noticed today is that maybe long_distance should be a bool, not int. >>> Yes, ZSTD_c_enableLongDistanceMatching() accepts int, but it'd be >>> cleaner to cast the value during a call and keep it bool otherwise. >> >> Thanks for noticing. Evidently I wrote it using "int" to get the >> feature working, and then later wrote the bool parsing bits but never >> changed the data structure. >> >> This also updates a few comments, indentation, removes a useless >> assertion, and updates the warning about zstd:workers. >> > > Thanks. I've cleaned up the 0001 a little bit (a couple comment > improvements), updated the commit message and pushed it. I plan to take > care of the 0002 (long distance mode) tomorrow, and that'll be it for > PG16 I think. I looked at the long mode patch again, updated the commit message and pushed it. I was wondering if long_mode should really be bool - logically it is, but ZSTD_CCtx_setParameter() expects int. But I think that's fine. I think that's all for PG16 in this patch series. If there's more we want to do, it'll have to wait for PG17 - Justin, can you update and submit the patches that you think are relevant for the next CF? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company