Re: Terminate the idle sessions
Japin Li <japinli@hotmail.com>
From: Li Japin <japinli@hotmail.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Thomas Munro <thomas.munro@gmail.com>, "bharath.rupireddyforpostgres@gmail.com" <bharath.rupireddyforpostgres@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2020-11-24T06:22:23Z
Lists: pgsql-hackers
Hi, David
Thanks for your suggestion!
On Nov 24, 2020, at 11:39 AM, David G. Johnston <david.g.johnston@gmail.com<mailto:david.g.johnston@gmail.com>> wrote:
On Mon, Nov 23, 2020 at 5:02 PM kuroda.hayato@fujitsu.com<mailto:kuroda.hayato@fujitsu.com> <kuroda.hayato@fujitsu.com<mailto:kuroda.hayato@fujitsu.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
Commits
-
Rethink SQLSTATE code for ERRCODE_IDLE_SESSION_TIMEOUT.
- 4edf96846a02 14.0 landed
-
Improve commentary in timeout.c.
- 9486e7b666fd 14.0 landed
-
Add idle_session_timeout.
- 9877374bef76 14.0 landed
-
Improve timeout.c's handling of repeated timeout set/cancel.
- 09cf1d522676 14.0 landed