Re: Setting libpq TCP keepalive parameters from environment

Поиск
Список
Период
Сортировка
От Oleksandr Shulgin
Тема Re: Setting libpq TCP keepalive parameters from environment
Дата
Msg-id CACACo5RvdMHx4XXqQJEMmN2_FmKSz5iLL9nTgBton-Gh4Q3wRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Setting libpq TCP keepalive parameters from environment  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
On Wed, May 9, 2018 at 1:58 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
>
> It would be much more convenient to just set the environment variable when
> running the script and let it affect the whole process and its children.
>
> Would a patch be welcome?

I can't really comment on that part, but:

PGOPTIONS="-c tcp_keepalives_count=5 -c tcp_keepalives_interval=60"
psql 'host=localhost'

should enable server-side keepalives. Unsure how much that helps you
if you need client-side keepalives too.

Good point, in our specific case it appears to work as well if it's the server who sends the keepalives.

Thank you,
--
Alex

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Should we add GUCs to allow partition pruning to be disabled?
Следующее
От: Arseny Sher
Дата:
Сообщение: Indexes on partitioned tables and foreign partitions