Re: Refactoring of compression options in pg_basebackup

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Refactoring of compression options in pg_basebackup
Дата
Msg-id 202201171541.vmc7pwyksder@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Refactoring of compression options in pg_basebackup  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Refactoring of compression options in pg_basebackup  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On 2022-Jan-17, Robert Haas wrote:

> Of the two
> alternatives that you propose, I prefer --compress=["server-"]METHOD
> and --compression-level=NUMBER to having both
> --client-compression-level and --server-compression-level. To me,
> that's still a bit more surprising than my proposal, because having
> the client compress stuff and having the server compress stuff feel
> like somewhat different kinds of things ... but it's unsurprising that
> I like my own proposal, and what really matters is that we converge
> relatively quickly on something we can all live with.

I think having a single option where you specify everything is simpler.
I propose we accept these forms:

--compress=[{server,client}-]method[:level]    new in 15
--compress=level        (accepted by 14)
-Z level            (accepted by 14)
-z                (accepted by 14)

This way, compatibility with the existing release is maintained; and we
introduce all the new functionality without cluttering the interface.

So starting from 15, in addition to the already supported forms, users
will be able to do

--compress=server-gzip:8    (completely specified options)
--compress=client-lz4        (client-side lz4 compression, default level)
--compress=zstd            (server-side zstd compression)

there's a bit of string parsing required to implement, but that seems
okay to me -- the UI seems clear enough and easily documented.



One missing feature in this spec is the ability to specify compression
to be used with whatever the default method is.  I'm not sure we want to
allow for that, but it could be
--compress=client
--compress=server
which uses whatever method is default, with whatever level is default,
at either side.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: 2022-01 Commitfest
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Refactoring of compression options in pg_basebackup