Re: Psql meta-command conninfo+
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sami Imseih <samimseih@gmail.com>
Cc: Maiquel Grassi <grassi@hotmail.com.br>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
Hunaid Sohail <hunaidpgml@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Jim Jones <jim.jones@uni-muenster.de>,
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>,
Dean Rasheed <dean.a.rasheed@gmail.com>
Date: 2025-02-21T20:33:26Z
Lists: pgsql-hackers
Sami Imseih <samimseih@gmail.com> writes: >> Maybe keeping track of 'role' via ParameterStatus messages is a good >> idea for reasons unrelated to this patch -- maybe it can be useful for >> applications to be aware of role changes -- but I'm not 100% sure about >> that, and in particular I'm not sure how heavy the protocol traffic is >> going to be if such messages are emitted every time you run a security >> invoker function or things like that > With the latest version of the patch, 'role' is not needed as > 'session authorization' is not shown either [1]. FWIW, the server currently sends at most one ParameterStatus change report per query. So I don't think that there is a huge performance argument against making 'role' be GUC_REPORT. On the other hand, supporting \conninfo is a pretty lousy argument for doing so --- surely we don't need a constantly-updated value to support a seldom-used command. Moreover, if \conninfo depended on that it wouldn't work with older servers. If we want to include 'role' in this output, what I'd propose is to have \conninfo issue "SHOW role", which is accepted by every server version. If it fails (say because we're in an aborted transaction), just omit that row from the output. regards, tom lane
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