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 1lvWrb-0008SA-8M for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jun 2021 03:14:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lvWrZ-0001g4-M1 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jun 2021 03:14:09 +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 1lvWrZ-0001fw-Bp for pgsql-hackers@lists.postgresql.org; Tue, 22 Jun 2021 03:14:09 +0000 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lvWrS-0000Rt-8d for pgsql-hackers@postgresql.org; Tue, 22 Jun 2021 03:14:08 +0000 Received: by mail-il1-x12b.google.com with SMTP id i12so17133091ila.13 for ; Mon, 21 Jun 2021 20:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/MOZLsvPuuPYJ7JEE8aSabDReVhgFQihh8RlqwVndE0=; b=L75MrOLGqYRb/1ONF437rKs7I9y5LODUx06E/V5HUWVfuaa5ovd3Wtc0/Kl7o6F5hL LeVZ/ttyv71lfFe9oEkb/j0kCRonMBLKS3obyKEtTgevN8tr9NwVhkkM/ywKQ7PMtgg5 FCr4kYh+GG8gnddig+cCiBvZPYYtZPqmHb8+u60zDI5YLQwwlDx7J6W8uoBkxZgrR0cK 8bDOR5buJj2Wo4jIgb7gBS6GWMzXsn1L2ovgvGkyftWHWynrijOyVgatpWY1Osc5SXZD mURutecZRJf75nocByI/oi183+zVJCBqpPIesv8IhOWZIEdZnFPG4e/xx/bIC/QKstUE aVdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/MOZLsvPuuPYJ7JEE8aSabDReVhgFQihh8RlqwVndE0=; b=AuEx23sZtP+2gasl6iFqQce6jOQ+OkPq0NHi40MYVlHXmYXO2TnQGoysbInpqgle7v 7YViOqFv7Jdj9Tm3FdcHMmCjnhBfFw0KWrK7YzMBFzFhuNAoKWxftEcjlqC00vWJgwY5 Qli8v9tafuSWXgMFx/YqyoMQu7AMdBJuLEJ1E+tSfwxfdUqt2DVlUVGmVxZ6Mcn+dze5 B0siEHV6xtDYitPwijTcMX5B/hSRl6J3EBNN+UymLSwpep3sfvocEnI2BQWd2GrdBM0e 0A+BjAJErXlFY6mpU9jS8frjFZIHkjR3Xp0+cQa5HRJ/O/4BNfbHE5kgA0Qpq412gdEA VHEQ== X-Gm-Message-State: AOAM533bUaEohM+lbdClpMIOrIfX4fXK91shHUKGOYN3pX895nmRHod7 OFQp/g/SLkkIRLnQFqqpgZ7QFQ== X-Google-Smtp-Source: ABdhPJxzOQbpC+gr05aHXu2RIp01RRL658eolgNL5h7tzYPgZ27UGlJVD1PxUHl2yst2l/Of2pxuJw== X-Received: by 2002:a92:9411:: with SMTP id c17mr1114635ili.264.1624331640508; Mon, 21 Jun 2021 20:14:00 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id p81sm11205964iod.0.2021.06.21.20.13.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jun 2021 20:13:59 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id B3B738004AD; Mon, 21 Jun 2021 22:13:58 -0500 (CDT) Date: Mon, 21 Jun 2021 22:13:58 -0500 From: Justin Pryzby To: Dilip Kumar Cc: Michael Paquier , Andrey Borodin , pgsql-hackers@postgresql.org, Thomas Munro Subject: Re: Different compression methods for FPI Message-ID: <20210622031358.GF29179@telsasoft.com> References: <20210313012820.GJ29463@telsasoft.com> <20210315003135.GL29463@telsasoft.com> <20210315180918.GW29463@telsasoft.com> <20210321193004.GA4203@telsasoft.com> <20210519030618.GS373@telsasoft.com> <20210525044444.GV3676@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Tue, May 25, 2021 at 12:05:19PM +0530, Dilip Kumar wrote: > +++ b/src/test/recovery/t/011_crash_recovery.pl > @@ -14,7 +14,7 @@ use Config; > plan tests => 3; > > my $node = get_new_node('primary'); > -$node->init(allows_streaming => 1); > +$node->init(); > $node->start; > > How this change is relevant? It's necessary for the tests to pass - see the prior discussions. Revert them and the tests fail. time make -C src/test/recovery check # Failed test 'new xid after restart is greater' @Michael: I assume that if you merge this patch, you'd set your animals to use wal_compression=lz4, and then they would fail the recovery tests. So the patches that you say are unrelated still seem to me to be a prerequisite. From: Kyotaro Horiguchi Subject: [PATCH v8 2/9] Run 011_crash_recovery.pl with wal_level=minimal From: Kyotaro Horiguchi Subject: [PATCH v8 3/9] Make sure published XIDs are persistent +/* compression methods supported */ +#define BKPIMAGE_COMPRESS_PGLZ 0x04 +#define BKPIMAGE_COMPRESS_ZLIB 0x08 +#define BKPIMAGE_COMPRESS_LZ4 0x10 +#define BKPIMAGE_COMPRESS_ZSTD 0x20 +#define BKPIMAGE_IS_COMPRESSED(info) \ + ((info & (BKPIMAGE_COMPRESS_PGLZ | BKPIMAGE_COMPRESS_ZLIB | \ + BKPIMAGE_COMPRESS_LZ4 | BKPIMAGE_COMPRESS_ZSTD)) != 0) You encouraged saving bits here, so I'm surprised to see that your patches use one bit per compression method: 2 bits to support no/pglz/lz4, 3 to add zstd, and the previous patch used 4 bits to also support zlib. There are spare bits available for that, but now there can be an inconsistency if two bits are set. Also, 2 bits could support 4 methods (including "no"). -- Justin