File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Pool(object):
3737 'select size, twice_used, dirty from public.mamonsu_buffer_cache()'
3838 ),
3939 'wal_lag_lsn' : (
40- "SELECT application_name, " \
40+ "SELECT CONCAT(application_name, ' ', pid) as application_name, " \
4141 " flush_lag, replay_lag, write_lag, " \
4242 " pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn) AS total_lag " \
4343 " FROM pg_stat_replication;" ,
@@ -46,7 +46,7 @@ class Pool(object):
4646 " FROM public.mamonsu_count_wal_lag_lsn()"
4747 ),
4848 'xlog_lag_lsn' : (
49- "SELECT application_name, " \
49+ "SELECT CONCAT(application_name, ' ', pid) as application_name, " \
5050 "pg_xlog_location_diff(pg_current_xlog_location(), replay_location) AS total_lag " \
5151 "FROM pg_stat_replication;" ,
5252 "SELECT application_name, total_lag " \
Original file line number Diff line number Diff line change 127127CREATE OR REPLACE FUNCTION public.mamonsu_count_{3}_lag_lsn()
128128RETURNS TABLE(application_name TEXT, {8} total_lag NUMERIC ) AS $$
129129SELECT
130- application_name,
130+ CONCAT(application_name, ' ', pid) as application_name,
131131{6}
132132pg_{7}_diff(pg_current_{7}(), replay_{9}) AS total_lag
133133FROM pg_stat_replication
You can’t perform that action at this time.
0 commit comments