“Show Full Processlist;” Equivalent Of MySQL For PostgreSQL
How can I trace PostgreSQL queries on my Linux server as they happen like we do in MySQL by “Show Full Processlist;”?
Tagged:
0
Answers
-
MySQL has a very powerfull command through “show full processlist;", to see a list of currently running queries.
mysql mysql > show full processlist;
PostgreSQL has a similar shell to MySQL, named psql. Here’s how it works. First, change to the postgres user.
su postgres
Enter the PostgreSQL command shell.
[postgres@srv]$ psql
And perform the query to see the current activity.
postgres > select * from pg_stat_activity;
To quit the PostgreSQL shell, type "\q".
0
Howdy, Stranger!
Categories
- 94 All Categories
- 20 VoIP
- 7 SIP
- 16 asterisk
- 44 Programming
- 1 Nodejs
- 4 javascript
- 19 PHP
- 8 Codeigniter
- 14 database
- 1 UI/UX
- 2 Flutter
- 28 OS
- 26 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal