Re: Long options for pg_ctl waiting

From: Vik Fearing <vik(at)2ndquadrant(dot)fr>
To: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Long options for pg_ctl waiting
Date: 2016-09-07 22:57:15
Message-ID: 71015f28-7549-2c33-f9f1-a7a24b7645d9@2ndquadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/07/2016 11:39 PM, Gavin Flower wrote:
> On 08/09/16 09:08, Vik Fearing wrote:
>> On 09/07/2016 10:41 PM, Alvaro Herrera wrote:
>>> Gavin Flower wrote:
>>>
>>>> possibly '--nosync' (& any similar) should have a '--no-sync' variation
>>>> added, with the '--nosync' variation documented as depreciated?
>>> I agree -- I would go as far as just documenting --no-sync only and
>>> keeping the --nosync one working with minimal (if any) visibility in
>>> docs.
>> Okay, here's a patch to do that. I don't think it's the other patch's
>> job to do it.
>>
>> I also changed --noclean to --no-clean, and --no-locale was already
>> correct.
>
> Suggest a comment along the lines "Where flags of the form --xxx have a
> negated form, then the preferred negated form is --no-xxx - and that any
> existing use of the form --noxxx should be converted to --no-xxx, as the
> non hyphenated form is now deprecated & will be removed in a future
> version of Postgres."

I have verified that these are the only two options anywhere in the tree
that start with "no" and not "no-" so it should be pretty easy for
future options to conform on their own. I don't see adding a comment
like this to every long option definition block to be very helpful, and
only adding it to initdb is just weird. So I don't see the need for it.

> Possibly generate warningswhen the non hyphenated form is used?

I'm not quite sure how I got volunteered to do this work, but it's easy
enough so I don't mind.

Here is a new patch that emits a warning when --noclean and/or --nosync
are used.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

Attachment Content-Type Size
initdb_no_opts_02.patch invalid/octet-stream 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-07 23:05:49 Re: Long options for pg_ctl waiting
Previous Message Tom Lane 2016-09-07 21:58:42 Re: GiST penalty functions [PoC]