Link to home
Start Free TrialLog in
Avatar of lorddef
lorddef

asked on

PostgreSQL with master -> multiple slaves. What to use?

Hi People,

We're looking to move our DBMS to PostgreSQL, and I'm looking for a good reliable replication system to use.

The idea is this; a master and slave onsite and then another slave at our second premises down a 10Mb line.

I've looked about and seen mnay different projects about to do this, and I could do with a bit of advice. Has anyone done this, and how good is it?

From what I see slony or pgreplicator do this.

Having tried the innodb replication built into MySQL something similar would be ace. The only reason we're not going with MySQL is I seem to be told everywhere that it's not as fault tollerent as Postgres, however nobody has given me an explanation why.

Thanks

Avatar of rabroersma
rabroersma

> The only reason we're not going with MySQL is I seem to be told everywhere that it's not as fault tollerent > as Postgres, however nobody has given me an explanation why.

I am not to sure how innodb compares since most of the Fault tolerant comparisons I've seen were were against MyISAM.

Basically the "pull the power cord" test is given as a test case where your server is un-expectingly halted.  Barring that no hardward fails as a result of the power loss, Postgres ensures that all transactions <including ddl in the transaction> will either be fully committed or fully rolled back.  Some other database brands "may" leave the database in an in-consistent state where some open transactions are partially applied to the database.  Also, postgres has developed the reputation of not crashing under heavy load although it also has/had the reputation of being slower than the composition.  
If mysql ever had a reputation of crashing, I am pretty sure it was only the older versions that had this problem.  Also, if postgresql had a reputation of being slow, the newer versions have certainly improved in the bench marks for speed.
Take a look at EnterpriseDB.  They have both a supported distribution of PostgreSQL as well as an extended product that boasts both a high degree of Oracle compatibility as well as built in replication.

If your organization both needs and is willing to pay for the level of fault tolerance you are proposing, it is worthwhile to look at commercially supported products to do it.

Regards,
Bill
Avatar of lorddef

ASKER

Hi grant300,

I have seen enterprise DB and am concidering it, infact was thinking of going with their postgres support, just wondered what different replication methods were about.
ASKER CERTIFIED SOLUTION
Avatar of rabroersma
rabroersma

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Slony will certainly do what you're looking for.  I've also looked at EnterpriseDB, and it has more capabilities than does Slony, including multi-master and load sharing capabilities, but these additional features weren't specified. From what I've seen, they do have good PostgreSQL support.

MySQL's reputation has been in the area of raw speed, however this is misleading.  When MySQL is using InnoDB tables (as close as "apples-to-apples" as they can do, in terms of ACID support, there is not a lot of speed difference between the two.  And, as the number of simultaneous connections and workload increase, PostgreSQL's performance soon outshine MySQL.  Take a look at this on-line article by tweakers.net: http://tweakers.net/reviews/657   The article describes testing, intended as a hardware test of various multicore servers.  They used MySQL 4, MySQL 5, and PostgreSQL 8.1 beta.   The results are enightening.
Avatar of lorddef

ASKER

Thanks loguin.

I settled on slony a week after my initial post anyway.