Re: Slightly improve initdb --sync-only option's help message

Поиск
Список
Период
Сортировка
От Bossart, Nathan
Тема Re: Slightly improve initdb --sync-only option's help message
Дата
Msg-id 783B110C-B044-422D-BC2D-528170DA0570@amazon.com
обсуждение исходный текст
Ответ на Slightly improve initdb --sync-only option's help message  (Gurjeet Singh <gurjeet@singh.im>)
Ответы Re: Slightly improve initdb --sync-only option's help message
Список pgsql-hackers
On 7/6/21, 7:02 PM, "Gurjeet Singh" <gurjeet@singh.im> wrote:
> I think it would be helpful if the help message was slightly more
> descriptive. Some options:
>
> Used in patch:
>      only sync data directory; does not modify any data
>
> To match the wording of --sync-only option:
>     write contents of data directory to disk; helpful after --no-sync option
>
> Clearly specify the system operation used for the option
>     perform fsync on data directory; helpful after --no-sync option

I think the help message should say exactly what the option does and
should avoid saying what it does not do or how it may be useful.  I
would suggest the following to match the initdb docs [0]:

          -S, --sync-only           safely write all database files to disk and exit

IMO the note about the option being helpful after using the --no-sync
option would fit better in the docs, but I'm struggling to think of a
use case for using --no-sync and then calling initdb again with
--sync-only.  Why wouldn't you just leave out --no-sync the first
time?

Nathan

[0] https://www.postgresql.org/docs/devel/app-initdb.html


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

Предыдущее
От: Zhihong Yu
Дата:
Сообщение: Re: Have I found an interval arithmetic bug?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Rename of triggers for partitioned tables