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

Commite66e439

Browse files
committed
Update pg_upgrade C comments.
1 parenta45beaa commite66e439

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎contrib/pg_upgrade/info.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
5454
if (strcmp(old_rel->nspname,"pg_toast")==0)
5555
continue;
5656

57+
/* old/new non-toast relation names match */
5758
new_rel=relarr_lookup_rel_name(&new_cluster,&new_db->rel_arr,
5859
old_rel->nspname,old_rel->relname);
5960

@@ -70,6 +71,7 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
7071
charold_name[MAXPGPATH],new_name[MAXPGPATH];
7172
RelInfo*old_toast,*new_toast;
7273

74+
/* use the toast relids from the rel_arr for lookups */
7375
old_toast=relarr_lookup_rel_oid(&old_cluster,&old_db->rel_arr,
7476
old_rel->toastrelid);
7577
new_toast=relarr_lookup_rel_oid(&new_cluster,&new_db->rel_arr,
@@ -79,12 +81,7 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
7981
old_toast,new_toast,maps+num_maps);
8082
num_maps++;
8183

82-
/*
83-
* We also need to provide a mapping for the index of this toast
84-
* relation. The procedure is similar to what we did above for
85-
* toast relation itself, the only difference being that the
86-
* relnames need to be appended with _index.
87-
*/
84+
/* toast indexes are the same, except with an "_index" suffix */
8885
snprintf(old_name,sizeof(old_name),"%s_index",old_toast->relname);
8986
snprintf(new_name,sizeof(new_name),"%s_index",new_toast->relname);
9087

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp