Re: Prevent printing "next step instructions" in initdb and pg_upgrade

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Дата
Msg-id CAB8KJ=hmaJ_Jhr4AFuB-7Tre6WEddRBL7Z67dk3cJGMEs1rZzg@mail.gmail.com
обсуждение исходный текст
Ответ на Prevent printing "next step instructions" in initdb and pg_upgrade  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Prevent printing "next step instructions" in initdb and pg_upgrade  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
2020年10月6日(火) 19:26 Magnus Hagander <magnus@hagander.net>:
>
> The attached patch adds a switch --no-instructions to initdb and pg_upgrade, which prevents them from printing
instructionsabout how to start the cluster (initdb) or how to analyze and delete clusters (pg_upgrade). 
>
> The use case for this is for example the debian or redhat package wrappers. When these commands are run under those
wrappersthe printed instructions are *wrong*. It's better in that case to exclude them, and let the wrapper be
responsiblefor printing the correct instructions. 
>
> I went with the name --no-instructions to have the same name for both initdb and pg_upgrade. The downside is that
"no-instructions"also causes the scripts not to be written in pg_upgrade, which arguably is a different thing. We could
gowith "--no-instructions" and "--no-scripts", but that would leave the parameters different. I also considered
"--no-next-step",but that one didn't quite have the right ring to me. I'm happy for other suggestions on the parameter
names.

As the switches are doing slightly different things (just omitting verbiage
versus omitting verbiage *and* not generating some script files) it
seems reasonable
not to try and shoehorn them into a using a unified but ambiguous name
name. Particularly as they're intended to be used in scripts themselves, so
it's not like it's important to create something that users can remember
easily for frequent use.

Alternatively, rather than describing what is not being done, the switch
could be called "--script-mode" or similar with a description along the
lines of "produces output suitable for execution by packaging scripts"
or something, and detail what's being omitted (or done differently)
in the documentation page.

Regards

Ian Barwick


--
EnterpriseDB: https://www.enterprisedb.com



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

Предыдущее
От: James Coleman
Дата:
Сообщение: Re: enable_incremental_sort changes query behavior
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Logical Replication - detail message with names of missing columns