Re: Long options for pg_ctl waiting

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Vik Fearing <vik(at)2ndquadrant(dot)fr>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Long options for pg_ctl waiting
Date: 2016-09-07 19:38:28
Message-ID: 9fbc9667-ea0b-97e9-137d-b0a75efa9faa@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/09/16 07:31, Robert Haas wrote:
> On Sat, Sep 3, 2016 at 7:13 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> On Sun, Sep 4, 2016 at 5:57 AM, Vik Fearing <vik(at)2ndquadrant(dot)fr> wrote:
>>> One thing that has been irking me ever since I came to PostgreSQL is the
>>> fact that pg_ctl -w (and -W) don't have longhand equivalents. I like to
>>> use the long version in scripts and such as extra documentation, and
>>> I've never been able to with these. What's more, I keep forgetting that
>>> --wait (and --no-wait) aren't a thing.
>>>
>>> Trivial patch attached.
>> Nit: Like --nosync we could use --nowait, without an hyphen.
> But is that actually better? I think that the idea of omitting the
> dash here is one of those things that sounds good at first, and then
> later you realize that it was actually a dumb idea all along. If
> somebody has an option for --body or --on or --table and has to negate
> it by running --nobody or --noon or --notable, some confusion may
> result, because in each case you get a word that is not really the
> logical inverse of the original option. Also, if you end up with any
> multi-word options, like --save-backup-files, then users wonder why
> the opposite, --nosave-backup-files, has a dash between words 2 and 3
> and between words 3 and 4, but not between words 1 and 2. I suggest
> we'd do better to standardize on always including a dash in such
> cases.
>
+1

possibly '--nosync' (& any similar) should have a '--no-sync' variation
added, with the '--nosync' variation documented as depreciated?

Cheers,
Gavin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-09-07 19:46:29 Re: autonomous transactions
Previous Message Robert Haas 2016-09-07 19:31:13 Re: Long options for pg_ctl waiting