|
7 | 7 |
|
8 | 8 | select pg_size_pretty(b.backup_streamed) as pretty_backup_streamed, |
9 | 9 | pg_size_pretty(b.backup_total) as pretty_backup_total, |
10 | | - a.query_start, |
| 10 | + a.query_start::timestamp(0) as query_start, |
11 | 11 | e.duration, |
12 | 12 | round(e.progress_percent, 4) as progress_percent, |
13 | 13 | bytes_per_second, |
14 | | - (e2.estimated_duration || 'sec')::interval as estimated_duration, |
15 | | - a.query_start + (e2.estimated_duration || 'sec')::interval as estimated_query_end |
| 14 | + (e2.estimated_duration || 'sec')::interval(0) as estimated_duration, |
| 15 | + a.query_start + (e2.estimated_duration || 'sec')::interval(0) as estimated_query_end |
16 | 16 | from pg_stat_progress_basebackup as b |
17 | 17 | inner join pg_stat_activity as a on a.pid = b.pid |
18 | 18 | cross join lateral ( |
19 | 19 | select |
20 | | - NOW() - a.query_start as duration, |
| 20 | + (NOW() - a.query_start)::interval(0) as duration, |
21 | 21 | b.backup_streamed * 100.0 / b.backup_total as progress_percent |
22 | 22 | ) as e |
23 | 23 | cross join lateral ( |
|
0 commit comments