@@ -2741,33 +2741,6 @@ pgBackupGetPath2(const pgBackup *backup, char *path, size_t len,
27412741 base36enc (backup -> start_time ), subdir1 , subdir2 );
27422742}
27432743
2744- /*
2745- * independent from global variable backup_instance_path
2746- * Still depends from backup_path
2747- */
2748- void
2749- pgBackupGetPathInInstance (const char * instance_name ,
2750- const pgBackup * backup , char * path , size_t len ,
2751- const char * subdir1 , const char * subdir2 )
2752- {
2753- char backup_instance_path [MAXPGPATH ];
2754-
2755- sprintf (backup_instance_path , "%s/%s/%s" ,
2756- backup_path , BACKUPS_DIR , instance_name );
2757-
2758- /* If "subdir1" is NULL do not check "subdir2" */
2759- if (!subdir1 )
2760- snprintf (path , len , "%s/%s" , backup_instance_path ,
2761- base36enc (backup -> start_time ));
2762- else if (!subdir2 )
2763- snprintf (path , len , "%s/%s/%s" , backup_instance_path ,
2764- base36enc (backup -> start_time ), subdir1 );
2765- /* "subdir1" and "subdir2" is not NULL */
2766- else
2767- snprintf (path , len , "%s/%s/%s/%s" , backup_instance_path ,
2768- base36enc (backup -> start_time ), subdir1 , subdir2 );
2769- }
2770-
27712744/*
27722745 * Check if multiple backups consider target backup to be their direct parent
27732746 */
@@ -2917,26 +2890,6 @@ is_parent(time_t parent_backup_time, pgBackup *child_backup, bool inclusive)
29172890 return false;
29182891}
29192892
2920- /*
2921- * Return backup index number.
2922- * Note: this index number holds true until new sorting of backup list
2923- */
2924- int
2925- get_backup_index_number (parray * backup_list , pgBackup * backup )
2926- {
2927- int i ;
2928-
2929- for (i = 0 ; i < parray_num (backup_list ); i ++ )
2930- {
2931- pgBackup * tmp_backup = (pgBackup * ) parray_get (backup_list , i );
2932-
2933- if (tmp_backup -> start_time == backup -> start_time )
2934- return i ;
2935- }
2936- elog (WARNING , "Failed to find backup %s" , base36enc (backup -> start_time ));
2937- return -1 ;
2938- }
2939-
29402893/* On backup_list lookup children of target_backup and append them to append_list */
29412894void
29422895append_children (parray * backup_list , pgBackup * target_backup , parray * append_list )
0 commit comments