| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | pgpool-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgpool: Remove unnecessary application_name treatment. |
| Date: | 2025-11-07 09:36:53 |
| Message-ID: | E1vHIto-005xon-1d@gothos.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-committers |
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 <ishii(at)postgresql(dot)org>
Discussion: https://github.com/pgpool/pgpool2/issues/130
Backpatch-through: v4.2.
Branch
------
V4_2_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f122a13b79f8cd1c3146d6a0189fd5e825c54ca1
Modified Files
--------------
src/protocol/child.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2025-11-07 09:36:58 | pgpool: Remove unnecessary application_name treatment. |
| Previous Message | Tatsuo Ishii | 2025-11-04 01:10:11 | pgpool: Fix pgpool_adm Makefile. |