Re: fairywren is generating bogus BASE_BACKUP commands

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: fairywren is generating bogus BASE_BACKUP commands
Date: 2022-01-21 22:35:31
Message-ID: 1288811.1642804531@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jan 21, 2022 at 5:09 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-01-21 22:38:32 Re: Document atthasmissing default optimization avoids verification table scan
Previous Message Andrew Dunstan 2022-01-21 22:35:16 Re: fairywren is generating bogus BASE_BACKUP commands