How it works...
In our opinion, the first set of instructions should not be required. The pg_stat_statements module is so valuable that we feel everyone can benefit from its contents. In any case, the first thing we must do is add pg_stat_statements to the shared_preload_libraries configuration setting. Several PostgreSQL modules are only available after being added this way.
The next step is only necessary if we are running a version older than PostgreSQL 9.2. The custom_variable_classes setting allows us to further configure the pg_stat_statements module later. Current versions of PostgreSQL will handle this for us.
As the pg_stat_statements module depends on activating an external library, we must restart PostgreSQL for it to take effect. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access