Re: pg_recvlogical requires -d but not described on the documentation
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-12T06:08:34Z
Lists: 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.
Commits
-
Allow pg_recvlogical --drop-slot to work without --dbname.
- c68100aa4313 18.0 landed
-
doc: Clarify required options for each action in pg_recvlogical.
- dfc13428a908 18.0 landed
-
Refactor replication connection code of various pg_basebackup utilities.
- 0c013e08cfbe 9.5.0 cited