]> granicus.if.org Git - postgresql/commitdiff
Add verbosity to pg_basebackup for sync
authorMichael Paquier <michael@paquier.xyz>
Sat, 28 Jul 2018 22:53:11 +0000 (07:53 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sat, 28 Jul 2018 22:53:11 +0000 (07:53 +0900)
This is useful to know when the data copy has been finished.  The
current situation can be confusing for users as the last message is
"waiting for background process to finish streaming", so it looks like
this is taking time but the final sync is instead.

Author: Jeff Janes
Discussion: https://postgr.es/m/CAMkU=1ypeoMJ=tFBG8vP13sxEtXd4Pm_x1SqsJdW_RvzpcvN=A@mail.gmail.com

src/bin/pg_basebackup/pg_basebackup.c

index ef4cfc43847bd744c6c84e614314311bf58cc95f..96a4dce4bf458c2a8c38e073634b802391fcd54e 100644 (file)
@@ -2112,6 +2112,9 @@ BaseBackup(void)
         */
        if (do_sync)
        {
+               if (verbose)
+                       fprintf(stderr,
+                                       _("%s: syncing data to disk ...\n"), progname);
                if (format == 't')
                {
                        if (strcmp(basedir, "-") != 0)