@@ -1493,8 +1493,8 @@ ProcessGetMemoryContextInterrupt(void)
1493
1493
1494
1494
/*
1495
1495
* 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.
1498
1498
*/
1499
1499
if (memCxtArea -> memstats_dsa_handle == DSA_HANDLE_INVALID )
1500
1500
{
@@ -1512,8 +1512,10 @@ ProcessGetMemoryContextInterrupt(void)
1512
1512
1513
1513
/*
1514
1514
* 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.
1517
1519
*/
1518
1520
dsa_pin (MemoryStatsDsaArea );
1519
1521
@@ -1580,7 +1582,7 @@ ProcessGetMemoryContextInterrupt(void)
1580
1582
cxt_id = cxt_id + 1 ;
1581
1583
1582
1584
/*
1583
- * Copy statistics for each of TopMemoryContexts children. This
1585
+ * Copy statistics for each of TopMemoryContexts children. This
1584
1586
* includes statistics of at most 100 children per node, with each
1585
1587
* child node limited to a depth of 100 in its subtree.
1586
1588
*/
@@ -1609,9 +1611,9 @@ ProcessGetMemoryContextInterrupt(void)
1609
1611
}
1610
1612
memCxtState [idx ].total_stats = cxt_id ;
1611
1613
1614
+ /* Notify waiting backends and return */
1612
1615
end_memorycontext_reporting ();
1613
1616
1614
- /* Notify waiting backends and return */
1615
1617
hash_destroy (context_id_lookup );
1616
1618
1617
1619
return ;
0 commit comments