Sort pg_basebackup options better
authorPeter Eisentraut
Tue, 26 Sep 2017 15:58:22 +0000 (11:58 -0400)
committerPeter Eisentraut
Tue, 26 Sep 2017 15:58:22 +0000 (11:58 -0400)
The --slot option somehow ended up under options controlling the output,
and some other options were in a nonsensical place or were not moved
after recent renamings, so tidy all that up a bit.

doc/src/sgml/ref/pg_basebackup.sgml
src/bin/pg_basebackup/pg_basebackup.c

index 2454d35af3905259e45cf99e6d7a5b2c4c026572..b7aa128f7f7c036be3b82b2dd7dac7a858387628 100644 (file)
@@ -226,48 +226,6 @@ PostgreSQL documentation
       
      
 
-     
-      
-      
-      
-       
-        This option can only be used together with -X
-        stream.  It causes the WAL streaming to use the specified
-        replication slot.  If the base backup is intended to be used as a
-        streaming replication standby using replication slots, it should then
-        use the same replication slot name
-        in recovery.conf.  That way, it is ensured that
-        the server does not remove any necessary WAL data in the time between
-        the end of the base backup and the start of streaming replication.
-       
-       
-        If this option is not specified and the server supports temporary
-        replication slots (version 10 and later), then a temporary replication
-        slot is automatically used for WAL streaming.
-       
-      
-     
-
-     
-      
-      
-       
-        This option prevents the creation of a temporary replication slot
-        during the backup even if it's supported by the server.
-       
-       
-        Temporary replication slots are created by default if no slot name
-        is given with the option  when using log streaming.
-       
-       
-        The main purpose of this option is to allow taking a base backup when
-        the server is out of free replication slots.  Using replication slots
-        is almost always preferred, because it prevents needed WAL from being
-        removed by the server during the backup.
-       
-      
-     
-
      
       
       
@@ -453,6 +411,21 @@ PostgreSQL documentation
       
      
 
+     
+      
+      
+      
+       
+        By default, pg_basebackup will wait for all files
+        to be written safely to disk.  This option causes
+        pg_basebackup to return without waiting, which is
+        faster, but means that a subsequent operating system crash can leave
+        the base backup corrupt.  Generally, this option is useful for testing
+        but should not be used when creating a production installation.
+       
+      
+     
+
      
       
       
@@ -476,16 +449,43 @@ PostgreSQL documentation
      
 
      
-      
-      
+      
+      
       
        
-        By default, pg_basebackup will wait for all files
-        to be written safely to disk.  This option causes
-        pg_basebackup to return without waiting, which is
-        faster, but means that a subsequent operating system crash can leave
-        the base backup corrupt.  Generally, this option is useful for testing
-        but should not be used when creating a production installation.
+        This option can only be used together with -X
+        stream.  It causes the WAL streaming to use the specified
+        replication slot.  If the base backup is intended to be used as a
+        streaming replication standby using replication slots, it should then
+        use the same replication slot name
+        in recovery.conf.  That way, it is ensured that
+        the server does not remove any necessary WAL data in the time between
+        the end of the base backup and the start of streaming replication.
+       
+       
+        If this option is not specified and the server supports temporary
+        replication slots (version 10 and later), then a temporary replication
+        slot is automatically used for WAL streaming.
+       
+      
+     
+
+     
+      
+      
+       
+        This option prevents the creation of a temporary replication slot
+        during the backup even if it's supported by the server.
+       
+       
+        Temporary replication slots are created by default if no slot name
+        is given with the option  when using log streaming.
+       
+       
+        The main purpose of this option is to allow taking a base backup when
+        the server is out of free replication slots.  Using replication slots
+        is almost always preferred, because it prevents needed WAL from being
+        removed by the server during the backup.
        
       
      
index 2d039d5a33a5e2baebe7fce26dd36d64fb344594..537978090e008666b22e5f7b40b9899779f46cec 100644 (file)
@@ -336,13 +336,11 @@ usage(void)
             "                         (in kB/s, or use suffix \"k\" or \"M\")\n"));
    printf(_("  -R, --write-recovery-conf\n"
             "                         write recovery.conf for replication\n"));
-   printf(_("  -S, --slot=SLOTNAME    replication slot to use\n"));
-   printf(_("      --no-slot          prevent creation of temporary replication slot\n"));
    printf(_("  -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
             "                         relocate tablespace in OLDDIR to NEWDIR\n"));
+   printf(_("      --waldir=WALDIR    location for the write-ahead log directory\n"));
    printf(_("  -X, --wal-method=none|fetch|stream\n"
             "                         include required WAL files with specified method\n"));
-   printf(_("      --waldir=WALDIR    location for the write-ahead log directory\n"));
    printf(_("  -z, --gzip             compress tar output\n"));
    printf(_("  -Z, --compress=0-9     compress tar output with given compression level\n"));
    printf(_("\nGeneral options:\n"));
@@ -352,6 +350,8 @@ usage(void)
    printf(_("  -n, --no-clean         do not clean up after errors\n"));
    printf(_("  -N, --no-sync          do not wait for changes to be written safely to disk\n"));
    printf(_("  -P, --progress         show progress information\n"));
+   printf(_("  -S, --slot=SLOTNAME    replication slot to use\n"));
+   printf(_("      --no-slot          prevent creation of temporary replication slot\n"));
    printf(_("  -v, --verbose          output verbose messages\n"));
    printf(_("  -V, --version          output version information, then exit\n"));
    printf(_("  -?, --help             show this help, then exit\n"));