Re: Psql meta-command conninfo+
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Hunaid Sohail <hunaidpgml@gmail.com>
Cc: Maiquel Grassi <grassi@hotmail.com.br>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Jim Jones <jim.jones@uni-muenster.de>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Nathan Bossart <nathandbossart@gmail.com>, "Imseih (AWS),
Sami" <simseih@amazon.com>, Peter Eisentraut <peter@eisentraut.org>,
Pavel Luzanov <p.luzanov@postgrespro.ru>, Erik Wienhold <ewie@ewie.name>,
"David G. Johnston" <david.g.johnston@gmail.com>
Date: 2025-01-08T02:14:25Z
Lists: pgsql-hackers
>> I think "Connection Encryption" seems unnecessary here as >> well and it could be added to "Connection Information". > > > Yes, we can do that, but we’d be left with two tables: > "Connection Information" and "Server Parameter Settings". Does that work? After looking at this ever more today, I think "Server Parameter Settings" is confusing as well. I think "Connection Status" instead of "Current Status" as is defined in v36 will work better. This way we will have "Connection Info" and "Connection Status". Connection Status will reflect the values of specific parameters that the server reports. > >> "Server Parameter Settings": This section should include >> all under [1]. For example, "in_hot_standby" is very >> useful, and so is "application_name". Why are they >> not included? > > > There was a discussion about "application_name" earlier in the thread, and it was removed by the original author. > However, since we now have a separate table, it makes sense to include all parameters. Including all the parameters in [1] under "Server Parameter Settings" (or "Connection Status") seems like the easy choice here. Some may not be as useful as others, but I don't think we should pick and choose either. Maybe someone else has other thoughts about this? > Agreed. However, since we're using the libpq API, I don't think we can retrieve the role name. > Maybe remove "Session Authorization" instead? We can include role by marking the "role" guc with the GUC_REPORT flag in guc_tables.c. I really think without it, the is_superuser field will be incomplete. This is because either "role" or "session authorization" will change the is_superuser. A thought also, that if we do choose to report all the parameters in [1], it should be coded in a more dynamic way. Maybe loop through the conn->pstatus list? For example I see "search_path" will be added to the list in the next release. [1] https://www.postgresql.org/docs/devel/libpq-status.html Regards, Sami
Commits
-
psql: Change new \conninfo to use SSL instead of TLS
- 6d6480066c1a 18.0 landed
-
Change \conninfo to use tabular format
- bba2fbc6238b 18.0 landed
-
Update extension lookup routines to use the syscache
- d8df7ac5c04c 18.0 cited
-
Improve COPY TO performance when server and client encodings match
- b619852086ed 17.0 cited
-
doc: Remove superfluous bracket in synopsis
- fdfb92c0307c 17.0 cited
-
Remove psql support for server versions preceding 9.2.
- cf0cab868aa4 15.0 cited