Re: refactoring basebackup.c - Mailing list pgsql-hackers

From Dipesh Pandit
Subject Re: refactoring basebackup.c
Date
Msg-id CAN1g5_F0KBgitEVLO8T0ynaBcQBfRMCjH9wKguDJZpX1hF3gFA@mail.gmail.com
Whole thread Raw
In response to Re: refactoring basebackup.c  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: refactoring basebackup.c  (Jeevan Ladhe <jeevanladhe.os@gmail.com>)
multithreaded zstd backup compression for client and server  (Robert Haas <robertmhaas@gmail.com>)
Re: refactoring basebackup.c (zstd workers)  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Hi,

I tried to implement support for parallel ZSTD compression. The
library provides an option (ZSTD_c_nbWorkers) to specify the
number of compression workers. The number of parallel
workers can be set as part of compression parameter and if this
option is specified then the library performs parallel compression
based on the specified number of workers.

User can specify the number of parallel worker as part of
--compress option by appending an integer value after at sign (@).
(-Z, --compress=[{client|server}-]{gzip|lz4|zstd}[:LEVEL][@WORKERS])

Please find the attached patch v1 with the above changes.

Note: ZSTD library version 1.5.x supports parallel compression
by default and if the library version is lower than 1.5.x then
parallel compression is enabled only the source is compiled with build
macro ZSTD_MULTITHREAD. If the linked library version doesn't
support parallel compression then setting the value of parameter
ZSTD_c_nbWorkers to a value other than 0 will be no-op and
returns an error.

Thanks,
Dipesh
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: On login trigger: take three
Next
From: Laurenz Albe
Date:
Subject: Re: [PATCH] Add reloption for views to enable RLS