]> granicus.if.org Git - postgresql/commitdiff
In initdb.c, move auth warning code into main() from secondary function.
authorBruce Momjian <bruce@momjian.us>
Tue, 4 Dec 2012 14:52:00 +0000 (09:52 -0500)
committerBruce Momjian <bruce@momjian.us>
Tue, 4 Dec 2012 14:52:00 +0000 (09:52 -0500)
src/bin/initdb/initdb.c

index d44281bece08ba30bf3a3519818102c77db8ac7c..40740dcb7234389023bf8358007f343a23b885a4 100644 (file)
@@ -3411,14 +3411,6 @@ initialize_data_directory(void)
        make_template0();
 
        make_postgres();
-
-       if (do_sync)
-               perform_fsync();
-       else
-               printf(_("\nSync to disk skipped.\nThe data directory might become corrupt if the operating system crashes.\n"));
-
-       if (authwarning != NULL)
-               fprintf(stderr, "%s", authwarning);
 }
 
 
@@ -3647,6 +3639,14 @@ main(int argc, char *argv[])
 
        initialize_data_directory();
        
+       if (do_sync)
+               perform_fsync();
+       else
+               printf(_("\nSync to disk skipped.\nThe data directory might become corrupt if the operating system crashes.\n"));
+
+       if (authwarning != NULL)
+               fprintf(stderr, "%s", authwarning);
+
        /* Get directory specification used to start this executable */
        strlcpy(bin_dir, argv[0], sizeof(bin_dir));
        get_parent_directory(bin_dir);