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 1pasH6-0007az-MO for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Mar 2023 06:00:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pasH4-0002IX-68 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Mar 2023 06:00:10 +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 1pasH3-0002IO-R4 for pgsql-hackers@lists.postgresql.org; Sat, 11 Mar 2023 06:00:09 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pasH0-0001ou-0m for pgsql-hackers@lists.postgresql.org; Sat, 11 Mar 2023 06:00:08 +0000 Received: by mail-lj1-x22a.google.com with SMTP id b13so7529197ljf.6 for ; Fri, 10 Mar 2023 22:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678514403; 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=238XBVVfLEE9wx4S7VBD8TK9TIal1jtwdTisPdXpBtg=; b=MARs6CJGsav80rvzoxca2srCN9w759RziE9ZQ8Hw+IXKdQO4MY2BamjXl6EsLTlLR8 HcIpMoL8w9tjmsyhLtPfc6x6rZckNzmMw6YnKQ4EQu6C7jOqrFO8v3AA5AYqYfpmy7g7 Pij5LsOy/twBo+yWfAz4T1TVnWShnGWQ7g4qMWZsnU2dtYElgt9Uk/ZEkWFhRy6+USr5 QTE+LWnFkOQLbGAldeDzBJ/jYbuOZ5ojg92F0/hVd4e/MA+pkxJUw2ujmncp8u61DCO7 nRiL3NExmv+/CwRTpGWxFwzNuQicnCegrKGphUA2tfjnozRKdJHjGcUCgp15KZh5Wvh4 8+3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678514403; 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=238XBVVfLEE9wx4S7VBD8TK9TIal1jtwdTisPdXpBtg=; b=ep4RcmUCsP9KotTbWlPwBTqBt75zUvriyT0yy4/tsqQVfKSfUKjXsh9iWvtP3et7i1 gSV2f0OHpl0P6+9+eCkm113epfWr/uqsGZVQVN7/sMDfan88Z1fGvZCmyxtxLkn/DGa1 gr3Jcl9m1dPT383eaIx7HMz4vCfyV1K7gaCr1R1h6otiG6q3QkkSW9tvAsqcVms2Sw3a Uz65UTMzEu9DO589wgW4ZSLaLfllfarTSTTXpiSgo/vTUf451CiqscWNNl4UVKKrTt2w 8qQ+GWHzzS06qk8lsHUBjT8FkqvzrAbKnyU/aEuAFmdifG1T+2b7c027Dj0wn9pa6Fb8 +9Ww== X-Gm-Message-State: AO0yUKWcJZuM8/1uxpWs21U0Z7EQVJJyB1/zhswvQVDPzK3f4/oehh4h o7J9u5eBtI6KpTPlh/yIyH4= X-Google-Smtp-Source: AK7set+dyQD+Ky9bR4zA33sZ0WiHDJkJbXcDOus34ZP6XPfDxpcXpIMDwN7PNAtN0dwPfegTJ/NyEQ== X-Received: by 2002:a05:651c:92:b0:295:9d2c:c967 with SMTP id 18-20020a05651c009200b002959d2cc967mr8919652ljq.23.1678514403222; Fri, 10 Mar 2023 22:00:03 -0800 (PST) Received: from [1.0.0.7] ([178.155.5.76]) by smtp.gmail.com with ESMTPSA id u1-20020a2eb801000000b00295965f7495sm205791ljo.0.2023.03.10.22.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Mar 2023 22:00:02 -0800 (PST) Message-ID: <33496f7c-3449-1426-d568-63f6bca2ac1f@gmail.com> Date: Sat, 11 Mar 2023 09:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Add LZ4 compression in pg_dump Content-Language: en-US To: Tomas Vondra , gkokolatos@pm.me Cc: "shiy.fnst@fujitsu.com" , Michael Paquier , Justin Pryzby , "pgsql-hackers@lists.postgresql.org" , Rachel Heaton References: <7zu6GYFi72jByVk2SEe_nd8r1DHhwA35vSntAE9sAfiMX9Lfk6bwimkwmu7GDgYaEvL27SE4qF1uK4_LHWQM4H-SXOwkMAI-GV8PKGmED_E=@pm.me> <20230126062846.GO22427@telsasoft.com> <6YZqN2HEE4yJxxxXWiMl4QWwKzLon0SdKETTGVkT9zjWnXMftGZjLKHHjGFuwC_5I6xL2s8nMXdLQGA4vEFveYXSHbfD9K9pDQvEJF2y99o=@pm.me> <535565cd-b69f-c064-a845-15c0fc44db4a@enterprisedb.com> <22cb80ed-ec87-54c7-fd5b-cdcf79766bb1@enterprisedb.com> <8421f53d-c9f7-c02e-3278-9f9522a8e8f3@enterprisedb.com> From: Alexander Lakhin In-Reply-To: <8421f53d-c9f7-c02e-3278-9f9522a8e8f3@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, 23.02.2023 23:24, Tomas Vondra wrote: > On 2/23/23 16:26, Tomas Vondra wrote: >> Thanks for v30 with the updated commit messages. I've pushed 0001 after >> fixing a comment typo and removing (I think) an unnecessary change in an >> error message. >> >> I'll give the buildfarm a bit of time before pushing 0002 and 0003. >> > I've now pushed 0002 and 0003, after minor tweaks (a couple typos etc.), > and marked the CF entry as committed. Thanks for the patch! > > I wonder how difficult would it be to add the zstd compression, so that > we don't have the annoying "unsupported" cases. With the patch 0003 committed, a single warning -Wtype-limits appeared in the master branch: $ CPPFLAGS="-Og -Wtype-limits" ./configure --with-lz4 -q && make -s -j8 compress_lz4.c: In function ‘LZ4File_gets’: compress_lz4.c:492:19: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]   492 |         if (dsize < 0)       | (I wonder, is it accidental that there no other places that triggers the warning, or some buildfarm animals had this check enabled before?) It is not a false positive as can be proved by the 002_pg_dump.pl modified as follows: -                       program => $ENV{'LZ4'}, +                       program => 'mv',                         args    => [ -                               '-z', '-f', '--rm', "$tempdir/compression_lz4_dir/blobs.toc", "$tempdir/compression_lz4_dir/blobs.toc.lz4",                         ],                 }, A diagnostic logging added shows: LZ4File_gets() after LZ4File_read_internal; dsize: 18446744073709551615 and pg_restore fails with: error: invalid line in large object TOC file ".../src/bin/pg_dump/tmp_check/tmp_test_22ri/compression_lz4_dir/blobs.toc": "????" Best regards, Alexander