Re: Add progressive backoff to XactLockTableWait functions - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add progressive backoff to XactLockTableWait functions
Date
Msg-id wbwxb7eeqg7tmtl7duiuumrmfvsccay4exmqsm5nnkuzq7whqw@7m5srukznljl
Whole thread Raw
In response to Re: Add progressive backoff to XactLockTableWait functions  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Add progressive backoff to XactLockTableWait functions
List pgsql-hackers
Hi,

On 2025-07-02 22:55:16 +0900, Fujii Masao wrote:
> On 2025/06/24 1:32, Xuneng Zhou wrote:
> > 3. The proposed solution
> > 
> > If the above analysis is sound, one potential fix would be to add
> > separate branching for standby in XactLockTableWait. However, this seems
> > inconsistent with the function's definition—there's simply no lock entry
> > in the lock table for waiting. We could implement a new function for
> > this logic,
> 
> To be honest, I'm fine with v3, since it only increases the sleep time
> after 5000 loop iterations, which has negligible performance impact.

I think this is completely the wrong direction. We should make
XactLockTableWait() on standbys, not make the polling smarter.

I think neither v3 nor v4 are viable patches.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] initdb: Treat empty -U argument as unset username
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: [PATCH] initdb: Treat empty -U argument as unset username