Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7b70df

Browse files
committed
Fix pg_upgrade to print the proper database name for file transfer
failures.
1 parenta3375be commitf7b70df

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎contrib/pg_upgrade/info.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
107107
if (strcmp(old_rel->nspname,new_rel->nspname)!=0||
108108
strcmp(old_rel->relname,new_rel->relname)!=0)
109109
pg_log(PG_FATAL,"mismatch of relation id: database \"%s\", old rel %s.%s, new rel %s.%s\n",
110-
old_db,old_rel->nspname,old_rel->relname,
110+
old_db->db_name,old_rel->nspname,old_rel->relname,
111111
new_rel->nspname,new_rel->relname);
112112

113113
/* used only for logging and error reporing, old/new are identical */
@@ -188,8 +188,8 @@ get_db_infos(ClusterInfo *cluster)
188188
/* we don't preserve pg_database.oid so we sort by name */
189189
"ORDER BY 2");
190190

191-
i_datname=PQfnumber(res,"datname");
192191
i_oid=PQfnumber(res,"oid");
192+
i_datname=PQfnumber(res,"datname");
193193
i_spclocation=PQfnumber(res,"spclocation");
194194

195195
ntups=PQntuples(res);
@@ -198,7 +198,6 @@ get_db_infos(ClusterInfo *cluster)
198198
for (tupnum=0;tupnum<ntups;tupnum++)
199199
{
200200
dbinfos[tupnum].db_oid=atooid(PQgetvalue(res,tupnum,i_oid));
201-
202201
snprintf(dbinfos[tupnum].db_name,sizeof(dbinfos[tupnum].db_name),"%s",
203202
PQgetvalue(res,tupnum,i_datname));
204203
snprintf(dbinfos[tupnum].db_tblspace,sizeof(dbinfos[tupnum].db_tblspace),"%s",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp