mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-07 14:18:17 +02:00
Add --disable-ptrack-clear for postgres without ptrack.
This commit is contained in:
parent
20a892e4e0
commit
23f4eaa8e5
2
backup.c
2
backup.c
@ -146,7 +146,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
|
||||
}
|
||||
|
||||
/* clear ptrack files for FULL and DIFF backup */
|
||||
if (current.backup_mode != BACKUP_MODE_DIFF_PTRACK)
|
||||
if (current.backup_mode != BACKUP_MODE_DIFF_PTRACK && !disable_ptrack_clear)
|
||||
pg_ptrack_clear();
|
||||
|
||||
/* start stream replication */
|
||||
|
@ -18,6 +18,7 @@ Common Options:
|
||||
-c, --check show what would have been done
|
||||
-j, --threads=NUM num threads for backup and restore
|
||||
--stream use stream for save/restore WAL during backup
|
||||
--disable-ptrack-clear disable clear ptrack for postgres without ptrack
|
||||
|
||||
Backup options:
|
||||
-b, --backup-mode=MODE full,page,ptrack
|
||||
|
@ -36,6 +36,7 @@ static int keep_data_generations = KEEP_INFINITE;
|
||||
static int keep_data_days = KEEP_INFINITE;
|
||||
int num_threads = 1;
|
||||
bool stream_wal = false;
|
||||
bool disable_ptrack_clear = false;
|
||||
static bool backup_validate = false;
|
||||
|
||||
/* restore configuration */
|
||||
@ -60,6 +61,7 @@ static pgut_option options[] =
|
||||
{ 'b', 'c', "check", &check },
|
||||
{ 'i', 'j', "threads", &num_threads },
|
||||
{ 'b', 8, "stream", &stream_wal },
|
||||
{ 'b', 9, "disable-ptrack-clear", &disable_ptrack_clear },
|
||||
/* backup options */
|
||||
{ 'f', 'b', "backup-mode", opt_backup_mode, SOURCE_ENV },
|
||||
{ 'b', 'C', "smooth-checkpoint", &smooth_checkpoint, SOURCE_ENV },
|
||||
@ -232,6 +234,7 @@ pgut_help(bool details)
|
||||
printf(_(" -c, --check show what would have been done\n"));
|
||||
printf(_(" -j, --threads=NUM num threads for backup and restore\n"));
|
||||
printf(_(" --stream use stream for save/restore WAL during backup\n"));
|
||||
printf(_(" --disable-ptrack-clear disable clear ptrack for postgres without ptrack\n"));
|
||||
printf(_("\nBackup options:\n"));
|
||||
printf(_(" -b, --backup-mode=MODE full,page,ptrack\n"));
|
||||
printf(_(" -C, --smooth-checkpoint do smooth checkpoint before backup\n"));
|
||||
|
@ -210,6 +210,7 @@ extern parray *backup_files_list;
|
||||
|
||||
extern int num_threads;
|
||||
extern bool stream_wal;
|
||||
extern bool disable_ptrack_clear;
|
||||
|
||||
/* in backup.c */
|
||||
extern int do_backup(pgBackupOption bkupopt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user