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 1peOBF-0003UQ-OR for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 22:40:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1peOBE-00032w-Hh for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 22:40:40 +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 1peOBE-00032n-3Z for pgsql-hackers@lists.postgresql.org; Mon, 20 Mar 2023 22:40:40 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1peOBB-0006Rv-5W for pgsql-hackers@lists.postgresql.org; Mon, 20 Mar 2023 22:40:39 +0000 Received: by mail-il1-x129.google.com with SMTP id l15so5745847ilv.4 for ; Mon, 20 Mar 2023 15:40:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; t=1679352034; h=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=XsRxMwTEGJW7LDfWqR7qv/aaqfXkJkxANYYj+ffczfs=; b=zzn34tkaQzB4D98f4yYcbP8RRVfm8FS9PDo8NHJNVaXdWSvIlof52cX+1YQggpKPBt S07V3mbUv0i1kQ9J3jJ7YV7huesyVkUitts8/lgVx/9+jcOcABA4rK6WT3Byxxw+b4Yl lw7o5y8drzbUq70JjgIVqt4sxNuvOV44YUQax6HT+o+DSTQeq7ONS2Q+q+ivHyq3O4lS YNo0Nw+Z01wKXwSC34GpyxI+fBIE7sfMXu/S7nxZ7vTilAxFo9891j9qr5W6kdXjTHIr IwS4IbgbaByYwwFN8Q/kJOOkAqpNquEatYE3+XHcCp6Nn8mBWNv3sxqbiqepOaKdQ+v0 yojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679352034; h=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=XsRxMwTEGJW7LDfWqR7qv/aaqfXkJkxANYYj+ffczfs=; b=oTgqqe41DDzJE+Ge7yywl5oTTTP4mN5NjJHdaUPl38IIVzJzw/n7evwGrq3DKPSq+b sPBy44lHJZZ0yUByNKfLN99CgFl6hxqg6lYeNzssm1jdOETRrNbymHiKMO/NRYL/zgSk 9Vfeh/XVC9rqxildfkQMBbFyNXjAKiwSeDaF4uyTAY/nUbGCij5HN9Uw/hGgU6WUSblB ckdJthm2xZVNzBqbuY5jsueAvyTv39fPrvOhB/yMauynMMrN3qyrZCAFbzgGA+D10SBX HUFV/4O49Ms9dW/8+FbBkn2Rb9Th1FPiRiGylz9yNg63YiRcYxow7VkYZHtYeznP65/F Pdxg== X-Gm-Message-State: AO0yUKUnUprfwcHycwWLXpXfBu2kDDYGt9taWrd66lU8lft+ADdzJf8j AwKuTfOP5c+VwPSpkrq8DSSGgw== X-Google-Smtp-Source: AK7set99Oo5ADTL+XxUrs2OlAYlIxg10Pqt5pI8ntJF4mqt0iFx5peTPH2dh3BVZuFVL2ploJg9cCQ== X-Received: by 2002:a92:ad10:0:b0:323:447:2356 with SMTP id w16-20020a92ad10000000b0032304472356mr855900ilh.6.1679352034062; Mon, 20 Mar 2023 15:40:34 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n8-20020a056e02140800b003244d7f2292sm3085047ilo.32.2023.03.20.15.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 15:40:33 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 504D08008B0; Mon, 20 Mar 2023 17:40:32 -0500 (CDT) Date: Mon, 20 Mar 2023 17:40:32 -0500 From: Justin Pryzby To: gkokolatos@pm.me Cc: Tomas Vondra , Alexander Lakhin , shiy.fnst@fujitsu.com, Michael Paquier , pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: References: <7zu6GYFi72jByVk2SEe_nd8r1DHhwA35vSntAE9sAfiMX9Lfk6bwimkwmu7GDgYaEvL27SE4qF1uK4_LHWQM4H-SXOwkMAI-GV8PKGmED_E=@pm.me> <8421f53d-c9f7-c02e-3278-9f9522a8e8f3@enterprisedb.com> <33496f7c-3449-1426-d568-63f6bca2ac1f@gmail.com> <1aBKUlb8BGVUUTkRJwEmU3ud1NyeHVCoC7bpOKAuRYlHHJ7hRiDVXYgad-wmjx1K3pykd_ctyY4Lqy9xA7JGLXOm1Eul-imdZ_7TVr5LY8U=@pm.me> <3da84c90-7e12-75ee-a582-025bc68dd098@enterprisedb.com> <5qAu7vrMV3hEodlIC82b0JICWTwEUSRoIDWlIaczNBIEVVfDH2lccxHNIQ726e4nX_Qqjc4lPc5_z9RtV28NMdVv7BNiADF4JB-FDahmlVk=@pm.me> <32ba9612-1982-4b2d-135a-5d1222987082@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 17, 2023 at 03:43:58PM +0000, gkokolatos@pm.me wrote: > From a174cdff4ec8aad59f5bcc7e8d52218a14fe56fc Mon Sep 17 00:00:00 2001 > From: Georgios Kokolatos > Date: Fri, 17 Mar 2023 14:45:58 +0000 > Subject: [PATCH v3 1/3] Improve type handling in pg_dump's compress file API > -int > +bool > EndCompressFileHandle(CompressFileHandle *CFH) > { > - int ret = 0; > + bool ret = 0; Should say "= false" ? > /* > * Write 'size' bytes of data into the file from 'ptr'. > + * > + * Returns true on success and false on error. > + */ > + bool (*write_func) (const void *ptr, size_t size, > - * Get a pointer to a string that describes an error that occurred during a > - * compress file handle operation. > + * Get a pointer to a string that describes an error that occurred during > + * a compress file handle operation. > */ > const char *(*get_error_func) (CompressFileHandle *CFH); This should mention that the error accessible in error_func() applies (only) to write_func() ? As long as this touches pg_backup_directory.c you could update the header comment to refer to "compressed extensions", not just .gz. I noticed that EndCompressorLZ4() tests "if (LZ4cs)", but that should always be true. I was able to convert the zstd patch to this new API with no issue. -- Justin