Friday, July 16, 2021

pspg 5.1.2 was released, psql \watch command now supports pspg

Today I released pspg 5.1.2. Mostly this is bugfix and refactoring release, but there is one, I hope, interesting function. You can try to press 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 5
or
select * from pg_stat_activity where state='active' \watch 1

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home