|
270 | 270 | </para> |
271 | 271 |
|
272 | 272 | <para> |
273 | | - Consumers of <literal>pg_stat_statements</> may wish to use |
| 273 | + Consumers of <structname>pg_stat_statements</> may wish to use |
274 | 274 | <structfield>queryid</> (perhaps in combination with |
275 | 275 | <structfield>dbid</> and <structfield>userid</>) as a more stable |
276 | 276 | and reliable identifier for each entry than its query text. |
|
280 | 280 | post-parse-analysis tree, its value is a function of, among other |
281 | 281 | things, the internal object identifiers appearing in this representation. |
282 | 282 | This has some counterintuitive implications. For example, |
283 | | - <literal>pg_stat_statements</> will consider two apparently-identical |
| 283 | + <filename>pg_stat_statements</> will consider two apparently-identical |
284 | 284 | queries to be distinct, if they reference a table that was dropped |
285 | 285 | and recreated between the executions of the two queries. |
286 | 286 | The hashing process is also sensitive to differences in |
|
300 | 300 | not be a useful identifier for accumulating costs across a set of logical |
301 | 301 | replicas. If in doubt, direct testing is recommended. |
302 | 302 | </para> |
| 303 | + |
| 304 | + <para> |
| 305 | + The representative query texts are kept in an external disk file, and do |
| 306 | + not consume shared memory. Therefore, even very lengthy query texts can |
| 307 | + be stored successfully. However, if many long query texts are |
| 308 | + accumulated, the external file might grow unmanageably large. As a |
| 309 | + recovery method if that happens, <filename>pg_stat_statements</> may |
| 310 | + choose to discard the query texts, whereupon all existing entries in |
| 311 | + the <structname>pg_stat_statements</> view will show |
| 312 | + null <structfield>query</> fields, though the statistics associated with |
| 313 | + each <structfield>queryid</> are preserved. If this happens, consider |
| 314 | + reducing <varname>pg_stat_statements.max</varname> to prevent |
| 315 | + recurrences. |
| 316 | + </para> |
303 | 317 | </sect2> |
304 | 318 |
|
305 | 319 | <sect2> |
|
0 commit comments