Skip to content

Commit b8d3abb

Browse files
committed
small fix
1 parent 061e4c6 commit b8d3abb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/pg_database_activity.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ if [[ ${#replication_status} >0 ]]; then
198198
(pg_wal_lsn_diff(r.write_lsn, r.flush_lsn) / 1024)::int AS FLUSH, -- disks problems
199199
(pg_wal_lsn_diff(r.flush_lsn, r.replay_lsn) / 1024)::int AS replay_lag, -- replaying_lag (disks/CPU problems)
200200
(pg_wal_lsn_diff(pg_current_wal_lsn(), r.replay_lsn))::int / 1024 AS total_lag
201-
FROM pg_stat_replication r, pg_replication_slots s
202-
WHERE r.pid = s.active_pid;" | grep -v row
201+
FROM pg_stat_replication r LEFT JOIN pg_replication_slots s ON (r.pid = s.active_pid);" | grep -v row
203202

204203
PG_LOG_LINES=$((PG_LOG_LINES-5))
205204

0 commit comments

Comments
 (0)