Hi, Jose Ildefonso Camargo Tolosa <ildefonso.cama...@gmail.com> writes: > environments. And no, it doesn't makes synchronous replication > meaningless, because it will work synchronous if it have someone to > sync to, and work async (or standalone) if it doesn't: that's perfect > for HA environment.
You seem to want Service Availibility when we are providing Data Availibility. I'm not saying you shouldn't ask what you're asking, just that it is a different need. If you troll the archives, you will see that this debate has received much consideration already. The conclusion is that if you care about Service Availibility you should have 2 standby servers and set them both as candidates to being the synchronous one. That way, when you lose one standby the service is unaffected, the second standby is now the synchronous one, and it's possible to re-attach the failed standby live, with or without archiving (with is preferred so that the master isn't involved in the catch-up phase). > As synchronous standby currently is, it just doesn't fit the HA usage, It does actually allow both data high availability and service high availability, provided that you feed at least two standbys. What you seem to be asking is both data and service high availability with only two nodes. You're right that we can not provide that with current releases of PostgreSQL. I'm not sure anyone has a solid plan to make that happen. > and if you really want to keep it that way, it doesn't belong to the > HA chapter on the pgsql documentation, and should be moved. And NO > async replication will *not* work for HA, because the master can have > more transactions than standby, and if the master crashes, the standby > will have no way to recover these transactions, with synchronous > replication we have *exactly* what we need: the data in the standby, > after all, it will apply it once we promote it. Exactly. We want data availability first. Service availability is important too, and for that you need another standby. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers