Re: PostgreSQL in Shared Disk Failover mode on FreeBSD+CARP+RAIDZ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Mon, Dec 20, 2010 at 6:23 PM,  <snoop@xxxxxxxx> wrote:
> > Hi everybody,
> > I'm trying to figure out a way to setup a PostgreSQL HA cluster
solution.
> >
> > For the record:
> > - I've already tried pgpool-II 2.x in Synchronous Multi Master
Replication
> > mode and I was satisfied by it's functionality but concerned about
having
> > the same data growing on several nodes
> 
> What actual concerns did you have?  Just a question of too many
> spinning disks in your machines or something?  There are some issues
> with race conditions and such with statement level replication to be
> aware of.

Well, I'd prefer a big single storage instead of "too many spinning disks"
around mainly for maintenance reasons, to avoid replication and too much
network traffic.
Thanks for the "race conditions" tip.

> 
> > - I've upgraded to pgpool-II 3.0.x on FreeBSD (from ports) but it's very
> > buggy at the moment
> > - I don't like the idea of having fixed size (16 megs regardless of the
> > committed transaction number!) WAL logs often "shipped" from one node to
> > another endangering my network performance (asynchronous replication)
> 
> Streaming replication in 9.0 doesn't really work that way, so you
> could use that now with a hot standby ready to be failed over to as
> needed.

Mmm, so I can use an hot standby setup without any need for replication
(same data dir) and no need for STONITH?
Sorry if my questions sound trivial to you but my experience with PostgreSQL
is quite limited and this would be my first "more complex" configuration and
I'm trying to figure out the best way to go. Unfortunately it's not that
easy to figure it out going through the documentation only.

> 
> > I've done some research and I've an idea of different possible
solutions,
> > but I'd honestly like to implement it using CARP in a "Shared Disk
Failover"
> > fashion.
> > Unfortunately this doesn't really seem to be a common way according to
the
> > very limited information available on the net and that's why I'm going
to
> > ask here.
> 
> Yeah, there's a lot of things you have to be careful of to prevent
> data corruption.  If two postgresql instances mount and start on the
> same data share, you will immediately have a corrupted data store and
> have to restore from backup.
> 
> > My idea: two nodes (i386) with FreeBSD 8.1 and PostgreSQL 9.0.2, CARP
> > providing network failover and a shared data dir on a RAIDZ solution.
> 
> Only one at a time.  Ever.  So you'll need fencing software / hardware
> for your shared data drives.
> 
> > I'm
> > pretty sure that CARP would do the job properly indirectly avoiding even
the
> > dangerous writing on the data dir from both nodes at the same time (that
> > would apparently badly screw up the DB) by redirecting any network
> > connection to the active DB and to him only.
> 
> You'll need more than carp.
> 
> > BUT ... I'm seriously concerned about the already active connections
client
> > <-> server during the failover.
> > Example:
> >
> > client A connects to server A
> > server A fails so does the client A connection
> > CARP redirects any upcoming connection to the DB to server B now
> > client A reconnects and is now operating on server B
> > THEN
> > server A comes back up
> 
> Stop.  FULL STOP.  If A goes down, you need to STONITH (Shoot the
> other node in the head) so it cannot under any circumstances come back
> up on accident.  It's a good idea to have either or both fencing for
> your network switch and a power switch you can use a signal to to
> power down server A.
> 
> > Did anyone here try such a configuration by any chance?
> 
> There are people on the list using multiple machines pointing at
> single storage arrays with fencing and STONITH technology.  I'm not,
> we just use slony and manual failover for our stuff. 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it: http://www.email.it/f
 
 Sponsor:
 MisterCupido.com crea i tuoi regali personalizzati ai prezzi più bassi del
web... e questa settimana ci sono più sconti che mai!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11031&d=20101221



-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux