Search Postgresql Archives

Re: Feature request: psql --idle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux