Criteria to "degrade" synchronous replication?

Поиск
Список
Период
Сортировка
От David Pirotte
Тема Criteria to "degrade" synchronous replication?
Дата
Msg-id CAOXUAcLMvN7YHPc_LPDfc6MpphOBDax+B7pU2F9-GhHjQpvaDw@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
I have configured a two-node 9.1 cluster with synchronous streaming replication.  In the event that the standby server fails, a daemon will degrade the cluster by setting synchronous_standby_names to "" on the master and reload the config.  (My use case is such where availability is preferred over blocking writes in this failure case.)  When the standby rejoins and catches up, the same daemon will reset synchronous_standby_names and reload, re-enabling synchronous replication.

I'm trying to come up with reasonable criteria to trigger the degradation.  My general thought is to simply check whether any pg_stat_replication entries have sync_state = 'sync' and rely on that.  Are there any other data points that are worth considering?  Or, is there a better way to approach this problem?

Cheers,
Dave

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

Предыдущее
От: Marina Sprava
Дата:
Сообщение: Manage PostgreSQL Remotely: Backup/Restore Dumps Easily
Следующее
От: Jayashankar K B
Дата:
Сообщение: Postgres crash during Stored procedure execution