Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DBE6A1337B9C for ; Wed, 22 Dec 2010 15:52:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 57891-05 for ; Wed, 22 Dec 2010 19:52:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-out08.email.it (smtp-out08.email.it [212.97.34.19]) by mail.postgresql.org (Postfix) with ESMTP id D754C1337B9A for ; Wed, 22 Dec 2010 15:52:30 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out08.email.it (Postfix) with ESMTP id 456C7C05B; Wed, 22 Dec 2010 20:52:30 +0100 (CET) X-Virus-Scanned: amavisd-new at email.it Received: from smtp-out08.email.it ([127.0.0.1]) by localhost (smtp-out08.email.it [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DrVu03j1VbZC; Wed, 22 Dec 2010 20:52:30 +0100 (CET) Received: from [10.0.0.59] (inhio.eu [86.49.112.246]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-out08.email.it (Postfix) with ESMTP id 86719C02C; Wed, 22 Dec 2010 20:52:29 +0100 (CET) Subject: Re: PostgreSQL in Shared Disk Failover mode on FreeBSD+CARP+RAIDZ From: Snoop To: robin Cc: pgsql-admin@postgresql.org In-Reply-To: <7e5789e4ba80f1aeba10e24512f92136@edesix.com> References: <3702fd882cd904ce76ccd7c09d7645d9@213.152.156.147> <7e5789e4ba80f1aeba10e24512f92136@edesix.com> Content-Type: text/plain; charset="us-ascii" Date: Wed, 22 Dec 2010 20:52:28 +0100 Message-ID: <1293047548.33180.34.camel@blackfriar.inhio.eu> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/165 X-Sequence-Number: 36394 It's hard to say Robin, I'm still in testing. At the beginning I'd say very low ... probably something between 2000 and 5000 transactions a day (even harder to imagine how this load it's gonna be distributed within 24 hours)?! Thanks for your reply. On Tue, 2010-12-21 at 08:02 +0000, robin wrote: > How much data and what sort of write rates do you actually expect? > > Cheers, > Robin > > On Tue, 21 Dec 2010 02:23:25 +0100, snoop@email.it 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 > > - 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) > > > > 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. > > > > 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. > 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. > > > > 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 > > CARP now obviously redirects any new connection to the DB to server A > again > > client B connects to server A > > what about the existing connection of the client A to the server B? > there's > > an existing connection state between client A and server B > > now there's the chance that a transaction can be committed on the server > B > > while there's someone else operating on server A too! > > > > I understand that in a server that doesn't commit many transaction but > is > > mainly answering queries this could be a remote situation but it can > > probably happen. > > Please correct me if I'm wrong (as I really hope to be). > > > > Did anyone here try such a configuration by any chance? > > > > Many thanks in advance for your time. > > -- > > 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: > > Paghe e stipendi, consulenza e collocamento, tutto con Emailpaghe! > Provalo > > gratuitamente fino al 31/12/2010 > > Clicca qui: > http://adv.email.it/cgi-bin/foclick.cgi?mid=10682&d=20101221 -- 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=22-12