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 1phHPI-0001ef-1t for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 22:03:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1phHOI-0001Os-N1 for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 22:02:06 +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 1phHOI-0001Oj-Cx for pgsql-hackers@lists.postgresql.org; Tue, 28 Mar 2023 22:02:06 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1phHOF-0003jO-Ol for pgsql-hackers@lists.postgresql.org; Tue, 28 Mar 2023 22:02:05 +0000 Received: by mail-wr1-x42f.google.com with SMTP id m2so13700122wrh.6 for ; Tue, 28 Mar 2023 15:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1680040922; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fa3vAXcXs7RtRt0Quj6tNpQY2TvwXfXi7THfYDLR1ho=; b=cWFUDUwiiQLgi10JkQemRMzBLYMqDTq1obF5R6jgquILOl+Gd4oTpitK1flgXokFDR ZoTmz03H+KOI47cEl2cBeKNLy7E/XjgG+1N7A9tKUbKHAtM4ldj6PnPlC/nNhKC6JmN2 QGCaZQeYt0km+DYCm8934bexiaJzIrW0I51UnexBeR0DMbdR+AwePs7SR8NhLTIVtet9 kNawtTQTYN0/5MD54lQjjaUyfF98KbrcBlFs3v8WAoJNbT+lRP1MTNJPR18U6BmCN9rJ hsTlwc2cU45pDox2QcuPteStIe9u88m5csMPKEMhYlDjzIz5ov3qUhmc0IP37hIob4sL A+Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680040922; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fa3vAXcXs7RtRt0Quj6tNpQY2TvwXfXi7THfYDLR1ho=; b=STsmhMRXANsioA7ubHCPM5XnWPaU5KtXd3zUkGswPg24gyfQIiRIxEI58JxJg8y+/U V05oodxEsIO+mS90HNy+N1Dss/FeXb3fuOKGNygKebe4q7ylc+pKqYpHFr04vQ4AXEC3 o1t4gfyx+6oUbD/+YlKr3ZxDDjSfH3TQqqETAXELVUYx0DHFqkPKnZf2VfQ87ymGz3sX Ldn0qt04YcRMqpdSvstDMw1s2Ekfl9PkPctwLtYGsg9qUwESKmTDzJYVlGj1D7W8oUhK KcaYHUxEp2DdEuyrHgo7FDrHF37y7LdxPG7vApjJcIAf1PcXbWn6q/4HXJ5qPLZNqOaJ GP5g== X-Gm-Message-State: AAQBX9dPmw1hotoaztHmCnulYTDOFvL3rHDcaD1zX2pKxhqhqKW87yBM 89AyuBjQ6sE/NWIGgQ5WSE2AxPnlHi1GifDytxhz59wukdwk9dL95lr7+QWGKReRTQLd8PHhFDB z/WmasoW28w5L1Jg6E2Ltgos96XKVAA1F6OoF7JUbUbdvSgMB9vH7V3lUROoaDlnX31BaipYRT3 z8M+1MwTLEGxseEoF7xcV+bTXIdReTX3HlBfuRyCED2H85gSWU45Ih X-Google-Smtp-Source: AKy350YwWyiaJFJOy53vFDlOE3HOF5C4Ws2+hfr6FC/xrI+A7bogBEz+ji1JHZ03SAcqg15B6TSD3w== X-Received: by 2002:adf:f3d1:0:b0:2d5:9500:26 with SMTP id g17-20020adff3d1000000b002d595000026mr81702wrp.19.1680040922308; Tue, 28 Mar 2023 15:02:02 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-228-162.bb.vodafone.cz. [86.49.228.162]) by smtp.gmail.com with ESMTPSA id x2-20020a5d60c2000000b002cfe71153b4sm28551529wrt.60.2023.03.28.15.02.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Mar 2023 15:02:01 -0700 (PDT) Message-ID: <0a8a1003-42a3-b92e-00e5-6e04f2735efa@enterprisedb.com> Date: Wed, 29 Mar 2023 00:02:00 +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: Add LZ4 compression in pg_dump Content-Language: en-US To: gkokolatos@pm.me Cc: Justin Pryzby , Alexander Lakhin , shiy.fnst@fujitsu.com, Michael Paquier , pgsql-hackers@lists.postgresql.org, Rachel Heaton References: <7zu6GYFi72jByVk2SEe_nd8r1DHhwA35vSntAE9sAfiMX9Lfk6bwimkwmu7GDgYaEvL27SE4qF1uK4_LHWQM4H-SXOwkMAI-GV8PKGmED_E=@pm.me> <3da84c90-7e12-75ee-a582-025bc68dd098@enterprisedb.com> <5qAu7vrMV3hEodlIC82b0JICWTwEUSRoIDWlIaczNBIEVVfDH2lccxHNIQ726e4nX_Qqjc4lPc5_z9RtV28NMdVv7BNiADF4JB-FDahmlVk=@pm.me> <32ba9612-1982-4b2d-135a-5d1222987082@enterprisedb.com> <3beb0dd7-c927-3eca-689f-716e255d5b27@enterprisedb.com> From: Tomas Vondra In-Reply-To: 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 3/28/23 18:07, gkokolatos@pm.me wrote: > > ------- Original Message ------- > On Friday, March 24th, 2023 at 10:30 AM, gkokolatos@pm.me wrote: > >> >> ------- Original Message ------- >> On Thursday, March 23rd, 2023 at 6:10 PM, Tomas Vondra tomas.vondra@enterprisedb.com wrote: >> >>> This leaves the empty-data issue (which we have a fix for) and the >>> switch to LZ4F. And then the zstd part. >> >> Please expect promptly a patch for the switch to frames. > > Please find the expected patch attached. Note that the bulk of the > patch is code unification, variable renaming to something more > appropriate, and comment addition. These are changes that are not > strictly necessary to switch to LZ4F. I do believe that are > essential for code hygiene after the switch and they do belong > on the same commit. > I think the patch is fine, but I'm wondering if the renames shouldn't go a bit further. It removes references to LZ4File struct, but there's a bunch of functions with LZ4File_ prefix. Why not to simply use LZ4_ prefix? We don't have GzipFile either. Sure, it might be a bit confusing because lz4.h uses LZ4_ prefix, but then we probably should not define LZ4_compressor_init ... Also, maybe the comments shouldn't use "File API" when compress_io.c calls that "Compressed stream API". regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company