Thread: Replication/Failover/HA solution
I am having a hard time selecting a Replication/Failover/HA solution for PGSQL. What is troubling is the number of solutions available in various states of development. Does the fact that dbmirror and rserv appear in the contrib directory, mean that they should be looked upon with more legitimacy? Any suggestions? Any help appreciated.
On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: > I am having a hard time selecting a Replication/Failover/HA solution for > PGSQL. What is troubling is the number of solutions available in various > states of development. Does the fact that dbmirror and rserv appear in > the contrib directory, mean that they should be looked upon with more > legitimacy? Any suggestions? Some code that descended from rserv is about to be released to the community. We use it today in production. It's pretty rough around the edges, and it depends on Java, if you can stand that, but it's definitely battle-tested. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
7/22/03 3:32:03 PM, Andrew Sullivan <andrew@libertyrms.info> wrote: >On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: >> I am having a hard time selecting a Replication/Failover/HA solution for >> PGSQL. What is troubling is the number of solutions available in various >> states of development. Does the fact that dbmirror and rserv appear in >> the contrib directory, mean that they should be looked upon with more >> legitimacy? Any suggestions? > >Some code that descended from rserv is about to be released to the >community. We use it today in production. It's pretty rough around >the edges, and it depends on Java, if you can stand that, but it's >definitely battle-tested. Sorry -- by "production", what release version do you mean? Thanks, Andrew > >A > >-- >---- >Andrew Sullivan 204-4141 Yonge Street >Liberty RMS Toronto, Ontario Canada ><andrew@libertyrms.info> M2P 2A8 > +1 416 646 3304 x110 > > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > >
psql [dbname and various options] -f [filename] -----Mensaje original----- De: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]En nombre de Andrew Biagioni Enviado el: martes, 22 de julio de 2003 16:25 Para: pgsql-admin@postgresql.org; Andrew Sullivan Asunto: Re: [ADMIN] Replication/Failover/HA solution 7/22/03 3:32:03 PM, Andrew Sullivan <andrew@libertyrms.info> wrote: >On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: >> I am having a hard time selecting a Replication/Failover/HA solution for >> PGSQL. What is troubling is the number of solutions available in various >> states of development. Does the fact that dbmirror and rserv appear in >> the contrib directory, mean that they should be looked upon with more >> legitimacy? Any suggestions? > >Some code that descended from rserv is about to be released to the >community. We use it today in production. It's pretty rough around >the edges, and it depends on Java, if you can stand that, but it's >definitely battle-tested. Sorry -- by "production", what release version do you mean? Thanks, Andrew > >A > >-- >---- >Andrew Sullivan 204-4141 Yonge Street >Liberty RMS Toronto, Ontario Canada ><andrew@libertyrms.info> M2P 2A8 > +1 416 646 3304 x110 > > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Sorry, was an error... -----Mensaje original----- De: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]En nombre de Santiago Matiz Enviado el: martes, 22 de julio de 2003 16:53 Para: Andrew Biagioni; pgsql-admin@postgresql.org; Andrew Sullivan Asunto: Re: [ADMIN] Replication/Failover/HA solution psql [dbname and various options] -f [filename] -----Mensaje original----- De: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]En nombre de Andrew Biagioni Enviado el: martes, 22 de julio de 2003 16:25 Para: pgsql-admin@postgresql.org; Andrew Sullivan Asunto: Re: [ADMIN] Replication/Failover/HA solution 7/22/03 3:32:03 PM, Andrew Sullivan <andrew@libertyrms.info> wrote: >On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: >> I am having a hard time selecting a Replication/Failover/HA solution for >> PGSQL. What is troubling is the number of solutions available in various >> states of development. Does the fact that dbmirror and rserv appear in >> the contrib directory, mean that they should be looked upon with more >> legitimacy? Any suggestions? > >Some code that descended from rserv is about to be released to the >community. We use it today in production. It's pretty rough around >the edges, and it depends on Java, if you can stand that, but it's >definitely battle-tested. Sorry -- by "production", what release version do you mean? Thanks, Andrew > >A > >-- >---- >Andrew Sullivan 204-4141 Yonge Street >Liberty RMS Toronto, Ontario Canada ><andrew@libertyrms.info> M2P 2A8 > +1 416 646 3304 x110 > > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
On Tue, Jul 22, 2003 at 05:25:28PM -0400, Andrew Biagioni wrote: > Sorry -- by "production", what release version do you mean? eRServer v1.0 A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
Does it just slightly depend on java or is the whole package developed in java. I generally prefer solutions based on C and C++ because of the performance advantage and they are nice and compact and can be packaged up into a nice executable or shared library. I have had very bad experiences with Java and performance issues - even with JIT. It also requires a massive JRE to be running on the machine that consumes memory and cpu cycles like there is no tomorrow. Java is a nice tool to replace cobol and to develop payroll and web applications, but I do not prefer it for core systems development. Either way I would love to see and test your solution and thanks for making it available to the public. Andrew Sullivan wrote: >On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: > > >>I am having a hard time selecting a Replication/Failover/HA solution for >>PGSQL. What is troubling is the number of solutions available in various >>states of development. Does the fact that dbmirror and rserv appear in >>the contrib directory, mean that they should be looked upon with more >>legitimacy? Any suggestions? >> >> > >Some code that descended from rserv is about to be released to the >community. We use it today in production. It's pretty rough around >the edges, and it depends on Java, if you can stand that, but it's >definitely battle-tested. > >A > > >
On Tue, Jul 22, 2003 at 03:49:00PM -0400, Renney Thomas wrote: > Does it just slightly depend on java or is the whole package developed > in java. At the moment, the trigger inside the database is C and the egine which does the replication is Java. > Either way I would love to see and test your solution and thanks for > making it available to the public. Don't thank me -- it's PostgreSQL, Inc. that's releasing it, 'cause it's their code. I'm just a waterboy. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: > I am having a hard time selecting a Replication/Failover/HA solution for > PGSQL. What is troubling is the number of solutions available in various > states of development. Does the fact that dbmirror and rserv appear in > the contrib directory, mean that they should be looked upon with more > legitimacy? Any suggestions? One possibility is to run postgresql (regular postgresql - no patches required) controlled by heartbeat (http://www.linux-ha.org/) on two nodes. Heartbeat will then make sure that only one of the nodes are active at any time. You will have to put the databases on shared storage; either something like a shared SCSI RAID, or a software replication device like drdb or md+nbd. Make sure you have proper fencing in place, so you don't end up in a situation where both nodes are active and modifying your database. You should probably subscribe to the linux-ha mailinglist if you want to take this approach. -- Ragnar Kjorstad
Ragnar Kjørstad wrote: >On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: > > >>I am having a hard time selecting a Replication/Failover/HA solution for >>PGSQL. What is troubling is the number of solutions available in various >>states of development. Does the fact that dbmirror and rserv appear in >>the contrib directory, mean that they should be looked upon with more >>legitimacy? Any suggestions? >> >> > >One possibility is to run postgresql (regular postgresql - no patches >required) controlled by heartbeat (http://www.linux-ha.org/) on two >nodes. Heartbeat will then make sure that only one of the nodes are >active at any time. > >You will have to put the databases on shared storage; either something >like a shared SCSI RAID, or a software replication device like drdb or >md+nbd. > I think it has been pointed out many times in the list the running postgresql on a shared storage is dangerous. Regds Mallah. > >Make sure you have proper fencing in place, so you don't end up in a >situation where both nodes are active and modifying your database. > >You should probably subscribe to the linux-ha mailinglist if you want to >take this approach. > > > > >
On Wed, Jul 30, 2003 at 01:55:00AM +0530, Rajesh Kumar Mallah wrote: > >One possibility is to run postgresql (regular postgresql - no patches > >required) controlled by heartbeat (http://www.linux-ha.org/) on two > >nodes. Heartbeat will then make sure that only one of the nodes are > >active at any time. > > > >You will have to put the databases on shared storage; either something > >like a shared SCSI RAID, or a software replication device like drdb or > >md+nbd. > > I think it has been pointed out many times in the list > the running postgresql on a shared storage is dangerous. Running _any_ application on shared storage requires meassures to make sure the data is not corrupted. And yes, it is dangerous unless you get it right. Bascily the problem is that is you are not careful both nodes can start postgresql at once, and they _will_ corrupt the database. The HA-software (like heartbeat) and the fencing-software (like stonith) will take care of this, making it safe. -- Ragnar Kjorstad
Ragnar Kjørstad wrote: >On Mon, Jul 21, 2003 at 06:11:15PM -0400, Renney Thomas wrote: > > >>I am having a hard time selecting a Replication/Failover/HA solution for >>PGSQL. What is troubling is the number of solutions available in various >>states of development. Does the fact that dbmirror and rserv appear in >>the contrib directory, mean that they should be looked upon with more >>legitimacy? Any suggestions? >> >> > >One possibility is to run postgresql (regular postgresql - no patches >required) controlled by heartbeat (http://www.linux-ha.org/) on two >nodes. Heartbeat will then make sure that only one of the nodes are >active at any time. > >You will have to put the databases on shared storage; either something >like a shared SCSI RAID, or a software replication device like drdb or >md+nbd. > > Another possibility (which I have not yet tested, but it was mentioned in many Magazine Articles (Linux Magazine, the German iX) is DRBD. This Tool creates a RAID which is Shared betwenn 2 Nodes. One Node is the Master and the Other is the Slave (and failover Node). The Master writes data locally and sends the data over to the slave. There are 3 Modes of Operation, A with highest Troughput but least trust, B with Medium Troughput, but Acceptable trust, and C with lowest (but still ok) troughput and highest trust. Just check it out here: http://www.complang.tuwien.ac.at/reisner/drbd/ Regards, Dani
On Wed, Jul 30, 2003 at 01:10:06PM +0200, Dani Oderbolz wrote: > >One possibility is to run postgresql (regular postgresql - no patches > >required) controlled by heartbeat (http://www.linux-ha.org/) on two > >nodes. Heartbeat will then make sure that only one of the nodes are > >active at any time. > > > >You will have to put the databases on shared storage; either something > >like a shared SCSI RAID, or a software replication device like drdb or > >md+nbd. > > Another possibility (which I have not yet tested, but it was mentioned > in many Magazine Articles > (Linux Magazine, the German iX) is DRBD. > This Tool creates a RAID which is Shared betwenn 2 Nodes. > One Node is the Master and the Other is the Slave (and failover Node). > The Master writes data locally and sends the data over to the slave. > There are 3 Modes of Operation, A with highest Troughput but least > trust, B with Medium Troughput, > but Acceptable trust, and C with lowest (but still ok) troughput and > highest trust. > > Just check it out here: > > http://www.complang.tuwien.ac.at/reisner/drbd/ If you read my post carefully you will actually see it's the _same_ possibility :) But DRDB is only part of the solution - you also need something like heartbeat to manage what node postgresql runs on. -- Ragnar Kjorstad
Ragnar Kjørstad wrote: >On Wed, Jul 30, 2003 at 01:10:06PM +0200, Dani Oderbolz wrote: >If you read my post carefully you will actually see it's the _same_ >possibility :) > >But DRDB is only part of the solution - you also need something like >heartbeat to manage what node postgresql runs on. > > Um, sorry. I just saw Shared SCSI RAID... Sorry for that. But did you see DRBD in production? I saw that its version Number ist 0.6.3 (which doesnt mean a thing), but still its kind of a statement... Regards, Dani
On Wed, Jul 30, 2003 at 05:14:12PM +0200, Dani Oderbolz wrote: > >On Wed, Jul 30, 2003 at 01:10:06PM +0200, Dani Oderbolz wrote: > >If you read my post carefully you will actually see it's the _same_ > >possibility :) > > > >But DRDB is only part of the solution - you also need something like > >heartbeat to manage what node postgresql runs on. > > Um, sorry. > I just saw Shared SCSI RAID... > Sorry for that. > > But did you see DRBD in production? > I saw that its version Number ist 0.6.3 (which doesnt mean a thing), > but still its kind of a statement... I don't personally run DRDB in production, but a lot of other people do. E.g. I think SuSE uses it extensively. -- Ragnar Kjorstad