Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VWu6q-0001JC-DU for pgsql-admin@arkaria.postgresql.org; Thu, 17 Oct 2013 20:23:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VWu6o-0000NB-TX for pgsql-admin@arkaria.postgresql.org; Thu, 17 Oct 2013 20:23:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VWu6n-0000N4-Qr for pgsql-admin@postgresql.org; Thu, 17 Oct 2013 20:23:49 +0000 Received: from lists.commandprompt.com ([69.168.55.30]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VWu6e-0005Yo-VZ for pgsql-admin@postgresql.org; Thu, 17 Oct 2013 20:23:46 +0000 Received: from [192.168.1.5] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 6264148; Thu, 17 Oct 2013 13:23:39 -0700 (PDT) Received: from [192.168.1.5] ([71.95.99.196] helo=[192.168.1.5]) by assp.commandprompt.com with ESMTPS(AES256-SHA) (2.1.1); 17 Oct 2013 13:23:38 -0700 Message-ID: <5260474A.5050908@commandprompt.com> Date: Thu, 17 Oct 2013 13:23:38 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Joseph Mays , pgsql-admin@postgresql.org Subject: Re: PG server clustering References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Assp-Version: 2.1.1(11364) on assp.commandprompt.com X-Assp-Client-SSL: yes X-Assp-ID: assp.commandprompt.com m1-41419-06095 X-Assp-Envelope-From: jd@commandprompt.com X-Assp-Intended-For: mays@win.net X-Assp-Original-Subject: Re: [ADMIN] PG server clustering X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 10/17/2013 12:32 PM, Joseph Mays wrote: > We are assisting in the system administration of a partner that uses > PostGres in a mission critical position in their system. They have mail > servers and other things that rely on 24/7 availability for the postgres > server. They are running postgres 9.04 on redhat linux > (2.6.32-131.0.15.el6.x86_64). This is running on one old machine, and > thus does not really provide the liability they looking for. > I had the thought that I could set up another server as a slave, then > promote the slave in the event it’s necessary. I was trying I made a > system that watches for a change in the IP number number of the server > in dns, then downs the primary, swaps primary-secondary configs in the > primary, restarts the primary, then does the same in the secondary. This > actually worked on the first test from failing the primary to the > secondary. The problem came when I stried to switch it back. When I > tried to restart the original primary as secondary, it failed saying the > database was corrupted. This is completely possible if configured correctly, we do this all the time for customers. > There are a couple of possible solutions to this, but I’m starting to > think that what they probably really want anyway is a Postgres server > cluster of two servers that stay in synch with each other, and can > simultaneously accept read and write requests. Are there any opinions > here about the best way to set this up? There is no "good" way to do this. There are some application specific ways but it depends on their needs. Joshua D. Drake -- Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579 PostgreSQL Support, Training, Professional Services and Development High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc For my dreams of your image that blossoms a rose in the deeps of my heart. - W.B. Yeats -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin