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

From Li Japin
Subject Re: Terminate the idle sessions
Date
Msg-id 65949DBB-AF43-4021-AAEB-8F7D1E8D1C0B@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  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
Hi Kuroda,

On Nov 16, 2020, at 1:22 PM, kuroda.hayato@fujitsu.com wrote:


@@ -30,6 +30,7 @@ typedef enum TimeoutId
STANDBY_DEADLOCK_TIMEOUT,
STANDBY_TIMEOUT,
STANDBY_LOCK_TIMEOUT,
+ IDLE_SESSION_TIMEOUT,
IDLE_IN_TRANSACTION_SESSION_TIMEOUT,
/* First user-definable timeout reason */
USER_TIMEOUT,

I'm not familiar with timeout, but I can see that the priority of idle-session is set lower than transaction-timeout.
Could you explain the reason? In my image this timeout locates at the lowest layer, so it might have the lowest 
priority.

My apologies! I just add a enum for idle session and ignore the comments that says the enum has priority.
Fixed as follows:

@@ -30,8 +30,8 @@ typedef enum TimeoutId
        STANDBY_DEADLOCK_TIMEOUT,
        STANDBY_TIMEOUT,
        STANDBY_LOCK_TIMEOUT,
-       IDLE_SESSION_TIMEOUT,
        IDLE_IN_TRANSACTION_SESSION_TIMEOUT,
+       IDLE_SESSION_TIMEOUT,
        /* First user-definable timeout reason */
        USER_TIMEOUT,
        /* Maximum number of timeout reasons */

Thanks for your review! Attached.

--
Best regards
Japin Li




Attachment

pgsql-hackers by date:

Previous
From: Erik Rijkers
Date:
Subject: doc CREATE INDEX
Next
From: Juan José Santamaría Flecha
Date:
Subject: Re: More time spending with "delete pending"