Re: keepliaves etc. as environment variables

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: keepliaves etc. as environment variables
Date: 2021-12-03 20:52:14
Message-ID: CA+Tgmobr8G4CRqe-=pPvhM5Pr_pmRYEFSU96LABibu7Pdo2k0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 2, 2021 at 8:59 PM Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
> > On 2021-12-03 10:28:34 +0900, Tatsuo Ishii wrote:
> >> It seems there are no environment variables corresponding to keepalives
> >> etc. connection parameters in libpq. Is there any reason for this?
> >
> > PGOPTIONS='-c tcp_keepalive_*=foo' should work.
>
> Sorry I was not clear. I wanted to know why there are no specific
> environment variable for keepalives etc. like PGCONNECT_TIMEOUT.

In theory we could have an environment variable for every connection
parameter, but there's some cost to that. For example, if some program
wants to sanitize the environment of all PG-related environment
variables, it has more to do. It seems reasonable to me to have
environment variables only for the most important connection
parameters, rather than all of them. I would argue we've overdone it
already.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-12-03 21:32:21 Transparent column encryption
Previous Message Robert Haas 2021-12-03 20:46:04 Re: pg_dump versus ancient server versions