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-13T01:18:04Z
Lists: pgsql-hackers
Hi, Thanks for the feedback! On Thu, Jun 12, 2025 at 10:02 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > > > When I first suggested this idea, I used 10s as an example for > the maximum sleep time. But thinking more about it now, 10s might > be too long. Even if the target transaction has already finished, > XactLockTableWait() could still wait up to 10 seconds, > which seems excessive. > +1, this could be a problem > What about using 1s instead? That value is already used as a max > sleep time in other places, like WaitExceedsMaxStandbyDelay(). > 1s should be generally good > If we agree on 1s as the max, then using exponential backoff from > 1ms to 1s after the threshold might not be necessary. It might > be simpler and sufficient to just sleep for 1s once we hit > the threshold. > That makes sense to me. Based on that, I think a change like the following could work well. > Thought? > I'll update the patch accordingly. 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 →
-
Allow logical decoding on standbys
- 0fdab27ad68a 16.0 cited