Search Postgresql Archives

Criteria to "degrade" synchronous replication?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux