File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ select case when pg_is_in_recovery() then ' Replica' || ' (delay: '
2+ || ((((case
3+ when pg_last_xlog_receive_location() = pg_last_xlog_replay_location() then 0
4+ else extract (epoch from now() - pg_last_xact_replay_timestamp())
5+ end)::int )::text || ' second' )::interval)::text
6+ || ' ; paused: ' || pg_is_xlog_replay_paused()::text || ' )'
7+ else ' Master'
8+ end as " Node Information" ;
Original file line number Diff line number Diff line change 11\echo Menu:
2- \echo ' 1 – Database object sizes '
2+ \echo ' 1 – Master / replica info (with lag) '
33\echo ' 2 – Bloat'
44\echo ' 3 – pg_stat_statementis'
55\echo ' q – Quit from this tool'
@@ -13,20 +13,21 @@ select
1313 :d_stp::text = '3' as d_step_is_3,
1414 :d_stp::text = 'q' as d_step_is_q \gset
1515\if :d_step_is_1
16- \echo ' 1 is chosen!'
16+ \i ./general/basic.sql
1717 \prompt 'Press any key…' d_dummy
18- \i index.sql
18+ \i ./ index.psql
1919\elif :d_step_is_2
2020 \echo ' 2 is chosen!'
2121 \prompt 'Press any key…' d_dummy
22- \i index.sql
22+ \i ./ index.psql
2323\elif :d_step_is_3
2424 \echo ' 3 is chosen!'
2525 \prompt 'Press any key…' d_dummy
26- \i index.sql
26+ \i ./ index.psql
2727\elif :d_step_is_q
2828 \echo '...bye!'
2929\else
3030 \echo 'ERROR: Unkown option!'
31- \i index.sql
31+ \i ./ index.psql
3232\endif
33+
You can’t perform that action at this time.
0 commit comments