From: | Li Japin <japinli(at)hotmail(dot)com> |
---|---|
To: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "bharath(dot)rupireddyforpostgres(at)gmail(dot)com" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Terminate the idle sessions |
Date: | 2020-11-18 06:57:13 |
Message-ID: | 2B9BB40C-DDEA-4CDB-B37E-C2738E739416@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Nov 18, 2020, at 2:22 PM, kuroda(dot)hayato(at)fujitsu(dot)com<mailto:kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
Oops.. I forgot putting my suggestion. Sorry.
How about substituting sigalrm_delivered to true in the reschedule_timeouts()?
Maybe this processing looks strange, so some comments should be put too.
Here is an example:
```diff
@@ -423,7 +423,14 @@ reschedule_timeouts(void)
/* Reschedule the interrupt, if any timeouts remain active. */
if (num_active_timeouts > 0)
+ {
+ /*
+ * sigalrm_delivered is set to true,
+ * because any intrreputions might be occured.
+ */
+ sigalrm_delivered = true;
schedule_alarm(GetCurrentTimestamp());
+ }
}
```
Thanks for your suggestion. Attached!
--
Best regards
Japin Li
Attachment | Content-Type | Size |
---|---|---|
v7-0001-Allow-terminating-the-idle-sessions.patch | application/octet-stream | 10.1 KB |
v7-0002-Optimize-setitimer-usage.patch | application/octet-stream | 4.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2020-11-18 07:47:39 | Re: [HACKERS] logical decoding of two-phase transactions |
Previous Message | Craig Ringer | 2020-11-18 06:42:29 | Re: Detecting File Damage & Inconsistencies |