>Hmm, I noticed that this would call printSSLInfo() and printGSSInfo() >after listConnectionInformation. It would be much better to show these >in tabular format as well and remove the calls to printSSL/GSSInfo. > >I propose additional columns to the same \conninfo+ table; when SSL, >like this: > >Database | postgres >[...] >Host | 127.0.0.1 >Encryption | SSL >Protocol | PQsslAttribute(protocol) >Cipher | PQsslAttribute(cipher) >Compression | PQsslAttribute(compression) > >When GSS, like this > >Database | postgres >[...] >Host | 127.0.0.1 >Encryption | GSS > >(why don't we print anything else in printGSSInfo()? That's weird.)
--//-- Hi Álvaro, Thank you for the suggestion. I will remove printSSLInfo() and printGSSInfo() and incorporate the suggested fields into the tabular result of "\conninfo+". If it's necessary to adjust printGSSInfo(), we can work on that as well. At first glance, I leave it open for others to analyze and give their opinion. I'd also like to ask for help with a difficulty. Currently, I'm working on resolving this situation (highlighted by Pavel Luzanov). How can we make \conninfo return the same message as \conninfo+ after closing the current session in another session with pg_terminate_backend(pid)? [postgres@localhost bin]$ ./psql psql (17devel) Type "help" for help. postgres=# \conninfo You are connected to database "postgres" as user "postgres" via socket in "/tmp" at port "5432". postgres=# \conninfo+ Current Connection Information Database | Authenticated User | System User | Current User | Session User | Backend PID | Server Address | Server Port | Client Address | Client Port | Socket Directory | Host ----------+--------------------+-------------+--------------+--------------+-------------+----------------+-------------+----------------+-------------+------------------+------ postgres | postgres | | postgres | postgres | 17281 | | 5432 | | | /tmp | (1 row) postgres=# 2024-02-09 09:15:24.152 -03 [17281] FATAL: terminating connection due to administrator command postgres=# \conninfo You are connected to database "postgres" as user "postgres" via socket in "/tmp" at port "5432". postgres=# \conninfo+ FATAL: terminating connection due to administrator command server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Succeeded. postgres=# Tks a lot! Maiquel Grassi.