| | |
| | | static char *system_constraints_file; |
| | | static char *system_functions_file; |
| | | static char *system_views_file; |
| | | static char *rudb_init_file; |
| | | static bool success = false; |
| | | static bool made_new_pgdata = false; |
| | | static bool found_existing_pgdata = false; |
| | |
| | | conflines = replace_guc_value(conflines, gnames->str, |
| | | gvalues->str, false); |
| | | } |
| | | |
| | | |
| | | /* Append auto-configured recommended parameters */ |
| | | if (autoconfig) |
| | | conflines = initdb_autoconfig_update(conflines); |
| | |
| | | |
| | | for (char **line = lines; *line != NULL; line++) |
| | | { |
| | | PG_CMD_PUTS(*line); |
| | | /* Ignore empty lines. They upset backend for some reason */ |
| | | if (strcmp(*line, "\n") != 0) |
| | | { |
| | | PG_CMD_PUTS(*line); |
| | | } |
| | | free(*line); |
| | | } |
| | | |
| | |
| | | set_input(&system_constraints_file, "system_constraints.sql"); |
| | | set_input(&system_functions_file, "system_functions.sql"); |
| | | set_input(&system_views_file, "system_views.sql"); |
| | | set_input(&rudb_init_file, "init.sql"); |
| | | |
| | | if (show_setting || debug) |
| | | { |
| | |
| | | check_input(system_constraints_file); |
| | | check_input(system_functions_file); |
| | | check_input(system_views_file); |
| | | check_input(rudb_init_file); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | load_plpgsql(cmdfd); |
| | | |
| | | setup_run_file(cmdfd, rudb_init_file); |
| | | |
| | | vacuum_db(cmdfd); |
| | | |
| | | make_template0(cmdfd); |