Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 56B3D9F980A for ; Thu, 16 Aug 2007 04:40:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 99758-05 for ; Thu, 16 Aug 2007 04:40:55 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 611D79F97B8 for ; Thu, 16 Aug 2007 04:40:55 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.8/8.13.8) with ESMTP id l7G7epO9026855 for ; Thu, 16 Aug 2007 04:40:51 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.8/8.13.8/Submit) id l7G7DXsQ020856 for pgsql-admin@postgresql.org; Thu, 16 Aug 2007 04:13:33 -0300 (ADT) (envelope-from news) From: Hannes Dorbath X-Newsgroups: pgsql.admin Subject: Re: PG engine takeover or switch over Date: Thu, 16 Aug 2007 09:13:53 +0200 Organization: Hub.Org Networking Services Lines: 35 Message-ID: <46C3F931.2040502@theendofthetunnel.de> References: <8078a1730708151230t2b9542aaxe6703bb2c61b778f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Medi Montaseri User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 In-Reply-To: <8078a1730708151230t2b9542aaxe6703bb2c61b778f@mail.gmail.com> To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/194 X-Sequence-Number: 26525 On 15.08.2007 21:30, Medi Montaseri wrote: > I am looking for some suggestions to optimize the following > problem/solution. > > Given two nodes A and B (two computers) in a active-passive mode where A is > running PG engine, and B is simply standing by, and a common storage > (twin tailed) ( or from pg_ctl point of view -D /common/data ), I am looking > for a faster solution during the takeover where A has crashed and B is to > start PG engine and run with it. > > My current solution is to start PG engine which should take little time to > study the configuration files and /common/data and fork a few childrens. But > I am still interested in optimizing this start-up cost. > > For example, would I gain anything by starting PG engine on both A and B, > but on B I point it to /common/dummy and during the takeover, I somehow tell > it to now read from /common/data, for example have two postmaster.conf or > PGDATA and then use pg_ctl reload. Starting up PostgreSQL should be very fast, given no recovery to be done and decent hardware. PostgreSQL does not fork a lot unless it is accepting new connections and if reading a config file is slow on your system, something else is broken. In a active/passive setup your should be able to switch over in under 3 seconds. If there was a lot of load on the failed node the recovery times on the new active node increase. The only thing you can do about that is getting faster disks.. -- Regards, Hannes Dorbath