Re: Changing the setting of wal_sender_timeout per standby

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Changing the setting of wal_sender_timeout per standby
Дата
Msg-id 20180913033230.GC3578@paquier.xyz
обсуждение исходный текст
Ответ на Changing the setting of wal_sender_timeout per standby  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Ответы Re: Changing the setting of wal_sender_timeout per standby  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On Thu, Sep 13, 2018 at 01:14:12AM +0000, Tsunakawa, Takayuki wrote:
> Some customer wants to change the setting per standby, i.e., a shorter
> timeout for a standby in the same region to enable faster detection
> failure and failover, and a longer timeout for a standby in the remote
> region (for disaster recovery) to avoid mis-judging its health.

This argument is sensible.

> The current PGC_HUP allows to change the setting by editing
> postgresql.conf or ALTER SYSTEM and then sending SIGHUP to a specific
> walsender.  But that's not easy to use.  The user has to do it upon
> every switchover and failover.
>
> With PGC_BACKEND, the user would be able to tune the timeout as follows:
>
> [recovery.conf]
> primary_conninfo = '... options=''-c wal_sender_timeout=60000'' ...'
>
> With PGC_USERSET, the user would be able to use different user
> accounts for each standby, and tune the setting as follows:
>
> ALTER USER repluser_remote SET wal_sender_timeout = 60000;

It seems to me that switching to PGC_BACKENDwould cover already all the
use-cases you are mentioning, as at the end one would just want to
adjust the WAL sender timeout on a connection basis depending on the
geographical location of the receiver and the latency between primary
and standby.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT