@@ -50,50 +50,13 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
5050RelInfo * old_rel = & old_db -> rel_arr .rels [relnum ];
5151RelInfo * new_rel ;
5252
53- /* toast tables are handled by their parents */
54- if (strcmp (old_rel -> nspname ,"pg_toast" )== 0 )
55- continue ;
56-
5753/* old/new relation names always match */
5854new_rel = relarr_lookup_rel_name (& new_cluster ,& new_db -> rel_arr ,
5955old_rel -> nspname ,old_rel -> relname );
6056
6157create_rel_filename_map (old_pgdata ,new_pgdata ,old_db ,new_db ,
6258old_rel ,new_rel ,maps + num_maps );
6359num_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- }
9760}
9861
9962* nmaps = num_maps ;