From 4b52c3d6dd142264ba29ac592a881232492d6d89 Mon Sep 17 00:00:00 2001 From: "Imseih (AWS)" Date: Tue, 28 Feb 2023 16:39:40 -0600 Subject: [PATCH 1/1] doc update regarding pg_stat_statements normalization. It is quite possible that a query text willl not normalize (replace constants with $1, $2..) when there is a high rate pgss_hash deallocation. This commit calls this out in docs. --- doc/src/sgml/pgstatstatements.sgml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index efc36da602..39e2f8eaec 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -516,6 +516,16 @@ pg_stat_statements entry. + + Text for a plannable query 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 happening, consider + increasing pg_stat_statements.max. + The pg_stat_statements_info view, discussed below + in , + 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)