Re: fairywren is generating bogus BASE_BACKUP commands - Mailing list pgsql-hackers

From Tom Lane
Subject Re: fairywren is generating bogus BASE_BACKUP commands
Date
Msg-id 1288811.1642804531@sss.pgh.pa.us
Whole thread Raw
In response to Re: fairywren is generating bogus BASE_BACKUP commands  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jan 21, 2022 at 5:09 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> While we're on the subject of ill-chosen option syntax: "-cfast"
>> with non double dashes?  Really?  That's horribly ambiguous.

> I'm not sure whether you're complaining that we accept that syntax or
> using it, but AFAIK I'm responsible for neither. I think the syntax
> has been accepted since pg_basebackup was added in 2011, and Andres
> added it to this test case earlier this week (with -cfast in the
> subject line of the commit message).

pg_basebackup's help defines the syntax as

  -c, --checkpoint=fast|spread
                         set fast or spread checkpointing

which I'd read as requiring a space (or possibly equal sign)
between "-c" and "fast".  If it works as written in this test,
that's an accident of the particular getopt implementation,
and I'll bet it won't be too long before we come across
a getopt that doesn't like it.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: fairywren is generating bogus BASE_BACKUP commands
Next
From: Tom Lane
Date:
Subject: Re: Document atthasmissing default optimization avoids verification table scan