pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedSuggestions for improving \conninfo output in v18
13+ messages / 5 participants
[nested] [flat]
Commits from this thread:
2025-06-14 0fe50417ec doc: Add note about "Client User" and "Superuser" fields in \conninfo output.
2025-06-14 be37ac20fc psql: Report full protocol version in \conninfo output.
* Suggestions for improving \conninfo output in v18
@ 2025-06-02 04:48 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 13+ messages in thread
From: Fujii Masao @ 2025-06-02 04:48 UTC (permalink / raw)
To: pgsql-hackers
Hi,
In v18, the "Protocol Version" column shown by \conninfo reports only
the major version (e.g., 3). Wouldn't it be more helpful to show the full
version (e.g., 3.2) using PQfullProtocolVersion()? Since support for
protocol version 3.2 was introduced in v18, users may want to know
exactly which version the current session is using.
Also, I noticed that the "Client User" column reflects the user at
the time of connection, while the "Superuser" column reflects whether
the current user in the current execution context is a superuser.
This means the users referred to in these columns can differ.
It might be worth aligning this behavior, or at least noting the distinction
clearly in the documentation?
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2025-06-02 05:24 ` David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 13+ messages in thread
From: David G. Johnston @ 2025-06-02 05:24 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: pgsql-hackers
On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> In v18, the "Protocol Version" column shown by \conninfo reports only
> the major version (e.g., 3). Wouldn't it be more helpful to show the full
> version (e.g., 3.2) using PQfullProtocolVersion()? Since support for
> protocol version 3.2 was introduced in v18, users may want to know
> exactly which version the current session is using.
This seems like a probable oversight that should be corrected.
>
> Also, I noticed that the "Client User" column reflects the user at
> the time of connection, while the "Superuser" column reflects whether
> the current user in the current execution context is a superuser.
> This means the users referred to in these columns can differ.
> It might be worth aligning this behavior, or at least noting the
> distinction
> clearly in the documentation?
>
The behavior seems consistent with the reality of our protocol and libpq.
What did you have in mind for documentation changes?
David J.
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
@ 2025-06-02 06:39 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 13+ messages in thread
From: Fujii Masao @ 2025-06-02 06:39 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-hackers
On 2025/06/02 14:24, David G. Johnston wrote:
> On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com>> wrote:
>
> In v18, the "Protocol Version" column shown by \conninfo reports only
> the major version (e.g., 3). Wouldn't it be more helpful to show the full
> version (e.g., 3.2) using PQfullProtocolVersion()? Since support for
> protocol version 3.2 was introduced in v18, users may want to know
> exactly which version the current session is using.
>
>
> This seems like a probable oversight that should be corrected.
Patch attached.
> Also, I noticed that the "Client User" column reflects the user at
> the time of connection, while the "Superuser" column reflects whether
> the current user in the current execution context is a superuser.
> This means the users referred to in these columns can differ.
> It might be worth aligning this behavior, or at least noting the distinction
> clearly in the documentation?
>
>
> The behavior seems consistent with the reality of our protocol and libpq. What did you have in mind for documentation changes?
How about adding a note like this?
----------------------
Note that the "Superuser" column does not necessarily reflect the privileges of the user shown in "Client User". "Client User" shows the user at the time of connection, while "Superuser" indicates whether the current user (in the current execution context) has superuser privileges. These users are usually the same, but they can differ, for example, if the current user was changed with the SET ROLE command.
----------------------
The same question also came up previously in [1],
but seems no clear consensus was reached at that time.
Regards,
[1] https://www.postgresql.org/message-id/CAA5RZ0tbWopM83akPZ5M42V_RtyMTV8UfNUdE9LYw0YsPdOX5g%40mail.gma...
--
Fujii Masao
NTT DATA Japan Corporation
Attachments:
v1-0001-psql-Report-full-protocol-version-in-conninfo-out.patch (text/plain, 1.6K) download
From 36c36eae542a0f04187b2b773b64962826f9eef2 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Jun 2025 13:22:36 +0900
Subject: [PATCH v1] psql: Report full protocol version in \conninfo output.
Commit bba2fbc6238 modified \conninfo to display the protocol version
used by the current connection, but it only showed the major version (e.g., 3).
This commit updates \conninfo to display the full protocol version (e.g., 3.2).
Since support for new version 3.2 was added in v18, and the server supports
both 3.0 and 3.2, showing the complete version helps users understand
exactly which protocol version the current session is using.
---
src/bin/psql/command.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 81a5ba844ba..1f7635d0c23 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -778,6 +778,7 @@ exec_command_conninfo(PsqlScanState scan_state, bool active_branch)
int ssl_in_use,
password_used,
gssapi_used;
+ int version_num;
char *paramval;
if (!active_branch)
@@ -793,7 +794,9 @@ exec_command_conninfo(PsqlScanState scan_state, bool active_branch)
/* Get values for the parameters */
host = PQhost(pset.db);
hostaddr = PQhostaddr(pset.db);
- protocol_version = psprintf("%d", PQprotocolVersion(pset.db));
+ version_num = PQfullProtocolVersion(pset.db);
+ protocol_version = psprintf("%d.%d", version_num / 10000,
+ version_num % 10000);
ssl_in_use = PQsslInUse(pset.db);
password_used = PQconnectionUsedPassword(pset.db);
gssapi_used = PQconnectionUsedGSSAPI(pset.db);
--
2.49.0
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2025-06-02 12:53 ` David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 13+ messages in thread
From: David G. Johnston @ 2025-06-02 12:53 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: pgsql-hackers
On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> On 2025/06/02 14:24, David G. Johnston wrote:
>
>> On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com
>> <mailto:masao.fujii@oss.nttdata.com>> wrote:
>>
> Also, I noticed that the "Client User" column reflects the user at
>> the time of connection, while the "Superuser" column reflects whether
>> the current user in the current execution context is a superuser.
>> This means the users referred to in these columns can differ.
>> It might be worth aligning this behavior, or at least noting the
>> distinction
>> clearly in the documentation?
>>
>>
>> The behavior seems consistent with the reality of our protocol and
>> libpq. What did you have in mind for documentation changes?
>>
>
> How about adding a note like this?
>
> ----------------------
> Note that the "Superuser" column does not necessarily reflect the
> privileges of the user shown in "Client User". "Client User" shows the user
> at the time of connection, while "Superuser" indicates whether the current
> user (in the current execution context) has superuser privileges. These
> users are usually the same, but they can differ, for example, if the
> current user was changed with the SET ROLE command.
> ----------------------
Where would you put that?
Right now there is zero documentation of \conninfo on the psql ref page
because it delegates all knowledge of its output to knowing various aspects
of libpq.
David J.
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
@ 2025-06-03 08:28 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
0 siblings, 1 reply; 13+ messages in thread
From: Fujii Masao @ 2025-06-03 08:28 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-hackers
On 2025/06/02 21:53, David G. Johnston wrote:
> On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com>> wrote:
>
> On 2025/06/02 14:24, David G. Johnston wrote:
>
> On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com> <mailto:masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com>>> wrote:
>
> Also, I noticed that the "Client User" column reflects the user at
> the time of connection, while the "Superuser" column reflects whether
> the current user in the current execution context is a superuser.
> This means the users referred to in these columns can differ.
> It might be worth aligning this behavior, or at least noting the distinction
> clearly in the documentation?
>
>
> The behavior seems consistent with the reality of our protocol and libpq. What did you have in mind for documentation changes?
>
>
> How about adding a note like this?
>
> ----------------------
> Note that the "Superuser" column does not necessarily reflect the privileges of the user shown in "Client User". "Client User" shows the user at the time of connection, while "Superuser" indicates whether the current user (in the current execution context) has superuser privileges. These users are usually the same, but they can differ, for example, if the current user was changed with the SET ROLE command.
> ----------------------
>
>
> Where would you put that?
I was thinking to add a note to the \conninfo documentation, as shown
in the attached patch. I don't have a better alternative at the moment.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
Attachments:
v1-0001-doc-Add-note-about-Client-User-and-Superuser-fiel.patch (text/plain, 1.9K) download
From 89aa95ed9d2cc19950d373b3dde30897ac85f1b1 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Tue, 3 Jun 2025 16:39:50 +0900
Subject: [PATCH v1] doc: Add note about "Client User" and "Superuser" fields
in \conninfo output.
In the \conninfo psql command, the "Client User" column shows the user who
established the connection, while the "Superuser" column reflects whether
the current user in the current execution context is a superuser. This means
the users referred to in these columns can differ, for example, if the current
user was changed with the SET ROLE command.
This commit adds a note to the \conninfo documentation to clarify
this behavior and avoid potential confusion.
---
doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 8f7d8758ca0..473883752a4 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1103,6 +1103,17 @@ SELECT $1 \parse stmt1
Outputs information about the current database connection,
including TLS-related information if TLS is in use.
</para>
+ <para>
+ Note that the <structfield>Superuser</structfield> column does not
+ necessarily reflect the privileges of the user shown in
+ <structfield>Client User</structfield>.
+ <structfield>Client User</structfield> shows the user at the time
+ of connection, while <structfield>Superuser</structfield> indicates
+ whether the current user (in the current execution context) has
+ superuser privileges. These users are usually the same, but they can
+ differ, for example, if the current user was changed with the
+ <command>SET ROLE</command> command.
+ </para>
</listitem>
</varlistentry>
--
2.49.0
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2025-06-03 11:22 ` Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 13+ messages in thread
From: Robert Treat @ 2025-06-03 11:22 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-hackers
On Tue, Jun 3, 2025 at 4:28 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
> On 2025/06/02 21:53, David G. Johnston wrote:
> > On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com>> wrote:
> >
> > On 2025/06/02 14:24, David G. Johnston wrote:
> >
> > On Sunday, June 1, 2025, Fujii Masao <masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com> <mailto:masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com>>> wrote:
> >
> > Also, I noticed that the "Client User" column reflects the user at
> > the time of connection, while the "Superuser" column reflects whether
> > the current user in the current execution context is a superuser.
> > This means the users referred to in these columns can differ.
> > It might be worth aligning this behavior, or at least noting the distinction
> > clearly in the documentation?
> >
> >
> > The behavior seems consistent with the reality of our protocol and libpq. What did you have in mind for documentation changes?
> >
> >
> > How about adding a note like this?
> >
> > ----------------------
> > Note that the "Superuser" column does not necessarily reflect the privileges of the user shown in "Client User". "Client User" shows the user at the time of connection, while "Superuser" indicates whether the current user (in the current execution context) has superuser privileges. These users are usually the same, but they can differ, for example, if the current user was changed with the SET ROLE command.
> > ----------------------
> >
> >
> > Where would you put that?
>
> I was thinking to add a note to the \conninfo documentation, as shown
> in the attached patch. I don't have a better alternative at the moment.
>
+1 on the idea to put it there; if someone gets confused about the
behavior, that seems like the place they'd go to look it up. Though I
would wordsmith the patch a little:
+ Note that the <structfield>Client User</structfield> field
shows the user at the time
+ of connection, while the
<structfield>Superuser</structfield> field indicates
+ whether the current user (in the current execution context) has
+ superuser privileges. These users are usually the same, but they can
+ differ, for example, if the current user was changed with the
+ <command>SET ROLE</command> command.
Robert Treat
https://xzilla.net
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
@ 2025-06-04 11:18 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 13+ messages in thread
From: Fujii Masao @ 2025-06-04 11:18 UTC (permalink / raw)
To: Robert Treat <rob@xzilla.net>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-hackers
On 2025/06/03 20:22, Robert Treat wrote:
> +1 on the idea to put it there; if someone gets confused about the
> behavior, that seems like the place they'd go to look it up. Though I
> would wordsmith the patch a little:
>
> + Note that the <structfield>Client User</structfield> field
> shows the user at the time
> + of connection, while the
> <structfield>Superuser</structfield> field indicates
> + whether the current user (in the current execution context) has
> + superuser privileges. These users are usually the same, but they can
> + differ, for example, if the current user was changed with the
> + <command>SET ROLE</command> command.
This looks good to me, thanks for the review! I've updated the patch (0002)
as you suggested and attached it.
I've also re-attached the 0001 patch that makes \conninfo report the full
protocol version, it's the same as the one I posted earlier in the thread.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
Attachments: download all (2 files, .tar.gz)
v2-0001-psql-Report-full-protocol-version-in-conninfo-out.patch (text/plain, 1.6K) download
From fd2af2d3e2d98f015afecd532a33985b2758f0b3 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Jun 2025 13:22:36 +0900
Subject: [PATCH v2 1/2] psql: Report full protocol version in \conninfo
output.
Commit bba2fbc6238 modified \conninfo to display the protocol version
used by the current connection, but it only showed the major version (e.g., 3).
This commit updates \conninfo to display the full protocol version (e.g., 3.2).
Since support for new version 3.2 was added in v18, and the server supports
both 3.0 and 3.2, showing the complete version helps users understand
exactly which protocol version the current session is using.
---
src/bin/psql/command.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 81a5ba844ba..1f7635d0c23 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -778,6 +778,7 @@ exec_command_conninfo(PsqlScanState scan_state, bool active_branch)
int ssl_in_use,
password_used,
gssapi_used;
+ int version_num;
char *paramval;
if (!active_branch)
@@ -793,7 +794,9 @@ exec_command_conninfo(PsqlScanState scan_state, bool active_branch)
/* Get values for the parameters */
host = PQhost(pset.db);
hostaddr = PQhostaddr(pset.db);
- protocol_version = psprintf("%d", PQprotocolVersion(pset.db));
+ version_num = PQfullProtocolVersion(pset.db);
+ protocol_version = psprintf("%d.%d", version_num / 10000,
+ version_num % 10000);
ssl_in_use = PQsslInUse(pset.db);
password_used = PQconnectionUsedPassword(pset.db);
gssapi_used = PQconnectionUsedGSSAPI(pset.db);
--
2.49.0
v2-0002-doc-Add-note-about-Client-User-and-Superuser-fiel.patch (text/plain, 1.7K) download
From ed85ff0365ab30f629415dc9fa9a141b84cd08ff Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Tue, 3 Jun 2025 16:39:50 +0900
Subject: [PATCH v2 2/2] doc: Add note about "Client User" and "Superuser"
fields in \conninfo output.
In the \conninfo psql command, the "Client User" column shows the user who
established the connection, while the "Superuser" column reflects whether
the current user in the current execution context is a superuser. This means
the users referred to in these columns can differ, for example, if the current
user was changed with the SET ROLE command.
This commit adds a note to the \conninfo documentation to clarify
this behavior and avoid potential confusion.
---
doc/src/sgml/ref/psql-ref.sgml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 8f7d8758ca0..97d6327ed3b 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1103,6 +1103,15 @@ SELECT $1 \parse stmt1
Outputs information about the current database connection,
including TLS-related information if TLS is in use.
</para>
+ <para>
+ Note that the <structfield>Client User</structfield> field shows
+ the user at the time of connection, while the
+ <structfield>Superuser</structfield> field indicates whether
+ the current user (in the current execution context) has
+ superuser privileges. These users are usually the same, but they can
+ differ, for example, if the current user was changed with the
+ <command>SET ROLE</command> command.
+ </para>
</listitem>
</varlistentry>
--
2.49.0
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2025-06-13 03:05 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:57 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 13+ messages in thread
From: Fujii Masao @ 2025-06-13 03:05 UTC (permalink / raw)
To: Robert Treat <rob@xzilla.net>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-hackers
On 2025/06/04 20:18, Fujii Masao wrote:
>
>
> On 2025/06/03 20:22, Robert Treat wrote:
>> +1 on the idea to put it there; if someone gets confused about the
>> behavior, that seems like the place they'd go to look it up. Though I
>> would wordsmith the patch a little:
>>
>> + Note that the <structfield>Client User</structfield> field
>> shows the user at the time
>> + of connection, while the
>> <structfield>Superuser</structfield> field indicates
>> + whether the current user (in the current execution context) has
>> + superuser privileges. These users are usually the same, but they can
>> + differ, for example, if the current user was changed with the
>> + <command>SET ROLE</command> command.
>
> This looks good to me, thanks for the review! I've updated the patch (0002)
> as you suggested and attached it.
Barring any objections, I will commit this patch.
> I've also re-attached the 0001 patch that makes \conninfo report the full
> protocol version, it's the same as the one I posted earlier in the thread.
The 0001 patch changes \conninfo to report the full protocol version (e.g., 3.2)
instead of just the major version (e.g., 3). This is technically a behavior change,
but since protocol version 3.2 was introduced in v18, and both 3.0 and 3.2 are
now valid, always showing just "3" isn't very helpful. To see which protocol
version is actually in use, showing the full version is more informative.
Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd like to
commit the 0001 patch as well in v18. Thought?
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2025-06-13 03:57 ` David G. Johnston <david.g.johnston@gmail.com>
2025-06-13 04:32 ` Re: Suggestions for improving \conninfo output in v18 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 13+ messages in thread
From: David G. Johnston @ 2025-06-13 03:57 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: Robert Treat <rob@xzilla.net>; pgsql-hackers
On Thu, Jun 12, 2025 at 8:05 PM Fujii Masao <masao.fujii@oss.nttdata.com>
wrote:
> On 2025/06/04 20:18, Fujii Masao wrote:
>
> > I've also re-attached the 0001 patch that makes \conninfo report the full
> > protocol version, it's the same as the one I posted earlier in the
> thread.
>
> The 0001 patch changes \conninfo to report the full protocol version
> (e.g., 3.2)
> instead of just the major version (e.g., 3). This is technically a
> behavior change,
> but since protocol version 3.2 was introduced in v18, and both 3.0 and 3.2
> are
> now valid, always showing just "3" isn't very helpful. To see which
> protocol
> version is actually in use, showing the full version is more informative.
>
> Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd
> like to
> commit the 0001 patch as well in v18. Thought?
>
>
You should get the concurrence of the RMT. But given that the output is
new in v18 anyway my view is the original reworking of this view to be
tabular just chose the wrong field to display and that needs to be fixed.
Also, I was under the impression that updating relevant documentation for
a feature wasn't even subject to RMT review; i.e., 0002 should go in too if
it's otherwise committable. The feature it clarifies just changed/was
added so having our best docs present at release should be a project goal.
David J.
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:57 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
@ 2025-06-13 04:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-06-13 09:52 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 13+ messages in thread
From: Tom Lane @ 2025-06-13 04:32 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Fujii Masao <masao.fujii@oss.nttdata.com>; Robert Treat <rob@xzilla.net>; pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Jun 12, 2025 at 8:05 PM Fujii Masao <masao.fujii@oss.nttdata.com>
> wrote:
>> Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd
>> like to commit the 0001 patch as well in v18. Thought?
> You should get the concurrence of the RMT.
> ...
> Also, I was under the impression that updating relevant documentation for
> a feature wasn't even subject to RMT review;
FWIW, I agree with David's view of both of these points. RMT
review of 0001 should be a formality here, but nonetheless
we should adhere to process.
regards, tom lane
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:57 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-13 04:32 ` Re: Suggestions for improving \conninfo output in v18 Tom Lane <tgl@sss.pgh.pa.us>
@ 2025-06-13 09:52 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 13:50 ` Re: Suggestions for improving \conninfo output in v18 Nathan Bossart <nathandbossart@gmail.com>
0 siblings, 1 reply; 13+ messages in thread
From: Fujii Masao @ 2025-06-13 09:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; David G. Johnston <david.g.johnston@gmail.com>; +Cc: Robert Treat <rob@xzilla.net>; pgsql-hackers; nathandbossart@gmail.com; tomas@vondra.me; hlinnaka@iki.fi
On 2025/06/13 13:32, Tom Lane wrote:
> "David G. Johnston" <david.g.johnston@gmail.com> writes:
>> On Thu, Jun 12, 2025 at 8:05 PM Fujii Masao <masao.fujii@oss.nttdata.com>
>> wrote:
>>> Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd
>>> like to commit the 0001 patch as well in v18. Thought?
>
>> You should get the concurrence of the RMT.
>> ...
>> Also, I was under the impression that updating relevant documentation for
>> a feature wasn't even subject to RMT review;
>
> FWIW, I agree with David's view of both of these points. RMT
> review of 0001 should be a formality here, but nonetheless
> we should adhere to process.
Agreed. Thanks to both of you for the comment!
I've added the RMT to CC. What do you think about including the 0001 patch in v18?
Would you be okay with that?
-----------------------
The 0001 patch changes \conninfo to report the full protocol version (e.g., 3.2)
instead of just the major version (e.g., 3). This is technically a behavior change,
but since protocol version 3.2 was introduced in v18, and both 3.0 and 3.2 are
now valid, always showing just "3" isn't very helpful. To see which protocol
version is actually in use, showing the full version is more informative.
Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd like to
commit the 0001 patch as well in v18. Thought?
-----------------------
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:57 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-13 04:32 ` Re: Suggestions for improving \conninfo output in v18 Tom Lane <tgl@sss.pgh.pa.us>
2025-06-13 09:52 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2025-06-13 13:50 ` Nathan Bossart <nathandbossart@gmail.com>
2025-06-14 01:41 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 13+ messages in thread
From: Nathan Bossart @ 2025-06-13 13:50 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; David G. Johnston <david.g.johnston@gmail.com>; Robert Treat <rob@xzilla.net>; pgsql-hackers; tomas@vondra.me; hlinnaka@iki.fi
On Fri, Jun 13, 2025 at 06:52:26PM +0900, Fujii Masao wrote:
> I've added the RMT to CC. What do you think about including the 0001 patch in v18?
> Would you be okay with that?
>
> -----------------------
> The 0001 patch changes \conninfo to report the full protocol version (e.g., 3.2)
> instead of just the major version (e.g., 3). This is technically a behavior change,
> but since protocol version 3.2 was introduced in v18, and both 3.0 and 3.2 are
> now valid, always showing just "3" isn't very helpful. To see which protocol
> version is actually in use, showing the full version is more informative.
>
> Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd like to
> commit the 0001 patch as well in v18. Thought?
> -----------------------
Sounds good to me.
--
nathan
^ permalink raw reply [nested|flat] 13+ messages in thread
* Re: Suggestions for improving \conninfo output in v18
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Re: Suggestions for improving \conninfo output in v18 Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:57 ` Re: Suggestions for improving \conninfo output in v18 David G. Johnston <david.g.johnston@gmail.com>
2025-06-13 04:32 ` Re: Suggestions for improving \conninfo output in v18 Tom Lane <tgl@sss.pgh.pa.us>
2025-06-13 09:52 ` Re: Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 13:50 ` Re: Suggestions for improving \conninfo output in v18 Nathan Bossart <nathandbossart@gmail.com>
@ 2025-06-14 01:41 ` Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 0 replies; 13+ messages in thread
From: Fujii Masao @ 2025-06-14 01:41 UTC (permalink / raw)
To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; David G. Johnston <david.g.johnston@gmail.com>; Robert Treat <rob@xzilla.net>; pgsql-hackers; tomas@vondra.me; hlinnaka@iki.fi
On 2025/06/13 22:50, Nathan Bossart wrote:
> On Fri, Jun 13, 2025 at 06:52:26PM +0900, Fujii Masao wrote:
>> I've added the RMT to CC. What do you think about including the 0001 patch in v18?
>> Would you be okay with that?
>>
>> -----------------------
>> The 0001 patch changes \conninfo to report the full protocol version (e.g., 3.2)
>> instead of just the major version (e.g., 3). This is technically a behavior change,
>> but since protocol version 3.2 was introduced in v18, and both 3.0 and 3.2 are
>> now valid, always showing just "3" isn't very helpful. To see which protocol
>> version is actually in use, showing the full version is more informative.
>>
>> Therefore I see this as fixing an oversight in commit bba2fbc6238, so I'd like to
>> commit the 0001 patch as well in v18. Thought?
>> -----------------------
>
> Sounds good to me.
Thanks for confirming! I've now pushed the 0001 patch.
As discussed earlier, I've also committed the 0002 patch.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
^ permalink raw reply [nested|flat] 13+ messages in thread
end of thread, other threads:[~2025-06-14 01:41 UTC | newest]
Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-02 04:48 Suggestions for improving \conninfo output in v18 Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 05:24 ` David G. Johnston <david.g.johnston@gmail.com>
2025-06-02 06:39 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-02 12:53 ` David G. Johnston <david.g.johnston@gmail.com>
2025-06-03 08:28 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-03 11:22 ` Robert Treat <rob@xzilla.net>
2025-06-04 11:18 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:05 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 03:57 ` David G. Johnston <david.g.johnston@gmail.com>
2025-06-13 04:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-06-13 09:52 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2025-06-13 13:50 ` Nathan Bossart <nathandbossart@gmail.com>
2025-06-14 01:41 ` Fujii Masao <masao.fujii@oss.nttdata.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox