From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Wiwwo Staff <wiwwo(at)wiwwo(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Feature request: psql --idle |
Date: | 2022-07-27 14:07:02 |
Message-ID: | 20220727140702.x5vpzsuf62ibxvpf@jrouhaud |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
On Wed, Jul 27, 2022 at 02:49:45PM +0200, Wiwwo Staff wrote:
> Since changing ph_hda.conf file to give users access involves the restart
> of server, many companies I work(ed) use a bastion host, where users ssh
> to, and are allowed "somehow" use postgresql.
You mean pg_hba.conf right? It doesn't need a restart, only a reload as
documented at https://www.postgresql.org/docs/current/auth-pg-hba-conf.html:
>The pg_hba.conf file is read on start-up and when the main server process
>receives a SIGHUP signal. If you edit the file on an active system, you will
>need to signal the postmaster (using pg_ctl reload, calling the SQL function
>pg_reload_conf(), or using kill -HUP) to make it re-read the file.
That being said, it's usually not a good idea to allow connection from all
around the world, so not all users may be able to connect from their local
machine anyway.
> What would help, is a --idle option, where psql does not exit, stays idle
> and waits for user to give a \conn command.
> Something similar to
> sqlplus /nolog
>
> Is anything like that feasible or is there another solution/workaround?
That might be a good thing to have, as some users may want to rely on psql for
things like \h or \? to work on stuff while not being able to connect to a
remote server (and for some reason who wouldn't want to, or maybe couldn't,
install a local instance). I would call it something like "--no-connection"
more than "--idle" though.
From | Date | Subject | |
---|---|---|---|
Next Message | Lars Vonk | 2022-07-27 15:39:21 | Performance issue on GIN index with gin_trgm_ops index column |
Previous Message | Mateusz Henicz | 2022-07-27 14:06:09 | Re: Feature request: psql --idle |