/* * get_db_and_rel_infos() * * higher level routine to generate dbinfos for the database running * on the given "port". Assumes that server is already running. */ void get_db_and_rel_infos(ClusterInfo *cluster) { int dbnum; if (cluster->dbarr.dbs != NULL) free_db_and_rel_infos(&cluster->dbarr); get_db_infos(cluster); for (dbnum = 0; dbnum < cluster->dbarr.ndbs; dbnum++) get_rel_infos(cluster, &cluster->dbarr.dbs[dbnum]); pg_log(PG_VERBOSE, "\n%s databases:\n", CLUSTER_NAME(cluster)); if (log_opts.verbose) print_db_infos(&cluster->dbarr); }
/* * get_db_and_rel_infos() * * higher level routine to generate dbinfos for the database running * on the given "port". Assumes that server is already running. */ void get_db_and_rel_infos(ClusterInfo *cluster) { int dbnum; if (cluster->dbarr.dbs != NULL) free_db_and_rel_infos(&cluster->dbarr); get_db_infos(cluster); for (dbnum = 0; dbnum < cluster->dbarr.ndbs; dbnum++) get_rel_infos(cluster, &cluster->dbarr.dbs[dbnum]); if (cluster == &old_cluster) pg_log(PG_VERBOSE, "\nsource databases:\n"); else pg_log(PG_VERBOSE, "\ntarget databases:\n"); if (log_opts.verbose) print_db_infos(&cluster->dbarr); }