Re: PG 14 pg_basebackup accepts --compress=server-zst option
От | Tom Lane |
---|---|
Тема | Re: PG 14 pg_basebackup accepts --compress=server-zst option |
Дата | |
Msg-id | 1251342.1717774388@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: PG 14 pg_basebackup accepts --compress=server-zst option (Ron Johnson <ronljohnsonjr@gmail.com>) |
Список | pgsql-general |
Ron Johnson <ronljohnsonjr@gmail.com> writes: > On Fri, Jun 7, 2024 at 12:32 AM David G. Johnston < > david.g.johnston@gmail.com> wrote: >> I don’t see us adding an error message at this point. > Me neither. It just seemed odd. v14 thinks the argument of --compress must be an integer, and doesn't really bother with any syntax error checks: case 'Z': compresslevel = atoi(optarg); if (compresslevel < 0 || compresslevel > 9) { pg_log_error("invalid compression level \"%s\"", optarg); exit(1); } break; In your example, atoi() will return zero and it will sail along with no compression. Releases 15 and up have more complex ideas of what --compress can specify, and seem to syntax-check it much more thoroughly. This is a pretty common coding pattern, so I can't get excited about changing it, especially not in long-stable branches. regards, tom lane
В списке pgsql-general по дате отправления: