Re: Terminate the idle sessions - Mailing list pgsql-hackers

From Li Japin
Subject Re: Terminate the idle sessions
Date
Msg-id 2B9BB40C-DDEA-4CDB-B37E-C2738E739416@hotmail.com
Whole thread Raw
In response to RE: Terminate the idle sessions  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
Responses RE: Terminate the idle sessions  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers

On Nov 18, 2020, at 2:22 PM, kuroda.hayato@fujitsu.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

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Detecting File Damage & Inconsistencies
Next
From: Peter Smith
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions