Hi, Please find the attached updated version of patch for ZSTD server side compression.
This patch has following changes: - Fixes the issue Tushar reported[1]. - Adds a tap test. - Makes document changes related to zstd. - Updates pg_basebackup help for pg_basebackup. Here I have chosen the suggestion by Robert upthread (as given below): >> I would be somewhat inclined to leave the level-only variant >> undocumented and instead write it like this: >> -Z, --compress={[{client|server}-]{gzip|lz4}}[:LEVEL]|none} - pg_indent on basebackup_zstd.c. Thanks Tushar, for offline help for testing the patch. [1] https://www.postgresql.org/message-id/6c3f1558-1e56-9946-78a2-c59340da1dbf%40enterprisedb.com Regards, Jeevan Ladhe On Mon, 14 Feb 2022 at 21:30, Robert Haas <robertmh...@gmail.com> wrote: > On Sat, Feb 12, 2022 at 1:01 AM Shinoda, Noriyoshi (PN Japan FSIP) > <noriyoshi.shin...@hpe.com> wrote: > > Thank you for developing a great feature. > > The current help message shown below does not seem to be able to specify > the 'client-' or 'server-' for lz4 compression. > > --compress = {[{client, server}-]gzip, lz4, none}[:LEVEL] > > > > The attached small patch fixes the help message as follows: > > --compress = {[{client, server}-]{gzip, lz4}, none}[:LEVEL] > > Hmm. After studying this a bit more closely, I think this might > actually need a bit more revision than what you propose here. In most > places, we use vertical bars to separate alternatives: > > -X, --wal-method=none|fetch|stream > > But here, we're using commas in some places and the word "or" in one > case as well: > > -Z, --compress={[{client,server}-]gzip,lz4,none}[:LEVEL] or [LEVEL] > > We're also not consistently using braces for grouping, which makes the > order of operations a bit unclear, and it makes no sense to put > brackets around LEVEL when it's the only thing that's part of that > alternative. > > A more consistent way of writing the supported syntax would be like this: > > -Z, --compress={[{client|server}-]{gzip|lz4}}[:LEVEL]|LEVEL|none} > > I would be somewhat inclined to leave the level-only variant > undocumented and instead write it like this: > > -Z, --compress={[{client|server}-]{gzip|lz4}}[:LEVEL]|none} > > -- > Robert Haas > EDB: http://www.enterprisedb.com >
v10-0001-Add-a-ZSTD-compression-method-for-server-side-compre.patch
Description: Binary data