From: | Rahila Syed <rahilasyed90(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tomas(at)vondra(dot)me> |
Cc: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improve monitoring of shared memory allocations |
Date: | 2025-04-01 07:43:21 |
Message-ID: | CAH2L28vaktm0UXw19y22w+DThcqV80-UKtVfMxPeVw8ro2yTDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I think it's almost committable. Attached is v8 with some minor review
> adjustments, and updated commit messages. Please read through those and
> feel free to suggest changes.
>
>
The changes look good to me.
About the following question.
/* XXX what about segment size? should check have HASH_SEGMENT? */
Do you mean for a shared hash table should the caller have specified
HASH_SEGMENT
in flags?
It appears that the current code does not require this change. All the
shared hash tables seem
to have the default segment size.
I left the comment as it is as I am not sure if you intend to remove it or
not.
> I still found the hash_get_init_size() comment unclear, and it also
> referenced init_size, which is no longer relevant. I improved the
> comment a bit (I find it useful to mimic comments of nearby functions,
> so I did that too here). The "initial_elems" name was a bit confusing,
> as it seemed to suggest "number of elements", but it's a simple flag. So
> I renamed it to "prealloc", which seems clearer to me. I also tweaked
> (reordered/reformatted) the conditions a bit.
I appreciate your edtis, the comment and code are clearer now.
PFA the patches after merging the review patches.
Thank you,
Rahila Syed
Attachment | Content-Type | Size |
---|---|---|
v9-0001-Improve-acounting-for-memory-used-by-shared-hash-tab.patch | application/octet-stream | 17.0 KB |
v9-0002-Improve-accounting-for-PredXactList-RWConflictPool-a.patch | application/octet-stream | 7.5 KB |
v9-0003-Add-cacheline-padding-between-heavily-accessed-array.patch | application/octet-stream | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ilia Evdokimov | 2025-04-01 07:52:52 | Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment |
Previous Message | Ashutosh Bapat | 2025-04-01 07:43:07 | Re: Test to dump and restore objects left behind by regression |