Show all queries running in PostgreSQL database

Sometimes its useful to check what all queries are running in the database when debugging.
Using tcpdump command we can do this.
So for postgresql just execute this command in terminal

sudo tcpdump -i lo -s0 -nl -w- dst port postgres | strings -n8

This will show all queries running in database.

No comments:

Post a Comment