Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf8c115a

Browse files
Typo and doc fixups for memory context reporting
This fixes comment and docs typos as well as a small documentationchange 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
1 parentd2a1ed1 commitf8c115a

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28780,8 +28780,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
2878028780
indicate the number aggregated child contexts. When
2878128781
<parameter>summary</parameter> is <literal>false</literal>,
2878228782
<literal>the num_agg_contexts</literal> value is <literal>1</literal>,
28783-
indicating that individual statistics are being displayed. The levels
28784-
are limited to the first 100 contexts.
28783+
indicating that individual statistics are being displayed.
2878528784
</para>
2878628785
<para>
2878728786
Busy processes can delay reporting memory context statistics,
@@ -28796,7 +28795,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
2879628795
statistics are aggregated and a cumulative total is displayed. The
2879728796
<literal>num_agg_contexts</literal> column indicates the number of
2879828797
contexts aggregated in the displayed statistics. When
28799-
<literal>num_agg_contexts</literal> is <literal>1</literal>is means
28798+
<literal>num_agg_contexts</literal> is <literal>1</literal>it means
2880028799
that the context statistics are displayed separately.
2880128800
</para></entry>
2880228801
</row>

‎src/backend/utils/mmgr/mcxt.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,8 +1493,8 @@ ProcessGetMemoryContextInterrupt(void)
14931493

14941494
/*
14951495
* Create a DSA and send handle to the client process after storing the
1496-
* context statistics. If number of contexts exceed a predefined
1497-
*limit(8MB), a cumulative total is stored for such contexts.
1496+
* context statistics. If number of contexts exceed a predefined limit
1497+
*(1MB), a cumulative total is stored for such contexts.
14981498
*/
14991499
if (memCxtArea->memstats_dsa_handle==DSA_HANDLE_INVALID)
15001500
{
@@ -1512,8 +1512,10 @@ ProcessGetMemoryContextInterrupt(void)
15121512

15131513
/*
15141514
* Pin the DSA area, this is to make sure the area remains attachable
1515-
* even if current backend exits. This is done so that the statistics
1516-
* are published even if the process exits while a client is waiting.
1515+
* even if the backend that created it exits. This is done so that the
1516+
* statistics are published even if the process exits while a client
1517+
* is waiting. Also, other processes that publish statistics will use
1518+
* the same area.
15171519
*/
15181520
dsa_pin(MemoryStatsDsaArea);
15191521

@@ -1580,7 +1582,7 @@ ProcessGetMemoryContextInterrupt(void)
15801582
cxt_id=cxt_id+1;
15811583

15821584
/*
1583-
* Copy statistics for each of TopMemoryContexts children.This
1585+
* Copy statistics for each of TopMemoryContexts children.This
15841586
* includes statistics of at most 100 children per node, with each
15851587
* child node limited to a depth of 100 in its subtree.
15861588
*/
@@ -1609,9 +1611,9 @@ ProcessGetMemoryContextInterrupt(void)
16091611
}
16101612
memCxtState[idx].total_stats=cxt_id;
16111613

1614+
/* Notify waiting backends and return */
16121615
end_memorycontext_reporting();
16131616

1614-
/* Notify waiting backends and return */
16151617
hash_destroy(context_id_lookup);
16161618

16171619
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp