Обсуждение: question about HA in PG 9.0

Поиск
Список
Период
Сортировка

question about HA in PG 9.0

От
Kasia Tuszynska
Дата:

Hi Everybody,

I am doing a bit of research about High Availability solutions offered as part of core in Postges 9.0, I have couple of questions, sorry if they expose my novice status where it comes to HA on Postgres:

1.      The doc is lovely but all of the examples are for linux, has anyone tired a Hot Standby streaming scenario on windows?  Any issues specific to windows?  I know that linux and windows environments “should” behave the same but actually running in both of those environments exposes many differences.

2.      I am reading the Beta4 doc where under section 25.3 Failover it says:

“PostgreSQL does not provide the system software required to identify a failure on the primary and notify the standby database server. Many such tools exist and are well integrated with the operating system facilities required for successful failover, such as IP address migration.”

I have been reading up on this issue most notably on http://wiki.postgresql.org/wiki/Shared_Storage, where the suggestions have been gravitating to solutions on the physical level.

Are there any software level solutions? ( I have a feeling that this may be a stupid question, but I want to implement this in the cloud, and not potentially kill an ami instance)

I found a presentation by Heikki Linnakangas where he mentions: Heartbeat and Shoot the other Node in the head as types of 3rd party high availability tools, does anyone have any recommendations of specific software packages?

 

Thank you,

Sincerely,

Kasia

Re: question about HA in PG 9.0

От
Greg Smith
Дата:
Kasia Tuszynska wrote:

The doc is lovely but all of the examples are for linux, has anyone tired a Hot Standby streaming scenario on windows?  Any issues specific to windows?  I know that linux and windows environments “should” behave the same but actually running in both of those environments exposes many differences.


As there is a certain amount of helper scripting required to get Streaming Replication setup, and the usual scripting languages people tend to write them in (bash, Python, Perl) don't ship with Windows, you will have a bit of extra work to do here.  I'm not aware of any production-quality setups that have tested the 9.0 implementation under Windows yet, but the similar hard parts have certainly been done before with earlier versions.

I have been reading up on this issue most notably on http://wiki.postgresql.org/wiki/Shared_Storage, where the suggestions have been gravitating to solutions on the physical level.

Are there any software level solutions? ( I have a feeling that this may be a stupid question, but I want to implement this in the cloud, and not potentially kill an ami instance)


The only way you will implement "Shoot the other node in the head" on EC2 approaching the same level of reliability a hardware solution provides is to do just that:  don't begin failover to a new node until you've made sure the unreponsive master has been killed, and its AMI instance disabled from powering back up again.  Automating that is exactly where I plan to go with redundant EC2 deployments of this type.  But you could do it as part of a manual failover if you had to.  You cannot let the original master touch the shared data store ever again once it's been taken out of the loop.  If your storage is on EBS, I'm not sure how that handles two attempts to attach a writer to the store, but you'd want to test that out too.

-- 
Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services and Support  www.2ndQuadrant.us
Author, "PostgreSQL 9.0 High Performance"    Pre-ordering at:
https://www.packtpub.com/postgresql-9-0-high-performance/book

Re: question about HA in PG 9.0

От
Thomas Kellerer
Дата:
Kasia Tuszynska wrote on 18.09.2010 01:30:
> 1. The doc is lovely but all of the examples are for linux, has
> anyone tired a Hot Standby streaming scenario on windows? Any issues
> specific to windows? I know that linux and windows environments
> “should” behave the same but actually running in both of those
> environments exposes many differences.

I had no problem setting up a proof-of-concept on my Windows laptop with streaming replication and both instances
runningon my computer. The batch files needed were quite simple. 

Regards
Thomas

Re: question about HA in PG 9.0

От
"Anibal David Acosta"
Дата:

Windows server enterprise has the Microsoft Cluster Services.

This enable fail-over scenario between two computers.

 

So, when one of them go offline, the other is activated, this involve many steps, including IP changing, the slave become the master IP address .

 

But you can choose between has a replication between both postgres or maybe you can put your postgresql DATA directory to an external storage shared between those two servers.

 

If this case, when the second server become available the Cluster service map map the DATA unit and starts the postgres service.

 

So, you have everything running and working in aprox. 10 seconds.

 

 

 

 

De: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] En nombre de Kasia Tuszynska
Enviado el: viernes, 17 de septiembre de 2010 07:30 p.m.
Para: pgsql-admin@postgresql.org
Asunto: [ADMIN] question about HA in PG 9.0

 

Hi Everybody,

I am doing a bit of research about High Availability solutions offered as part of core in Postges 9.0, I have couple of questions, sorry if they expose my novice status where it comes to HA on Postgres:

1.       The doc is lovely but all of the examples are for linux, has anyone tired a Hot Standby streaming scenario on windows?  Any issues specific to windows?  I know that linux and windows environments “should” behave the same but actually running in both of those environments exposes many differences.

2.       I am reading the Beta4 doc where under section 25.3 Failover it says:

“PostgreSQL does not provide the system software required to identify a failure on the primary and notify the standby database server. Many such tools exist and are well integrated with the operating system facilities required for successful failover, such as IP address migration.”

I have been reading up on this issue most notably on http://wiki.postgresql.org/wiki/Shared_Storage, where the suggestions have been gravitating to solutions on the physical level.

Are there any software level solutions? ( I have a feeling that this may be a stupid question, but I want to implement this in the cloud, and not potentially kill an ami instance)

I found a presentation by Heikki Linnakangas where he mentions: Heartbeat and Shoot the other Node in the head as types of 3rd party high availability tools, does anyone have any recommendations of specific software packages?

 

Thank you,

Sincerely,

Kasia

Re: question about HA in PG 9.0

От
Greg Smith
Дата:
Anibal David Acosta wrote:

Windows server enterprise has the Microsoft Cluster Services.

This enable fail-over scenario between two computers. 

So, when one of them go offline, the other is activated, this involve many steps, including IP changing, the slave become the master IP address .

But you can choose between has a replication between both postgres or maybe you can put your postgresql DATA directory to an external storage shared between those two servers. 

If this case, when the second server become available the Cluster service map map the DATA unit and starts the postgres service.

So, you have everything running and working in aprox. 10 seconds.


All of the Windows Server stuff via Microsoft Cluster Services I'm aware of does its shared storage node fencing via sending specific SCSI calls (PERSISTENT RESERVE) to the storage.  That probably works fine if you have a Fiber Channel array that supports that.  But I don't think there's any flexibility for alternative types of deployments.  As for the complexity of the setup time, while they have put a bunch of GUIs on it I've never see anything that tries to do complicated storage array arrangements work in any time that isn't measure in large multiples of hours, so "10 seconds" I'm skeptical of.

-- 
Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services and Support  www.2ndQuadrant.us
Author, "PostgreSQL 9.0 High Performance"    Pre-ordering at:
https://www.packtpub.com/postgresql-9-0-high-performance/book