public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 2/3] fix 3+ messages / 3 participants [nested] [flat]
* [PATCH 2/3] fix @ 2020-06-15 10:28 Your Name <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Your Name @ 2020-06-15 10:28 UTC (permalink / raw) --- src/bin/pg_dump/t/002_pg_dump.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl index 8c89488a12..d28988b870 100644 --- a/src/bin/pg_dump/t/002_pg_dump.pl +++ b/src/bin/pg_dump/t/002_pg_dump.pl @@ -154,6 +154,8 @@ my %pgdump_runs = ( test_key => 'defaults', dump_cmd => [ [ 'pg_dump', '-Fc', '-Z6', '--no-sync', 'postgres', ], + '|', + [ 'perl', '-pe', '', ], '>', "$tempdir/defaults_custom_format_no_seek_parallel_restore.dump", # stdout disables seeking ], restore_cmd => [ -- 2.24.2 --K3vkeaB0MlFjg8U+-- ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Enhancing Memory Context Statistics Reporting @ 2025-04-29 13:13 Rahila Syed <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Rahila Syed @ 2025-04-29 13:13 UTC (permalink / raw) To: Daniel Gustafsson <[email protected]>; +Cc: pgsql-hackers Hi, Please find attached a patch with some comments and documentation changes. Additionaly, added a missing '\0' termination to "Remaining Totals" string. I think this became necessary after we replaced dsa_allocate0() with dsa_allocate() is the latest version. Thank you, Rahila Syed Attachments: [application/octet-stream] 0001-Fix-typos-and-modify-few-comments.patch (3.5K, ../../CAH2L28vt16C9xTuK+K7QZvtA3kCNWXOEiT=gEekUw3Xxp9LVQw@mail.gmail.com/3-0001-Fix-typos-and-modify-few-comments.patch) download | inline diff: From 9f1c04c156a65f31c9036d242295bd3e11c00e98 Mon Sep 17 00:00:00 2001 From: Rahila Syed <[email protected]> Date: Tue, 29 Apr 2025 14:20:32 +0530 Subject: [PATCH] Fix typos and modify few comments. Add a missing null termination. --- doc/src/sgml/func.sgml | 5 ++--- src/backend/utils/mmgr/mcxt.c | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 574a544d9fa..af3d056b992 100644 --- 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 506f2902986..63c53c1552a 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -1494,7 +1494,7 @@ 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. + * 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); @@ -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; @@ -1663,6 +1665,7 @@ ProcessGetMemoryContextInterrupt(void) meminfo[max_stats - 1].name = dsa_allocate(MemoryStatsDsaArea, namelen + 1); nameptr = dsa_get_address(MemoryStatsDsaArea, meminfo[max_stats - 1].name); strncpy(nameptr, "Remaining Totals", namelen); + nameptr[namelen] = '\0'; meminfo[max_stats - 1].ident = InvalidDsaPointer; meminfo[max_stats - 1].path = InvalidDsaPointer; meminfo[max_stats - 1].type = 0; -- 2.34.1 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Enhancing Memory Context Statistics Reporting @ 2025-04-30 10:14 Peter Eisentraut <[email protected]> parent: Rahila Syed <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2025-04-30 10:14 UTC (permalink / raw) To: Rahila Syed <[email protected]>; Daniel Gustafsson <[email protected]>; +Cc: pgsql-hackers On 29.04.25 15:13, Rahila Syed wrote: > Please find attached a patch with some comments and documentation changes. > Additionaly, added a missing '\0' termination to "Remaining Totals" string. > I think this became necessary after we replaced dsa_allocate0() > with dsa_allocate() is the latest version. > strncpy(nameptr, "Remaining Totals", namelen); > + nameptr[namelen] = '\0'; Looks like a case for strlcpy()? ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-04-30 10:14 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-06-15 10:28 [PATCH 2/3] fix Your Name <[email protected]> 2025-04-29 13:13 Re: Enhancing Memory Context Statistics Reporting Rahila Syed <[email protected]> 2025-04-30 10:14 ` Re: Enhancing Memory Context Statistics Reporting Peter Eisentraut <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox