On Sat, Oct 4, 2014 at 9:24 AM, Michael Paquier <michael.paqu...@gmail.com>
wrote:

>
>
> On Sat, Oct 4, 2014 at 6:48 AM, Andres Freund <and...@2ndquadrant.com>
> wrote:
>
>> On 2014-10-03 14:02:08 -0400, Robert Haas wrote:
>> > On Fri, Oct 3, 2014 at 7:57 AM, Andres Freund <and...@2ndquadrant.com>
>> wrote:
>> > > I do wonder whether --create/--drop aren't somewhat wierd for
>> > > pg_receivexlog. It's not that clear what it means. It'd be ugly, but
>> we
>> > > could rename them --create-slot/drop-slot.
>> >
>> > +1 on doing it, -1 on it being ugly.
>>
>> The reason I'm calling it uglyu is that it's different from
>> pg_recvlogical. We could change it there, too? A bit late, but probably
>> better than having a discrepancy forever
>>
> I'm on board to make things as consistent as possible between both
> utilities, the only reason why --create/--drop are used in my patch is for
> the sake of consistency btw. 9.4 ship has not sailed yet, and IMO it is
> important from the user prospective if options are a maximum consistent
> between pg_receivexlog and pg_recvlogical. That would be even better if
> change is done before 9.4beta3 shows up, and I doubt that there are many
> users using the --create/--drop options already.
>
And as I am on it, attached is a patch that can be applied to master and
REL9_4_STABLE to rename the --create and --drop to --create-slot and
--drop-slot.
Regards,
-- 
Michael
diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml
index 76240fe..ec28ff4 100644
--- a/doc/src/sgml/ref/pg_recvlogical.sgml
+++ b/doc/src/sgml/ref/pg_recvlogical.sgml
@@ -53,7 +53,7 @@ PostgreSQL documentation
     <variablelist>
 
      <varlistentry>
-      <term><option>--create</option></term>
+      <term><option>--create-slot</option></term>
       <listitem>
        <para>
         Create a new logical replication slot with the name specified in
@@ -82,7 +82,7 @@ PostgreSQL documentation
      </varlistentry>
 
      <varlistentry>
-      <term><option>--drop</option></term>
+      <term><option>--drop-slot</option></term>
       <listitem>
        <para>
         Drop the replication slot with the name specified
@@ -266,8 +266,8 @@ PostgreSQL documentation
       <listitem>
        <para>
         In <option>--start</option> mode, use the existing logical replication slot named
-        <replaceable>slot_name</replaceable>. In <option>--create</option> mode, create the
-        slot with this name. In <option>--drop</option> mode, delete the slot with this name.
+        <replaceable>slot_name</replaceable>. In <option>--create-slot</option> mode, create the
+        slot with this name. In <option>--drop-slot</option> mode, delete the slot with this name.
        </para>
       </listitem>
      </varlistentry>
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index c48cecc..585d7b0 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -91,8 +91,8 @@ usage(void)
 			 "                         time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
 	printf(_("  -S, --slot=SLOT        name of the logical replication slot\n"));
 	printf(_("\nAction to be performed:\n"));
-	printf(_("      --create           create a new replication slot (for the slot's name see --slot)\n"));
-	printf(_("      --start            start streaming in a replication slot (for the slot's name see --slot)\n"));
+	printf(_("      --create-slot      create a new replication slot (for the slot's name see --slot)\n"));
+	printf(_("      --start-slot       start streaming in a replication slot (for the slot's name see --slot)\n"));
 	printf(_("      --drop             drop the replication slot (for the slot's name see --slot)\n"));
 	printf(_("\nReport bugs to <pgsql-b...@postgresql.org>.\n"));
 }
@@ -618,9 +618,9 @@ main(int argc, char **argv)
 		{"status-interval", required_argument, NULL, 's'},
 		{"slot", required_argument, NULL, 'S'},
 /* action */
-		{"create", no_argument, NULL, 1},
+		{"create-slot", no_argument, NULL, 1},
 		{"start", no_argument, NULL, 2},
-		{"drop", no_argument, NULL, 3},
+		{"drop-slot", no_argument, NULL, 3},
 		{NULL, 0, NULL, 0}
 	};
 	int			c;
@@ -814,7 +814,7 @@ main(int argc, char **argv)
 
 	if (do_drop_slot && (do_create_slot || do_start_slot))
 	{
-		fprintf(stderr, _("%s: cannot use --create or --start together with --drop\n"), progname);
+		fprintf(stderr, _("%s: cannot use --create-slot or --start-slot together with --drop\n"), progname);
 		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
 				progname);
 		exit(1);
@@ -822,7 +822,7 @@ main(int argc, char **argv)
 
 	if (startpos != InvalidXLogRecPtr && (do_create_slot || do_drop_slot))
 	{
-		fprintf(stderr, _("%s: cannot use --create or --drop together with --startpos\n"), progname);
+		fprintf(stderr, _("%s: cannot use --create-slot or --drop-slot together with --startpos\n"), progname);
 		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
 				progname);
 		exit(1);
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to