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
Ответ на
Список
Дерево обсуждения
[PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Ian Barwick <ian.barwick@2ndquadrant.com>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Sergei Kornilov <sk@zsrv.org>
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>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Michael Paquier <michael@paquier.xyz>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Michael Paquier <michael@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 ~ ) Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Michael Paquier <michael@paquier.xyz>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Michael Paquier <michael@paquier.xyz>
Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ ) Ian Barwick <ian.barwick@2ndquadrant.com>
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
Дата:
От: Michael Paquier
Дата:
FAQ