|
242 | 242 | </para>
|
243 | 243 |
|
244 | 244 | <para>
|
245 |
| - Consumers of <literal>pg_stat_statements</> may wish to use |
| 245 | + Consumers of <structname>pg_stat_statements</> may wish to use |
246 | 246 | <structfield>queryid</> (perhaps in combination with
|
247 | 247 | <structfield>dbid</> and <structfield>userid</>) as a more stable
|
248 | 248 | and reliable identifier for each entry than its query text.
|
|
252 | 252 | post-parse-analysis tree, its value is a function of, among other
|
253 | 253 | things, the internal object identifiers appearing in this representation.
|
254 | 254 | This has some counterintuitive implications. For example,
|
255 |
| - <literal>pg_stat_statements</> will consider two apparently-identical |
| 255 | + <filename>pg_stat_statements</> will consider two apparently-identical |
256 | 256 | queries to be distinct, if they reference a table that was dropped
|
257 | 257 | and recreated between the executions of the two queries.
|
258 | 258 | The hashing process is also sensitive to differences in
|
|
272 | 272 | not be a useful identifier for accumulating costs across a set of logical
|
273 | 273 | replicas. If in doubt, direct testing is recommended.
|
274 | 274 | </para>
|
| 275 | + |
| 276 | + <para> |
| 277 | + The representative query texts are kept in an external disk file, and do |
| 278 | + not consume shared memory. Therefore, even very lengthy query texts can |
| 279 | + be stored successfully. However, if many long query texts are |
| 280 | + accumulated, the external file might grow unmanageably large. As a |
| 281 | + recovery method if that happens, <filename>pg_stat_statements</> may |
| 282 | + choose to discard the query texts, whereupon all existing entries in |
| 283 | + the <structname>pg_stat_statements</> view will show |
| 284 | + null <structfield>query</> fields, though the statistics associated with |
| 285 | + each <structfield>queryid</> are preserved. If this happens, consider |
| 286 | + reducing <varname>pg_stat_statements.max</varname> to prevent |
| 287 | + recurrences. |
| 288 | + </para> |
275 | 289 | </sect2>
|
276 | 290 |
|
277 | 291 | <sect2>
|
|
0 commit comments