@@ -50,50 +50,13 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
50
50
RelInfo * old_rel = & old_db -> rel_arr .rels [relnum ];
51
51
RelInfo * new_rel ;
52
52
53
- /* toast tables are handled by their parents */
54
- if (strcmp (old_rel -> nspname ,"pg_toast" )== 0 )
55
- continue ;
56
-
57
53
/* old/new relation names always match */
58
54
new_rel = relarr_lookup_rel_name (& new_cluster ,& new_db -> rel_arr ,
59
55
old_rel -> nspname ,old_rel -> relname );
60
56
61
57
create_rel_filename_map (old_pgdata ,new_pgdata ,old_db ,new_db ,
62
58
old_rel ,new_rel ,maps + num_maps );
63
59
num_maps ++ ;
64
-
65
- /*
66
- * So much for mapping this relation; now we need a mapping
67
- * for its corresponding toast relation and toast index, if any.
68
- */
69
- if (old_rel -> toastrelid > 0 )
70
- {
71
- char old_name [MAXPGPATH ],new_name [MAXPGPATH ];
72
- RelInfo * old_toast ,* new_toast ;
73
-
74
- /* use the toast relids from the rel_arr for lookups */
75
- old_toast = relarr_lookup_rel_oid (& old_cluster ,& old_db -> rel_arr ,
76
- old_rel -> toastrelid );
77
- new_toast = relarr_lookup_rel_oid (& new_cluster ,& new_db -> rel_arr ,
78
- new_rel -> toastrelid );
79
-
80
- create_rel_filename_map (old_pgdata ,new_pgdata ,old_db ,new_db ,
81
- old_toast ,new_toast ,maps + num_maps );
82
- num_maps ++ ;
83
-
84
- /* toast indexes are the same, except with an "_index" suffix */
85
- snprintf (old_name ,sizeof (old_name ),"%s_index" ,old_toast -> relname );
86
- snprintf (new_name ,sizeof (new_name ),"%s_index" ,new_toast -> relname );
87
-
88
- old_toast = relarr_lookup_rel_name (& old_cluster ,& old_db -> rel_arr ,
89
- "pg_toast" ,old_name );
90
- new_toast = relarr_lookup_rel_name (& new_cluster ,& new_db -> rel_arr ,
91
- "pg_toast" ,new_name );
92
-
93
- create_rel_filename_map (old_pgdata ,new_pgdata ,old_db ,
94
- new_db ,old_toast ,new_toast ,maps + num_maps );
95
- num_maps ++ ;
96
- }
97
60
}
98
61
99
62
* nmaps = num_maps ;