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

Commit3c74ebf

Browse files
committed
Add --start-time option for backup
1 parent5f2283c commit3c74ebf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/pg_probackup.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pid_t my_pid = 0;
7878
__threadintmy_thread_num=1;
7979
boolprogress= false;
8080
boolno_sync= false;
81+
time_tstart_time=0;
8182
#ifPG_VERSION_NUM >=100000
8283
char*replication_slot=NULL;
8384
booltemp_slot= false;
@@ -200,6 +201,7 @@ static ConfigOption cmd_options[] =
200201
{'s','i',"backup-id",&backup_id_string,SOURCE_CMD_STRICT },
201202
{'b',133,"no-sync",&no_sync,SOURCE_CMD_STRICT },
202203
{'b',134,"no-color",&no_color,SOURCE_CMD_STRICT },
204+
{'U',241,"start-time",&start_time,SOURCE_CMD_STRICT },
203205
/* backup options */
204206
{'b',180,"backup-pg-log",&backup_logs,SOURCE_CMD_STRICT },
205207
{'f','b',"backup-mode",opt_backup_mode,SOURCE_CMD_STRICT },
@@ -939,10 +941,9 @@ main(int argc, char *argv[])
939941
returndo_init(catalogState);
940942
caseBACKUP_CMD:
941943
{
942-
time_tstart_time;
943-
time(&start_time);
944-
945944
current.stream=stream_wal;
945+
if (start_time==0)
946+
start_time=current_time;
946947

947948
/* sanity */
948949
if (current.backup_mode==BACKUP_MODE_INVALID)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp