Re: Add progressive backoff to XactLockTableWait functions

Xuneng Zhou <xunengzhou@gmail.com>

From: Xuneng Zhou <xunengzhou@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Kevin K Biju <kevinkbiju@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-06-17T13:50:12Z
Lists: pgsql-hackers

Attachments

Hi,

On Sun, Jun 15, 2025 at 4:01 PM Xuneng Zhou <xunengzhou@gmail.com> wrote:

> Hi,
>
> Attached is v2 of the patch to add threshold-based sleep to
> XactLockTableWait functions.
>
> Changes from v1:
> - Simplified approach based on Fujii's feedback [1]: instead of
> exponential backoff,
>   we now sleep 1ms for the first 5 seconds, then switch directly to 1s
> sleeps
> - Reduced the threshold from 10 seconds to 5 seconds to avoid excessive
> delays
>


When applying the v2 patch for benchmarking, warnings about trailing
whitespaces are emitted. I’ve removed them—please find the updated v3 patch
attached.


Best regards,

Xuneng

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow logical decoding on standbys