public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rahila Syed <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: torikoshia <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Enhancing Memory Context Statistics Reporting
Date: Fri, 24 Jan 2025 19:17:35 +0530
Message-ID: <CAH2L28u7=fcgnY8bpM87moiJxt++wqWZXh2HxFabYjiHSg76Cg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CAH2L28vHnw36jpp9TvnarvqtkNBEjshJiO_-_ZzvL4uNBtvu6Q@mail.gmail.com>
	<CAH2L28sDxhx-vic=Gq3U5=OA_DYW_9-VMYjMggtKNw0ixULuBQ@mail.gmail.com>
	<CAExHW5t4ToxhNE62zNboW2Z-B_EmD31eMQrFunR8GGnudyR7HA@mail.gmail.com>
	<CAH2L28uUHAMHXV9gF_=4DaXUocYchWGq3_JyabTmqsSD3GOCbQ@mail.gmail.com>
	<[email protected]>
	<CAH2L28uvYHX1CfmbcB9JPzR6+MzJ+kb9ob+NvFy3wUHM8HUkGA@mail.gmail.com>
	<[email protected]>
	<CAH2L28spk4c54k5pTSWRqu5LJmetQwTXtr=-F7Bnioxd425hqQ@mail.gmail.com>
	<[email protected]>
	<CAH2L28vEiz+Qxw=Y5Dze8_TxDW1kAyh_3R-BKUGvOH6r02W6cg@mail.gmail.com>
	<[email protected]>
	<CAH2L28vR622wV44XenbhWc7ETpNtjS_oeTha7OxMx35LjWPPqQ@mail.gmail.com>
	<[email protected]>

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


view thread (33+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Enhancing Memory Context Statistics Reporting
  In-Reply-To: <CAH2L28u7=fcgnY8bpM87moiJxt++wqWZXh2HxFabYjiHSg76Cg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox