pg_basebackup: error: could not initiate base backup: ERROR: could not set compression worker count to 4: Unsupported parameter
You could also get something like this:
pg_basebackup: error: could not set compression worker count to 4: Unsupported parameter
In either case, what is happening is that PostgreSQL has requested libzstd to set the ZSTD_c_compressionLevel parameter, and the library returned an "Unsupported parameter" error to PostgreSQL. In the former case, server-side compression was requested, and the server's libzstd refused parallelism; in the latter case, client-side compression was requested, and the client's libzstd refused parallelism. In either case, the solution is to install a version of libzstd that supports multithreading.
Multithreading support became the default in libzstd 1.5.0. Earlier releases could be build with multithreading support, and later releases can be built without it. Therefore, it's possible that you won't have this problem even if your version of libzstd is older than 1.5.0, and it's possible that you will have it even if your version of libzstd is 1.5.0 or greater.
However, my guess is that most packagers build libraries like libzstd with the default options. Therefore, if you get this message, I think that it is pretty likely that the relevant machine -- the client or server, depending on where you're trying to perform the compression -- has a version of libzstd less than 1.5.0, and that if you can upgrade it to at least 1.5.0, that will fix the problem.