RE: logical apply worker's lock waits in subscriber can stall checkpointer in publisher - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: logical apply worker's lock waits in subscriber can stall checkpointer in publisher
Date
Msg-id TY7PR01MB14554694999282D899B73E2E3F59FA@TY7PR01MB14554.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: logical apply worker's lock waits in subscriber can stall checkpointer in publisher  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: logical apply worker's lock waits in subscriber can stall checkpointer in publisher
List pgsql-hackers
Dear Fujii-san,

> This approach doesn't seem helpful on platforms that don't support
> TCP_USER_TIMEOUT, i.e., tcp_user_timeout is not available. Right?
> If I remember correctly, Windows is one of those platforms.

Good point, documentation said it's not usable for Windows.
The easiest fix I can come up with is to determine a timeout for checkpoint wait;
ConditionVariableTimedSleep() can be used in InvalidatePossiblyObsoleteSlot(),
we can put some LOG and skip invalidating for a while. Not sure how long we
should wait but at least we can use the a fixed value. This might be similar
with your second option.
Regarding the first option, it can solve the root cause, but I'm afraid we may
have to modify very common code.

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: pg_upgrade: optimize replication slot caught-up check
Next
From: Amit Kapila
Date:
Subject: Re: pg_upgrade: optimize replication slot caught-up check