postgres | SELECT application_name, userid::regrole AS user_ | 1 | 127.0.0.1 psql | vagrant | postgres | SELECT application_name, userid AS user_name, dat | 3 | 127.0.0.1 psql | vagrant | postgres | SELECT application_name, userid AS user_name, dat | 1 | 127.0.0.1 psql | ...
Note that another way to expose most of the protected metrics for Postgres v10+ instances would be to grant the special "pg_monitor" system role to the monitoring user like in the above paragraph. To be executed on the "to be monitored" database: psql -h mydb.com -U superuser -f ...
Learn about the Top 6 Postgres log events for monitoring query performance, reducing I/O spikes and preventing downtime. In this book, we review the following events in detail: Transaction ID (TXID) Wraparound Data Corruption Checkpoints
postgres | SELECT application_name, userid::regrole AS user_ | 1 | 127.0.0.1 psql | vagrant | postgres | SELECT application_name, userid AS user_name, dat | 3 | 127.0.0.1 psql | vagrant | postgres | SELECT application_name, userid AS user_name, dat | 1 | 127.0.0.1 psql | ...