public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuo Ishii <[email protected]>
To: [email protected]
Subject: pgpool: Remove unnecessary application_name treatment.
Date: Fri, 07 Nov 2025 09:37:04 +0000
Message-ID: <[email protected]> (raw)

Remove unnecessary application_name treatment.

Commit c20858797eafe377b30166b467d2a36de89768e1 added an treatment to
send "set application_name" command to backend when reusing existing
connection. The reason were:

(1) to set application_name parameter to proper value, which is the
value specified in the startup packet when the connection was created.

(2) to return application_name parameter status message to frontend.

However, (1) is not necessary, because when the previous connection is
closed, queries in reset_query_list are executed and the list usually
includes "DISCARD ALL", which reset the application_name value to the
previous one which was set when the connection was established.  Also
(2) is not necessary either, because send_params() sends all necessary
parameter status messages to frontend including application_name.

For these reasons, I think the treatment added in
c20858797eafe377b30166b467d2a36de89768e1 is not necessary. This commit
just removes the treatment. Also this will enhance the performance
when some of backend nodes are in geographically distant location, by
eliminating the time to send application_name to such a node and wait
for the response.

Author: Tatsuo Ishii <[email protected]>
Discussion: https://github.com/pgpool/pgpool2/issues/130
Backpatch-through: v4.2.

Branch
------
V4_4_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=0faceca300774bb25a8ff7a9eab67753f6a3f...

Modified Files
--------------
src/protocol/child.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgpool: Remove unnecessary application_name treatment.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox