回复:回复:Queries that should be canceled will get stuck on secure_write function - Mailing list pgsql-hackers

From 蔡梦娟(玊于)
Subject 回复:回复:Queries that should be canceled will get stuck on secure_write function
Date
Msg-id 0de88f81-4932-4572-a01c-e4041d7be722.mengjuan.cmj@alibaba-inc.com
Whole thread Raw
In response to Re: 回复:Queries that should be canceled will get stuck on secure_write function  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
Yes, it is more appropriate to set a duration time to determine whether secure_write() is stuck, but it is difficult to define how long the duration time is.
in my first patch, I add a GUC to allow the user to set the time, or it can be hardcoded if a time deemed reasonable is provided?


------------------------------------------------------------------
I agree that something like the patch (i.e., introduction of promotion
from cancel request to terminate one) is necessary for the fix. One concern
on the patch is that the cancel request can be promoted to the terminate one
even when secure_write() doesn't actually get stuck. Is this acceptable?
Maybe I'm tempted to set up the duration until the promotion happens....
Or we should introduce the dedicated timer for communication on the socket?

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Atomic rename feature for Windows.
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: possibility to read dumped table's name from file