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

Commita5a1016

Browse files
author
Artur Zakirov
committed
Merge branch 'master' of git.postgrespro.ru:pgpro-dev/pg_probackup
2 parents2671a0c +10334c9 commita5a1016

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎show.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include"pg_probackup.h"
12+
#include<time.h>
1213

1314
staticvoidshow_backup_list(FILE*out,parray*backup_list);
1415
staticvoidshow_backup_detail(FILE*out,pgBackup*backup);
@@ -188,9 +189,9 @@ show_backup_list(FILE *out, parray *backup_list)
188189
inti;
189190

190191
/* show header */
191-
fputs("=========================================================================================================\n",out);
192-
fputs("ID Recovery time Mode Current/Parent TLI Time Data start_lsn stop_lsn Status \n",out);
193-
fputs("=========================================================================================================\n",out);
192+
fputs("=============================================================================================================\n",out);
193+
fputs("ID Recovery time Mode Current/Parent TLI TimeData start_lsn stop_lsn Status \n",out);
194+
fputs("=============================================================================================================\n",out);
194195

195196
for (i=0;i<parray_num(backup_list);i++)
196197
{
@@ -204,8 +205,8 @@ show_backup_list(FILE *out, parray *backup_list)
204205
if (backup->recovery_time!= (time_t)0)
205206
time2iso(timestamp,lengthof(timestamp),backup->recovery_time);
206207
if (backup->end_time!= (time_t)0)
207-
snprintf(duration,lengthof(duration),"%lum",
208-
(backup->end_time-backup->start_time) /60);
208+
snprintf(duration,lengthof(duration),"%.*lf s",0,
209+
difftime(backup->end_time,backup->start_time));
209210

210211
/*
211212
* Calculate Data field, in the case of full backup this shows the
@@ -218,7 +219,7 @@ show_backup_list(FILE *out, parray *backup_list)
218219
/* Get parent timeline before printing */
219220
parent_tli=get_parent_tli(backup->tli);
220221

221-
fprintf(out,"%-8s %-19s %-13s %2d /%2d %5s %6s %X/%X %X/%X %s \n",
222+
fprintf(out,"%-8s %-19s %-13s %2d /%2d %-10s %6s %X/%X %X/%X %s \n",
222223
base36enc(backup->start_time),
223224
timestamp,
224225
modes[backup->backup_mode+ (BACKUP_MODE_FULL+1)*backup->stream],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp