Code cleanup. Remove unused pgBackupGetPath() function

This commit is contained in:
anastasia
2021-02-02 19:12:08 +03:00
parent 2ae2908ea7
commit 0fd2fdeec0
5 changed files with 1 additions and 15 deletions
+1 -1
View File
@@ -1774,7 +1774,7 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn,
if (!exclusive_backup)
{
Assert(PQnfields(res) >= 4);
pgBackupGetPath(backup, path, lengthof(path), DATABASE_DIR);
pgBackupGetPath2(backup, path, lengthof(path), DATABASE_DIR, NULL);
/* Write backup_label */
join_path_components(backup_label, path, PG_BACKUP_LABEL_FILE);
-10
View File
@@ -2710,16 +2710,6 @@ pgBackupCompareIdDesc(const void *l, const void *r)
return -pgBackupCompareId(l, r);
}
/*
* Construct absolute path of the backup directory.
* If subdir is not NULL, it will be appended after the path.
*/
void
pgBackupGetPath(const pgBackup *backup, char *path, size_t len, const char *subdir)
{
pgBackupGetPath2(backup, path, len, subdir, NULL);
}
/*
* Construct absolute path of the backup directory.
* Append "subdir1" and "subdir2" to the backup directory.
-1
View File
@@ -1880,7 +1880,6 @@ read_database_map(pgBackup *backup)
char path[MAXPGPATH];
char database_map_path[MAXPGPATH];
// pgBackupGetPath(backup, path, lengthof(path), DATABASE_DIR);
join_path_components(path, backup->root_dir, DATABASE_DIR);
join_path_components(database_map_path, path, DATABASE_MAP);
-2
View File
@@ -944,8 +944,6 @@ extern void pgBackupWriteControl(FILE *out, pgBackup *backup, bool utc);
extern void write_backup_filelist(pgBackup *backup, parray *files,
const char *root, parray *external_list, bool sync);
extern void pgBackupGetPath(const pgBackup *backup, char *path, size_t len,
const char *subdir);
extern void pgBackupGetPath2(const pgBackup *backup, char *path, size_t len,
const char *subdir1, const char *subdir2);
extern void pgBackupCreateDir(pgBackup *backup, const char *backup_instance_path);
-1
View File
@@ -205,7 +205,6 @@ pgBackupValidate(pgBackup *backup, pgRestoreParams *params)
{
char path[MAXPGPATH];
//pgBackupGetPath(backup, path, lengthof(path), DATABASE_FILE_LIST);
join_path_components(path, backup->root_dir, DATABASE_FILE_LIST);
if (pgFileSize(path) >= (BLCKSZ*500))