Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )
Дата
Msg-id 20190720010419.GA1768@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )  (Ian Barwick <ian.barwick@2ndquadrant.com>)
Ответы Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Fri, Jul 19, 2019 at 10:40:42PM +0900, Ian Barwick wrote:
> Good point, it does actually fail with an error if an impossible slot name
> is provided, so the escaping is superfluous anyway.

FWIW, ReplicationSlotValidateName() gives the reason behind that
restriction:
Slot names may consist out of [a-z0-9_]{1,NAMEDATALEN-1} which should allow
the name to be used as a directory name on every supported OS.

> I'll take another look at it later as it's not exactly critical, just stuck
> out when I was passing through the code.

This restriction is unlikely going to be removed, still I would rather
keep the escaped logic in pg_basebackup.  This is the usual,
recommended coding pattern, and there is a risk that folks refer to
this code block for their own fancy stuff, spreading the problem.  The
intention behind the code is to use an escaped name as well.  For
those reasons your patch is fine by me.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Catching missing Datum conversions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Compile from source using latest Microsoft Windows SDK