Ctrl o
for temporal switch to terminal's primary screen. In primary screen you can see psql
session. After pressing any key, the terminal switch to alternative screen with pspg
.
Thanks to Tomas Munro work, the psql
\watch
command will supports pagers (in PostgreSQL 15). In this time only pspg
can do this work (in streaming mode). When you set environment variable PSQL_WATCH_PAGER
, the \watch
command redirects otputs to specified pager (for pspg
export PSQL_WATCH_PAGER="pspg --stream"
. Next you can run command:
select * from pg_stat_database \watch 5or
select * from pg_stat_activity where state='active' \watch 1
No comments:
Post a Comment