Docs: explain contrib/pg_stat_statements' handling of GC failure.
authorTom Lane
Mon, 5 Oct 2015 16:44:12 +0000 (12:44 -0400)
committerTom Lane
Mon, 5 Oct 2015 16:44:12 +0000 (12:44 -0400)
Failure to perform garbage collection now has a user-visible effect, so
explain that and explain that reducing pgss_max is the way to prevent it.
Per gripe from Andrew Dunstan.

doc/src/sgml/pgstatstatements.sgml

index 4d7a6e68ea2125cd4ad34e661da91f1d3dd4c58d..d4f09fc2a3a1653c4ea021f4d4c51e194c39d60b 100644 (file)
   
 
   
-   Consumers of <literal>pg_stat_statements may wish to use
+   Consumers of <structname>pg_stat_statements may wish to use
    queryid (perhaps in combination with
    dbid and userid) as a more stable
    and reliable identifier for each entry than its query text.
    post-parse-analysis tree, its value is a function of, among other
    things, the internal object identifiers appearing in this representation.
    This has some counterintuitive implications.  For example,
-   <literal>pg_stat_statements will consider two apparently-identical
+   <filename>pg_stat_statements will consider two apparently-identical
    queries to be distinct, if they reference a table that was dropped
    and recreated between the executions of the two queries.
    The hashing process is also sensitive to differences in
    not be a useful identifier for accumulating costs across a set of logical
    replicas.  If in doubt, direct testing is recommended.
   
+
+  
+   The representative query texts are kept in an external disk file, and do
+   not consume shared memory.  Therefore, even very lengthy query texts can
+   be stored successfully.  However, if many long query texts are
+   accumulated, the external file might grow unmanageably large.  As a
+   recovery method if that happens, pg_stat_statements may
+   choose to discard the query texts, whereupon all existing entries in
+   the pg_stat_statements view will show
+   null query fields, though the statistics associated with
+   each queryid are preserved.  If this happens, consider
+   reducing pg_stat_statements.max to prevent
+   recurrences.
+