pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Subject: Re: Different compression methods for FPI
Date: Tue, 22 Jun 2021 12:53:46 +0900
Message-ID: <YNFeyiPYA9jRzcKY@paquier.xyz> (raw)
In-Reply-To: <20210622031358.GF29179@telsasoft.com>
References: <BEF3B1E0-0B31-4F05-8E0A-F681CB918626@yandex-team.ru>
	<20210315003135.GL29463@telsasoft.com>
	<20210315180918.GW29463@telsasoft.com>
	<20210321193004.GA4203@telsasoft.com>
	<YKIelANwse+k2JxT@paquier.xyz>
	<20210519030618.GS373@telsasoft.com>
	<YKTa4+kTFkb3EIBs@paquier.xyz>
	<20210525044444.GV3676@telsasoft.com>
	<CAFiTN-thohtHGzp4dJ1QWc359qb43mVfrELeVcS5BwFuquRLtg@mail.gmail.com>
	<20210622031358.GF29179@telsasoft.com>

On Mon, Jun 21, 2021 at 10:13:58PM -0500, Justin Pryzby wrote:
> @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.

Yes, I'd like to do that on my animal dangomushi.

> So the patches that you say are unrelated still seem to me to be a
> prerequisite .

I may be missing something, of course, but I still don't see why
that's necessary?  We don't get any test failures on HEAD by switching
wal_compression to on, no?  That's easy enough to test with a two-line
change that changes the default.

> +/* 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.

Yeah, I know.  I have just finished with that to get something
readable for the sake of the tests.  As you say, the point is moot
just we add one new method, anyway, as we need just one new bit.
And that's what I would like to do for v15 with LZ4 as the resulting
patch is simple.  It would be an idea to discuss more compression
methods here once we hear more from users when this is released in the
field, re-considering at this point if more is necessary or not.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (65+ messages)  latest in thread

Message-ID: <YNFeyiPYA9jRzcKY@paquier.xyz>
Permalink:  ../YNFeyiPYA9jRzcKY@paquier.xyz/
Also on:    postgresql.org/message-id/YNFeyiPYA9jRzcKY@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, pryzby@telsasoft.com, dilipbalaut@gmail.com, x4mmm@yandex-team.ru, thomas.munro@gmail.com
  Subject: Re: Different compression methods for FPI
  In-Reply-To: <YNFeyiPYA9jRzcKY@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox