git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d2a1ed1)
Typo and doc fixups for memory context reporting
2025年4月30日 09:10:27 +0000 (11:10 +0200)
2025年4月30日 09:10:27 +0000 (11:10 +0200)
This fixes comment and docs typos as well as a small documentation
change to make it clearer. Found via post-commit review.

Author: Rahila Syed <rahilasyed90@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAH2L28vt16C9xTuK+K7QZvtA3kCNWXOEiT=gEekUw3Xxp9LVQw@mail.gmail.com


diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 574a544d9fa4bf4d71467ab68fb11adfdc3cb757..af3d056b9923724666c02edde2edbf54f9bb429c 100644 (file)
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -28780,8 +28780,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
indicate the number aggregated child contexts. When
<parameter>summary</parameter> is <literal>false</literal>,
<literal>the num_agg_contexts</literal> value is <literal>1</literal>,
- indicating that individual statistics are being displayed. The levels
- are limited to the first 100 contexts.
+ indicating that individual statistics are being displayed.
</para>
<para>
Busy processes can delay reporting memory context statistics,
@@ -28796,7 +28795,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
statistics are aggregated and a cumulative total is displayed. The
<literal>num_agg_contexts</literal> column indicates the number of
contexts aggregated in the displayed statistics. When
- <literal>num_agg_contexts</literal> is <literal>1</literal> is means
+ <literal>num_agg_contexts</literal> is <literal>1</literal> it means
that the context statistics are displayed separately.
</para></entry>
</row>
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 786e92039b1b3c3a3886fb46c9f9703cd7328a74..69884701fb4f4c1fe14b12349148d8f57fe52f49 100644 (file)
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -1493,8 +1493,8 @@ ProcessGetMemoryContextInterrupt(void)
/*
* Create a DSA and send handle to the client process after storing the
- * context statistics. If number of contexts exceed a predefined
- * limit(8MB), a cumulative total is stored for such contexts.
+ * context statistics. If number of contexts exceed a predefined limit
+ * (1MB), a cumulative total is stored for such contexts.
*/
if (memCxtArea->memstats_dsa_handle == DSA_HANDLE_INVALID)
{
@@ -1512,8 +1512,10 @@ ProcessGetMemoryContextInterrupt(void)
/*
* Pin the DSA area, this is to make sure the area remains attachable
- * even if current backend exits. This is done so that the statistics
- * are published even if the process exits while a client is waiting.
+ * even if the backend that created it exits. This is done so that the
+ * statistics are published even if the process exits while a client
+ * is waiting. Also, other processes that publish statistics will use
+ * the same area.
*/
dsa_pin(MemoryStatsDsaArea);
@@ -1580,7 +1582,7 @@ ProcessGetMemoryContextInterrupt(void)
cxt_id = cxt_id + 1;
/*
- * Copy statistics for each of TopMemoryContexts children. This
+ * Copy statistics for each of TopMemoryContexts children. This
* includes statistics of at most 100 children per node, with each
* child node limited to a depth of 100 in its subtree.
*/
@@ -1609,9 +1611,9 @@ ProcessGetMemoryContextInterrupt(void)
}
memCxtState[idx].total_stats = cxt_id;
+ /* Notify waiting backends and return */
end_memorycontext_reporting();
- /* Notify waiting backends and return */
hash_destroy(context_id_lookup);
return;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /