Re: Terminate the idle sessions

From: Li Japin <japinli(at)hotmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(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-24 06:22:23
Message-ID: DFE10ADC-6B0F-4E90-8150-5996003BA91D@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, David

Thanks for your suggestion!

On Nov 24, 2020, at 11:39 AM, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:

On Mon, Nov 23, 2020 at 5:02 PM kuroda(dot)hayato(at)fujitsu(dot)com<mailto:kuroda(dot)hayato(at)fujitsu(dot)com> <kuroda(dot)hayato(at)fujitsu(dot)com<mailto:kuroda(dot)hayato(at)fujitsu(dot)com>> wrote:
No one have any comments, patch tester says OK, and I think this works well.
I changed status to "Ready for Committer."
Some proof-reading:

v8-0001

Documentation:

My suggestion wasn't taken for the first note paragraph (review/author disagreement) and the current has the following issues:

Sorry for ignoring this suggestion.

"if you use some connection-pooling" software doesn't need the word "some"
Don't substitute "pg" for the name of the product, PostgreSQL.
The word "used" is a more stylistic dislike, but "connected to using postgres_fdw" would be a better choice IMO.

Code (minor, but if you are in there anyway):

How about use “foreign-data wrapper” replace “postgres_fdw”?

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index b71a116be3..a3a50e7bdb 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -8293,8 +8293,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;

<note>
<para>
- This parameter should be set to zero if you use some connection-pooling software,
- or pg servers used by postgres_fdw, because connections might be closed unexpectedly.
+ This parameter should be set to zero if you use connection-pooling software,
+ or <productname>PostgreSQL</productname> servers connected to using foreign-data
+ wrapper, because connections might be closed unexpectedly.
</para>
<para>
Aside from a bit of resource consumption idle sessions do not interfere with the

(5) turn off ... timeout (there are now two, timeouts should be plural)

Fixed.

diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index ba2369b72d..bcf8c610fd 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -4278,7 +4278,7 @@ PostgresMain(int argc, char *argv[],
DoingCommandRead = false;

/*
- * (5) turn off the idle-in-transaction and idle-session timeout
+ * (5) turn off the idle-in-transaction and idle-session timeouts
*/
if (disable_idle_in_transaction_timeout)
{

I will send a new patch if there is not other comments.

--
Best Regards,
Japin Li

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Li Japin 2020-11-24 06:23:18 Re: Use macros for calculating LWLock offset
Previous Message Li Japin 2020-11-24 06:22:09 Re: Terminate the idle sessions