Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 418 Bytes

README.md

File metadata and controls

16 lines (9 loc) · 418 Bytes

this code uses pg_stat_statements extension to monitor users queries

to use pg_stat_statements you should follow steps below:

  1. CREATE EXTENSION pg_stat_statements;

in the database you want to monitor.

  1. Additionally you will have to edit the following line in postgresql.conf

shared_preload_libraries = ''

To

shared_preload_libraries = 'pg_stat_statements'

  1. A restart of the PSQL service is required.