Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59ed94a

Browse files
committed
Mark application_name as GUC_REPORT so that the value will be reported back
to the client by the server. This might seem pretty pointless but apparentlyit will help pgbouncer, and perhaps other connection poolers. Anyway it'spractically free to do so for the normal use-case where appname is only setin the startup packet --- we're just adding a few more bytes to the initialParameterStatus response packet. Per comments from Marko Kreen.
1 parent3dfcf8c commit59ed94a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.290 2009/11/28 23:38:06 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.291 2009/12/02 04:54:10 tgl Exp $ -->
22

33
<chapter id="libpq">
44
<title><application>libpq</application> - C Library</title>
@@ -1167,6 +1167,7 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
11671167
<literal>server_version</>,
11681168
<literal>server_encoding</>,
11691169
<literal>client_encoding</>,
1170+
<literal>application_name</>,
11701171
<literal>is_superuser</>,
11711172
<literal>session_authorization</>,
11721173
<literal>DateStyle</>,
@@ -1177,8 +1178,9 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
11771178
(<literal>server_encoding</>, <literal>TimeZone</>, and
11781179
<literal>integer_datetimes</> were not reported by releases before 8.0;
11791180
<literal>standard_conforming_strings</> was not reported by releases
1180-
before 8.1; <literal>IntervalStyle</> was not reported by releases
1181-
before 8.4.)
1181+
before 8.1;
1182+
<literal>IntervalStyle</> was not reported by releases before 8.4;
1183+
<literal>application_name</> was not reported by releases before 8.5.)
11821184
Note that
11831185
<literal>server_version</>,
11841186
<literal>server_encoding</> and

‎doc/src/sgml/protocol.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.75 2008/11/09 00:28:34 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.76 2009/12/02 04:54:10 tgl Exp $ -->
22

33
<chapter id="protocol">
44
<title>Frontend/Backend Protocol</title>
@@ -1088,6 +1088,7 @@
10881088
<literal>server_version</>,
10891089
<literal>server_encoding</>,
10901090
<literal>client_encoding</>,
1091+
<literal>application_name</>,
10911092
<literal>is_superuser</>,
10921093
<literal>session_authorization</>,
10931094
<literal>DateStyle</>,
@@ -1098,8 +1099,9 @@
10981099
(<literal>server_encoding</>, <literal>TimeZone</>, and
10991100
<literal>integer_datetimes</> were not reported by releases before 8.0;
11001101
<literal>standard_conforming_strings</> was not reported by releases
1101-
before 8.1; <literal>IntervalStyle</> was not reported by releases
1102-
before 8.4.)
1102+
before 8.1;
1103+
<literal>IntervalStyle</> was not reported by releases before 8.4;
1104+
<literal>application_name</> was not reported by releases before 8.5.)
11031105
Note that
11041106
<literal>server_version</>,
11051107
<literal>server_encoding</> and

‎src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.524 2009/11/28 23:38:07 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.525 2009/12/02 04:54:10 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -2541,7 +2541,7 @@ static struct config_string ConfigureNamesString[] =
25412541
{"application_name",PGC_USERSET,LOGGING,
25422542
gettext_noop("Sets the application name to be reported in statistics and logs."),
25432543
NULL,
2544-
GUC_IS_NAME |GUC_NOT_IN_SAMPLE
2544+
GUC_IS_NAME |GUC_REPORT |GUC_NOT_IN_SAMPLE
25452545
},
25462546
&application_name,
25472547
"",assign_application_name,NULL

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp