mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Report progress of streaming base backup.
This commit adds pg_stat_progress_basebackup view that reports
the progress while an application like pg_basebackup is taking
a base backup. This uses the progress reporting infrastructure
added by c16dc1aca5
, adding support for streaming base backup.
Bump catversion.
Author: Fujii Masao
Reviewed-by: Kyotaro Horiguchi, Amit Langote, Sergei Kornilov
Discussion: https://postgr.es/m/9ed8b801-8215-1f3d-62d7-65bff53f6e94@oss.nttdata.com
This commit is contained in:
@@ -119,4 +119,18 @@
|
||||
#define PROGRESS_SCAN_BLOCKS_TOTAL 15
|
||||
#define PROGRESS_SCAN_BLOCKS_DONE 16
|
||||
|
||||
/* Progress parameters for pg_basebackup */
|
||||
#define PROGRESS_BASEBACKUP_PHASE 0
|
||||
#define PROGRESS_BASEBACKUP_BACKUP_TOTAL 1
|
||||
#define PROGRESS_BASEBACKUP_BACKUP_STREAMED 2
|
||||
#define PROGRESS_BASEBACKUP_TBLSPC_TOTAL 3
|
||||
#define PROGRESS_BASEBACKUP_TBLSPC_STREAMED 4
|
||||
|
||||
/* Phases of pg_basebackup (as advertised via PROGRESS_BASEBACKUP_PHASE) */
|
||||
#define PROGRESS_BASEBACKUP_PHASE_WAIT_CHECKPOINT 1
|
||||
#define PROGRESS_BASEBACKUP_PHASE_ESTIMATE_BACKUP_SIZE 2
|
||||
#define PROGRESS_BASEBACKUP_PHASE_STREAM_BACKUP 3
|
||||
#define PROGRESS_BASEBACKUP_PHASE_WAIT_WAL_ARCHIVE 4
|
||||
#define PROGRESS_BASEBACKUP_PHASE_TRANSFER_WAL 5
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user