From da31c5ed79d93bb02d6ff9cd81497e5151de7b63 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 9 May 2015 14:11:31 -0400 Subject: [PATCH] doc: adjust ordering of pg_stat_statement paragraphs Clarify installation instructions Patch by Ian Barwick --- doc/src/sgml/pgstatstatements.sgml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index 04b3f01ed5c..4d7a6e68ea2 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -19,12 +19,22 @@ This means that a server restart is needed to add or remove the module. + + When pg_stat_statements is loaded, it tracks + statistics across all databases of the server. To access and manipulate + these statistics, the module provides a view, pg_stat_statements, + and the utility functions pg_stat_statements_reset and + pg_stat_statements. These are not available globally but + can be enabled for a specific database with + CREATE EXTENSION pg_stat_statements. + + The <structname>pg_stat_statements</structname> View The statistics gathered by the module are made available via a - system view named pg_stat_statements. This view + view named pg_stat_statements. This view contains one row for each distinct database ID, user ID and query ID (up to the maximum number of distinct statements that the module can track). The columns of the view are shown in @@ -215,20 +225,10 @@ - - This view, and the functions pg_stat_statements_reset - and pg_stat_statements, are available only in - databases they have been specifically installed into by installing - the pg_stat_statements extension. - However, statistics are tracked across all databases of the server - whenever the pg_stat_statements module is loaded - into the server, regardless of presence of the view. - - For security reasons, non-superusers are not allowed to see the SQL - text or queryid of queries executed by other users. They can see - the statistics, however, if the view has been installed in their + text or queryid of queries executed by other users. + They can see the statistics, however, if the view has been installed in their database.