Criteria to "degrade" synchronous replication?

From: David Pirotte <dpirotte(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Criteria to "degrade" synchronous replication?
Date: 2012-06-05 16:13:34
Message-ID: CAOXUAcLMvN7YHPc_LPDfc6MpphOBDax+B7pU2F9-GhHjQpvaDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Jayashankar K B 2012-06-05 16:16:34 Postgres crash during Stored procedure execution
Previous Message Divyaprakash Y 2012-06-05 13:38:17 Postgresql support for windows 8 and Windows 2012 server