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
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.