On 2025/03/12 14:59, David G. Johnston wrote:
On Monday, February 24, 2025, Hayato Kuroda (Fujitsu) <kuroda.hay...@fujitsu.com <mailto:kuroda.hay...@fujitsu.com>> wrote: OK, so I will exclude the point in the thread. The patch I've posted contains all of fixes which is required. The patch fixes the synopsis and the mention of the default value. Only the later is required. I cannot figure out a policy that would alter the synopsis in the proposed manner. I’d suggest leaving it alone for now and tweak any of the option descriptions that may need clarification.
I agree that the synopsis doesn't need to be updated. Attached patch clarifies the required options for each action in the documentation. Thought? BTW, I'm curious why --dbname isn't required for the --drop-slot action. When I ran pg_recvlogical --drop-slot without --dbname, I got the following error: pg_recvlogical: error: could not establish database-specific replication connection Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
From 8dcc53a6bebeaa1c4d0ddaacd35a3c450327bfef Mon Sep 17 00:00:00 2001 From: Fujii Masao <fu...@postgresql.org> Date: Tue, 18 Mar 2025 10:07:08 +0900 Subject: [PATCH v2] doc: Clarify required options for each action in pg_recvlogical Each pg_recvlogical action requires specific options. For example, --slot, --dbname, and --file must be specified with the --start action. Previously, the documentation did not clearly outline these requirements. This commit updates the documentation to explicitly state the necessary options for each action. --- doc/src/sgml/ref/pg_recvlogical.sgml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml index 95eb14b6352..2946bdae1e5 100644 --- a/doc/src/sgml/ref/pg_recvlogical.sgml +++ b/doc/src/sgml/ref/pg_recvlogical.sgml @@ -73,6 +73,11 @@ PostgreSQL documentation by <option>--dbname</option>. </para> + <para> + The <option>--slot</option> and <option>--dbname</option> are required + for this action. + </para> + <para> The <option>--two-phase</option> can be specified with <option>--create-slot</option> to enable decoding of prepared transactions. @@ -87,6 +92,10 @@ PostgreSQL documentation Drop the replication slot with the name specified by <option>--slot</option>, then exit. </para> + + <para> + The <option>--slot</option> is required for this action. + </para> </listitem> </varlistentry> @@ -101,6 +110,11 @@ PostgreSQL documentation <option>--no-loop</option> is specified. </para> + <para> + The <option>--slot</option> and <option>--dbname</option>, + <option>--file</option> are required for this action. + </para> + <para> The stream format is determined by the output plugin specified when the slot was created. @@ -159,6 +173,9 @@ PostgreSQL documentation Write received and decoded transaction data into this file. Use <literal>-</literal> for <systemitem>stdout</systemitem>. </para> + <para> + This parameter is required for <option>--start</option>. + </para> </listitem> </varlistentry> @@ -265,6 +282,9 @@ PostgreSQL documentation mode, create the slot with this name. In <option>--drop-slot</option> mode, delete the slot with this name. </para> + <para> + This parameter is required for any of actions. + </para> </listitem> </varlistentry> @@ -305,7 +325,11 @@ PostgreSQL documentation The <replaceable>dbname</replaceable> can be a <link linkend="libpq-connstring">connection string</link>. If so, connection string parameters will override any conflicting - command line options. Defaults to the user name. + command line options. + </para> + <para> + This parameter is required for <option>--create-slot</option> + and <option>--start</option>. </para> </listitem> </varlistentry> -- 2.48.1