Re: pg_recvlogical requires -d but not described on the documentation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_recvlogical requires -d but not described on the documentation
Date: 2025-03-12 06:08:34
Message-ID: CAKFQuwZhcsxD=P+Eqb8RgU8DKUP+uzQ-NF9cqYtqM_uhum+-jw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday, March 11, 2025, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
>
> Apart from the database, I believe the target file also needs to be
> specified. Should we include this option also along with dbname:
> + <group choice="plain">
> + <group choice="req">
> + <arg choice="plain"><option>-d</option></arg>
> + <arg choice="plain"><option>--dbname</option></arg>
> + </group>
> + <replaceable>dbname</replaceable>
> + </group>
>
> pg_recvlogical -U postgres --start -S test -d postgres
> pg_recvlogical: error: no target file specified
>

To reinforce my suggestion to “do nothing” here with the synopsis; your
“show mandatory” policy would extend to “—slot” as well as communicating
that ((create OR start) XOR drop) must also be specified.

I am fine with this “show mandatory” policy in concept but doing it just
here in lieu of an acceptable “no options” policy presently doesn’t make
sense. There is debate, from me at least, whether such a command synopsis
should include both short and long options in an alternate group or just
short options, unless the option is a switch. You went with both here
which I dislike.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2025-03-12 06:25:47 Re: Elimination of the repetitive code at the SLRU bootstrap functions.
Previous Message David G. Johnston 2025-03-12 05:59:09 Re: pg_recvlogical requires -d but not described on the documentation