Re: pg_recvlogical requires -d but not described on the documentation - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: pg_recvlogical requires -d but not described on the documentation
Date
Msg-id CAKFQuwZhcsxD=P+Eqb8RgU8DKUP+uzQ-NF9cqYtqM_uhum+-jw@mail.gmail.com
Whole thread Raw
In response to Re: pg_recvlogical requires -d but not described on the documentation  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Tuesday, March 11, 2025, vignesh C <vignesh21@gmail.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.

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_recvlogical requires -d but not described on the documentation
Next
From: Andrey Borodin
Date:
Subject: Re: Elimination of the repetitive code at the SLRU bootstrap functions.