Re: Enhancing Memory Context Statistics Reporting
Rahila Syed <rahilasyed90@gmail.com>
From: Rahila Syed <rahilasyed90@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Tomas Vondra <tomas@vondra.me>, torikoshia <torikoshia@oss.nttdata.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-01-24T13:47:35Z
Lists: pgsql-hackers
Hi, > > Just idea; as an another option, how about blocking new requests to > the target process (e.g., causing them to fail with an error or > returning NULL with a warning) if a previous request is still pending? > Users can simply retry the request if it fails. IMO failing quickly > seems preferable to getting stuck for a while in cases with concurrent > requests. > > Thank you for the suggestion. I agree that it is better to fail early and avoid waiting for a timeout in such cases. I will add a "pending request" tracker for this in shared memory. This approach will help prevent sending a concurrent request if a request for the same backend is still being processed. IMO, one downside of throwing an error in such cases is that the users might wonder if they need to take a corrective action, even though the issue is actually going to solve itself and they just need to retry. Therefore, issuing a warning or displaying previously updated statistics might be a better alternative to throwing an error. Thank you, Rahila Syed
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Cross-check lists of built-in LWLock tranches.
- 2047ad068139 19 (unreleased) cited
-
Convert strncpy to strlcpy
- 45e7e8ca9e93 18.0 landed
-
Typo and doc fixups for memory context reporting
- f8c115a6cb65 18.0 landed
-
Add missing string terminator
- d2a1ed1727a8 18.0 landed
-
Rename argument in pg_get_process_memory_contexts().
- c57971034e69 18.0 landed
-
Add function to get memory context stats for processes
- 042a66291b04 18.0 landed