@@ -1201,7 +1201,7 @@ add_files(parray *files, const char *root, bool add_root, bool is_pgdata)
12011201dir_list_file (list_file ,root ,pgdata_exclude , true,add_root );
12021202
12031203/* mark files that are possible datafile as 'datafile' */
1204- for (i = 0 ;i < parray_num (list_file );i ++ )
1204+ for (i = 0 ;i < ( int ) parray_num (list_file );i ++ )
12051205{
12061206pgFile * file = (pgFile * )parray_get (list_file ,i );
12071207char * relative ;
@@ -1221,6 +1221,8 @@ add_files(parray *files, const char *root, bool add_root, bool is_pgdata)
12211221continue ;
12221222
12231223path_len = strlen (file -> path );
1224+
1225+ /* Get link ptrack file to realations files */
12241226if (path_len > 6 && strncmp (file -> path + (path_len - 6 ),"ptrack" ,6 )== 0 )
12251227{
12261228pgFile * search_file ;
@@ -1254,6 +1256,10 @@ add_files(parray *files, const char *root, bool add_root, bool is_pgdata)
12541256continue ;
12551257}
12561258
1259+ /* compress map file it is not data file */
1260+ if (path_len > 4 && strncmp (file -> path + (path_len - 4 ),".cfm" ,4 )== 0 )
1261+ continue ;
1262+
12571263/* name of data file start with digit */
12581264fname = last_dir_separator (relative );
12591265if (fname == NULL )
@@ -1286,6 +1292,27 @@ add_files(parray *files, const char *root, bool add_root, bool is_pgdata)
12861292file -> segno = (int )strtol (text_segno ,NULL ,10 );
12871293}
12881294}
1295+
1296+ /* mark cfs relations as not data */
1297+ for (i = 0 ;i < (int )parray_num (list_file );i ++ )
1298+ {
1299+ pgFile * file = (pgFile * )parray_get (list_file ,i );
1300+ int path_len = (int )strlen (file -> path );
1301+
1302+ if (path_len > 4 && strncmp (file -> path + (path_len - 4 ),".cfm" ,4 )== 0 )
1303+ {
1304+ pgFile * * pre_search_file ;
1305+ pgFile tmp_file ;
1306+ tmp_file .path = pg_strdup (file -> path );
1307+ tmp_file .path [path_len - 4 ]= '\0' ;
1308+ pre_search_file = (pgFile * * )parray_bsearch (list_file ,& tmp_file ,pgFileComparePath );
1309+ if (pre_search_file != NULL )
1310+ {
1311+ (* pre_search_file )-> is_datafile = false;
1312+ }
1313+ pg_free (tmp_file .path );
1314+ }
1315+ }
12891316parray_concat (files ,list_file );
12901317}
12911318