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

From: vignesh C <vignesh21(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: 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 05:32:32
Message-ID: CALDaNm3KdAim6-2Wf9oqjebBdCbuaUPHhbUGMRexkpk-h6k2WQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 21 Feb 2025 at 14:25, Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear Ashutosh,
>
> Thanks for the reply.
>
> > > ISTM the inconsistency is introduced since the initial commit. I think they should
> > be unified either
> > > 1) update the doc or 2) accept when -d is not specified. Personally, I like 2nd
> > approach, pg_recvlogical
> > > can follow the normal connection rule. I.e.,
> > >
> >
> > Given that the discrepancy has survived so long, it seems that users
> > always pass -d. And to some extent, requiring users to specify a
> > database instead of defaulting to one is safer practice. This avoids
> > users fetching changes from unexpected database/slot and cause further
> > database inconsistencies on the receiver side. I would just fix
> > documentation in this case.
>
> Something like attached, right?

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

Regards,
Vignesh

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-03-12 05:37:11 Re: per backend WAL statistics
Previous Message Hayato Kuroda (Fujitsu) 2025-03-12 05:29:37 RE: Documentation Edits for pg_createsubscriber