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

From kuroda.hayato@fujitsu.com
Subject RE: Terminate the idle sessions
Date
Msg-id OSBPR01MB3157A77370A5EBFB3861A69FF5E10@OSBPR01MB3157.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Terminate the idle sessions  (Li Japin <japinli@hotmail.com>)
Responses Re: Terminate the idle sessions  (Li Japin <japinli@hotmail.com>)
List pgsql-hackers
Dear Li, 

> Yeah, it might be occurred. Any suggestions to fix it?

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());
+       }
 }
```


Best Regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: Soumyadeep Chakraborty
Date:
Subject: Re: Split copy.
Next
From: Junfeng Yang
Date:
Subject: vac_update_datfrozenxid will raise "wrong tuple length" if pg_database tuple contains toast attribute.