Fix bug in 9.1 pg_upgrade processing of old/new relations; adjust debug
output.
This commit is contained in:
parent
89c29c0331
commit
1cc19cc358
@ -48,7 +48,7 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
|
||||
for (relnum = 0; relnum < old_db->rel_arr.nrels; relnum++)
|
||||
{
|
||||
RelInfo *old_rel = &old_db->rel_arr.rels[relnum];
|
||||
RelInfo *new_rel = &old_db->rel_arr.rels[relnum];
|
||||
RelInfo *new_rel = &new_db->rel_arr.rels[relnum];
|
||||
|
||||
if (old_rel->reloid != new_rel->reloid)
|
||||
pg_log(PG_FATAL, "mismatch of relation id: database \"%s\", old relid %d, new relid %d\n",
|
||||
@ -147,7 +147,8 @@ get_db_and_rel_infos(ClusterInfo *cluster)
|
||||
{
|
||||
int dbnum;
|
||||
|
||||
free_db_and_rel_infos(&cluster->dbarr);
|
||||
if (cluster->dbarr.dbs != NULL)
|
||||
free_db_and_rel_infos(&cluster->dbarr);
|
||||
|
||||
get_db_infos(cluster);
|
||||
|
||||
@ -156,7 +157,7 @@ get_db_and_rel_infos(ClusterInfo *cluster)
|
||||
|
||||
if (log_opts.debug)
|
||||
{
|
||||
pg_log(PG_DEBUG, "%s databases\n", CLUSTER_NAME(cluster));
|
||||
pg_log(PG_DEBUG, "\n%s databases:\n", CLUSTER_NAME(cluster));
|
||||
print_db_infos(&cluster->dbarr);
|
||||
}
|
||||
}
|
||||
@ -319,6 +320,7 @@ free_db_and_rel_infos(DbInfoArr *db_arr)
|
||||
for (dbnum = 0; dbnum < db_arr->ndbs; dbnum++)
|
||||
free_rel_infos(&db_arr->dbs[dbnum].rel_arr);
|
||||
pg_free(db_arr->dbs);
|
||||
db_arr->dbs = NULL;
|
||||
db_arr->ndbs = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user