title: Is there a good off-the-shelf distributed database solution for Postgres (PostgreSQL)?
body: <p>I understand how to join nodes into a cluster, remove them, etc. using Postgres, but I'm wondering if there are any software solutions out there that will manage the complexities for me of having a distributed database across N physical nodes.</p>
  
  <p>Specifically, is there any off-the-shelf solution out there that will handle:</p>
  
  <ol>
  <li><p>N nodes (where N is at least 3) running the distributed database with Q copies where Q is at least 2 and less than or equal to N (for example, if N is 3 and Q is 2, any piece of data must be replicated between 2 physical nodes out of the 3-node cluster).</p></li>
  <li><p>If a node goes down, the distributed database will continue to run in a degraded mode provided that less than Q nodes have gone down.</p></li>
  <li><p>If a node that went down comes back up, the distributed database will automatically sync up the degraded node.</p></li>
  <li><p>Nodes can be added to the distributed database after initial configuration.  This does not necessarily have to trigger a re-balancing, but the node should be considered for placement of new data for the distributed database.</p></li>
  <li><p>Nodes can be removed from the distributed database after initial configuration.  When this occurs, any data on the removed node must be replicated to other nodes so that we can get back to Q good copies online.</p></li>
  </ol>