@@ -356,15 +356,30 @@ pgBackupWriteResultSection(FILE *out, pgBackup *backup)
356
356
backup -> start_lsn .xrecoff );
357
357
fprintf (out ,"STOP_LSN=%x/%08x\n" ,backup -> stop_lsn .xlogid ,
358
358
backup -> stop_lsn .xrecoff );
359
+
359
360
time2iso (timestamp ,lengthof (timestamp ),backup -> start_time );
360
361
fprintf (out ,"START_TIME='%s'\n" ,timestamp );
361
- time2iso (timestamp ,lengthof (timestamp ),backup -> end_time );
362
- fprintf (out ,"END_TIME='%s'\n" ,timestamp );
363
- fprintf (out ,"TOTAL_DATA_BYTES=" INT64_FORMAT "\n" ,backup -> total_data_bytes );
364
- fprintf (out ,"READ_DATA_BYTES=" INT64_FORMAT "\n" ,backup -> read_data_bytes );
365
- fprintf (out ,"READ_ARCLOG_BYTES=" INT64_FORMAT "\n" ,backup -> read_arclog_bytes );
366
- fprintf (out ,"READ_SRVLOG_BYTES=" INT64_FORMAT "\n" ,backup -> read_srvlog_bytes );
367
- fprintf (out ,"WRITE_BYTES=" INT64_FORMAT "\n" ,backup -> write_bytes );
362
+ if (backup -> end_time > 0 )
363
+ {
364
+ time2iso (timestamp ,lengthof (timestamp ),backup -> end_time );
365
+ fprintf (out ,"END_TIME='%s'\n" ,timestamp );
366
+ }
367
+
368
+ if (backup -> total_data_bytes != BYTES_INVALID )
369
+ fprintf (out ,"TOTAL_DATA_BYTES=" INT64_FORMAT "\n" ,
370
+ backup -> total_data_bytes );
371
+ if (backup -> read_data_bytes != BYTES_INVALID )
372
+ fprintf (out ,"READ_DATA_BYTES=" INT64_FORMAT "\n" ,
373
+ backup -> read_data_bytes );
374
+ if (backup -> read_arclog_bytes != BYTES_INVALID )
375
+ fprintf (out ,"READ_ARCLOG_BYTES=" INT64_FORMAT "\n" ,
376
+ backup -> read_arclog_bytes );
377
+ if (backup -> read_srvlog_bytes != BYTES_INVALID )
378
+ fprintf (out ,"READ_SRVLOG_BYTES=" INT64_FORMAT "\n" ,
379
+ backup -> read_srvlog_bytes );
380
+ if (backup -> write_bytes != BYTES_INVALID )
381
+ fprintf (out ,"WRITE_BYTES=" INT64_FORMAT "\n" ,
382
+ backup -> write_bytes );
368
383
369
384
fprintf (out ,"BLOCK_SIZE=%u\n" ,backup -> block_size );
370
385
fprintf (out ,"XLOG_BLOCK_SIZE=%u\n" ,backup -> wal_block_size );