Postgresql – How to monitor PostgreSQL queries

monitoringpostgresql

I have an application which uses PostgreSQL. I want to monitor all the queries that the application sends to the database. Is there a way to monitor the queries sent?

Best Answer

You can point pgAdmin4 at your PostgreSQL server, it has a dashboard you can use. You can then drill down in a session to see the query.

If thats not what you are looking for then I guess a logging solution would be what you need like pg_stat_statements.