Skip to content

Commit a84c30d

Browse files
committed
In initdb.c, move auth warning code into main() from secondary function.
1 parent c47d261 commit a84c30d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/bin/initdb/initdb.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,14 +3411,6 @@ initialize_data_directory(void)
34113411
make_template0();
34123412

34133413
make_postgres();
3414-
3415-
if (do_sync)
3416-
perform_fsync();
3417-
else
3418-
printf(_("\nSync to disk skipped.\nThe data directory might become corrupt if the operating system crashes.\n"));
3419-
3420-
if (authwarning != NULL)
3421-
fprintf(stderr, "%s", authwarning);
34223414
}
34233415

34243416

@@ -3647,6 +3639,14 @@ main(int argc, char *argv[])
36473639

36483640
initialize_data_directory();
36493641

3642+
if (do_sync)
3643+
perform_fsync();
3644+
else
3645+
printf(_("\nSync to disk skipped.\nThe data directory might become corrupt if the operating system crashes.\n"));
3646+
3647+
if (authwarning != NULL)
3648+
fprintf(stderr, "%s", authwarning);
3649+
36503650
/* Get directory specification used to start this executable */
36513651
strlcpy(bin_dir, argv[0], sizeof(bin_dir));
36523652
get_parent_directory(bin_dir);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy