Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23f4eaa

Browse files
committed
Add --disable-ptrack-clear for postgres without ptrack.
1 parent20a892e commit23f4eaa

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

‎backup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
146146
}
147147

148148
/* clear ptrack files for FULL and DIFF backup */
149-
if (current.backup_mode!=BACKUP_MODE_DIFF_PTRACK)
149+
if (current.backup_mode!=BACKUP_MODE_DIFF_PTRACK&& !disable_ptrack_clear)
150150
pg_ptrack_clear();
151151

152152
/* start stream replication */

‎expected/option.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Common Options:
1818
-c, --check show what would have been done
1919
-j, --threads=NUM num threads for backup and restore
2020
--stream use stream for save/restore WAL during backup
21+
--disable-ptrack-clear disable clear ptrack for postgres without ptrack
2122

2223
Backup options:
2324
-b, --backup-mode=MODE full,page,ptrack

‎pg_arman.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static intkeep_data_generations = KEEP_INFINITE;
3636
staticintkeep_data_days=KEEP_INFINITE;
3737
intnum_threads=1;
3838
boolstream_wal= false;
39+
booldisable_ptrack_clear= false;
3940
staticboolbackup_validate= false;
4041

4142
/* restore configuration */
@@ -60,6 +61,7 @@ static pgut_option options[] =
6061
{'b','c',"check",&check },
6162
{'i','j',"threads",&num_threads },
6263
{'b',8,"stream",&stream_wal },
64+
{'b',9,"disable-ptrack-clear",&disable_ptrack_clear },
6365
/* backup options */
6466
{'f','b',"backup-mode",opt_backup_mode,SOURCE_ENV },
6567
{'b','C',"smooth-checkpoint",&smooth_checkpoint,SOURCE_ENV },
@@ -232,6 +234,7 @@ pgut_help(bool details)
232234
printf(_(" -c, --check show what would have been done\n"));
233235
printf(_(" -j, --threads=NUM num threads for backup and restore\n"));
234236
printf(_(" --stream use stream for save/restore WAL during backup\n"));
237+
printf(_(" --disable-ptrack-clear disable clear ptrack for postgres without ptrack\n"));
235238
printf(_("\nBackup options:\n"));
236239
printf(_(" -b, --backup-mode=MODE full,page,ptrack\n"));
237240
printf(_(" -C, --smooth-checkpoint do smooth checkpoint before backup\n"));

‎pg_arman.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ extern parray *backup_files_list;
210210

211211
externintnum_threads;
212212
externboolstream_wal;
213+
externbooldisable_ptrack_clear;
213214

214215
/* in backup.c */
215216
externintdo_backup(pgBackupOptionbkupopt);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp