From 1ecedf4e61171d2f02d513f7f83eed46ddbee5e3 Mon Sep 17 00:00:00 2001 From: "Imseih (AWS)" Date: Fri, 24 Feb 2023 14:22:39 -0600 Subject: [PATCH 1/1] doc update regarding pg_stat_statements normalization. It is quite possible that possible willl not normalize (replace constants with $1, $2..) when there is a high rate of deallocation. This commit calls this out in docs. --- doc/src/sgml/pgstatstatements.sgml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index efc36da602..4857f1b89e 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -516,6 +516,15 @@ pg_stat_statements entry. + + A query text may be observed with constants in + pg_stat_statements, especially when there is a high + rate of entry deallocations. To reduce the likelihood of this occuring, consider + increasing pg_stat_statements.max. + The pg_stat_statements_info view provides entry + deallocation statistics. + + In some cases, queries with visibly different texts might get merged into a single pg_stat_statements entry. Normally this will happen -- 2.37.1 (Apple Git-137.1)