Re: Add CHECK_FOR_INTERRUPTS in polling loop code path in XactLockTableWait

Xuneng Zhou <xunengzhou@gmail.com>

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

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Make XactLockTableWait() and ConditionalXactLockTableWait() interruptable more.

Hi,

> Thanks for the patch! I haven't reviewed it yet, but since this is
> a v19 item, please add it to the next CommitFest so we don't lose
> track of it.
>
> Also, I think it would be better to split the addition of the wait event
> and the introduction of exponential backoff in XactLockTableWait() into
> separate patches. They serve different purposes and can be committed
> independently.
>

I've renamed and created two discussion threads and commitfest entries
for these patches to allow independent evaluation.
1) Add new wait event to XactLockTableWait
https://commitfest.postgresql.org/patch/5804/
https://www.postgresql.org/message-id/CABPTF7WZODAVPFxtn9ygA9d6zckkJbFG%3DSUtHdvk7ca%3DUTzSFg%40mail.gmail.com

2) Add progressive backoff to XactLockTableWait
https://commitfest.postgresql.org/patch/5806/
https://www.postgresql.org/message-id/CABPTF7XmTrBp8S93a%2BzQ5M3FhLB6o8kWn9yQ1YnHJqTPT9dRYA%40mail.gmail.com

There's some code overlap between XactLockTableWait() and
ConditionalXactLockTableWait() in 2) that would warrant a shared
helper function. However, introducing such a helper would create
dependencies between the patches, defeating the purpose of keeping
them separate. I’m very familiar with splitting patches and submitting
them separately, so please let me know if anything here needs
improvement.

Best regards,
Xuneng