Cleanup ClusterInfo initialization in pg_upgrade
This commit is contained in:
parent
3a087369c0
commit
b4a7e5980b
@ -22,6 +22,12 @@ static void free_rel_infos(RelInfoArr *rel_arr);
|
||||
static void print_db_infos(DbInfoArr *dbinfo);
|
||||
static void print_rel_infos(RelInfoArr *arr);
|
||||
|
||||
void
|
||||
initialize_cluster_info(ClusterInfo *cluster)
|
||||
{
|
||||
cluster->dbarr.ndbs = 0;
|
||||
cluster->dbarr.dbs = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* gen_db_file_maps()
|
||||
|
@ -63,9 +63,10 @@ main(int argc, char **argv)
|
||||
char *deletion_script_file_name = NULL;
|
||||
bool live_check = false;
|
||||
|
||||
initialize_cluster_info(&old_cluster);
|
||||
initialize_cluster_info(&new_cluster);
|
||||
|
||||
parseCommandLine(argc, argv);
|
||||
old_cluster.dbarr.ndbs = 0;
|
||||
new_cluster.dbarr.ndbs = 0;
|
||||
|
||||
output_check_banner(&live_check);
|
||||
|
||||
|
@ -326,6 +326,7 @@ void check_loadable_libraries(void);
|
||||
|
||||
/* info.c */
|
||||
|
||||
void initialize_cluster_info(ClusterInfo *cluster);
|
||||
FileNameMap *gen_db_file_maps(DbInfo *old_db,
|
||||
DbInfo *new_db, int *nmaps, const char *old_pgdata,
|
||||
const char *new_pgdata);
|
||||
|
Loading…
x
Reference in New Issue
Block a user