From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Sami Imseih <samimseih(at)gmail(dot)com> |
Cc: | Hunaid Sohail <hunaidpgml(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Erik Wienhold <ewie(at)ewie(dot)name>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
Subject: | Re: Psql meta-command conninfo+ |
Date: | 2025-01-20 11:40:03 |
Message-ID: | 202501201140.wt4nbx5y2dyl@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2025-Jan-17, Sami Imseih wrote:
> > Wait a second, why do we have these here? Aren't they already in
> > \dconfig?
>
> \dconfig is generated by querying pg_settings and this
> requires a halthy connection. The parameters being proposed with
> \conninfo+ are set in libpq by the server [1] and can be retrieved
> even if the connection breaks.
>
> Some of these parameters may overlap \dconfig, but I don't see
> that as a problem.
I feel the need to step back and ask, what problem are we solving here?
Your explanation isn't wrong, but I'm not sure why does a psql user need
all these.
I think you wanted to display "is_superuser" and that seems sensible in
the context of \conninfo+, and perhaps even "role" and "in_hot_standby"
would make sense; but the rest of the parameters that libpq stores do
not seem terribly interesting or relevant here.
That leads me to also wonder why don't we change \conninfo to have this
tabular behavior instead of creating a separate command for it. Why do
we need to keep the existing form of \conninfo? To me it seems strictly
less useful, as it is harder to read.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Herrera | 2025-01-20 12:00:31 | Re: Replace current implementations in crypt() and gen_salt() to OpenSSL |
Previous Message | Hannu Krosing | 2025-01-20 11:17:00 | Re: Purpose of wal_init_zero |