Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DFF917532A2 for ; Mon, 5 Dec 2011 22:59:14 -0400 (AST) Received: from nm10-vm0.bullet.mail.ne1.yahoo.com ([98.138.91.72]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RXlFR-0008BV-0n for pgsql-admin@postgresql.org; Tue, 06 Dec 2011 02:59:14 +0000 Received: from [98.138.90.55] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 06 Dec 2011 02:58:59 -0000 Received: from [98.138.89.173] by tm8.bullet.mail.ne1.yahoo.com with NNFMP; 06 Dec 2011 02:58:59 -0000 Received: from [127.0.0.1] by omp1029.mail.ne1.yahoo.com with NNFMP; 06 Dec 2011 02:58:59 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 696631.61998.bm@omp1029.mail.ne1.yahoo.com Received: (qmail 53187 invoked by uid 60001); 6 Dec 2011 02:58:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323140339; bh=WEu2tsLSW9STNmwYsW6132NuncVn7lA8FeXtjFucFBg=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=mxEG21ASckZmFgEilQBA5kcY+EjEBERcR822VxrxYLQfME7Tv9PwQ1RMxB38iIuH8wrv+s/a/bojwtlDeLKOJXuLMP56DMDGaQe1sW6tTcTVxCUEPquRibePK7Mpdkgagql7lpkwWMc0LPAq3iJ7UzOHN77hWpMx4W6DFl0ofVE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=3U/M8+DNvUbL6kv81eOa9P35YmJi+EmImckAsCGohzihTf3+nyM8pxtbQsXZU8GlyygcVGtTIFlcPyO40GEQezhji5EsWNwkLFSqRutYUqfFSdMSPwTp9gkoW/fXFIWs90SdV/Cux25+Jj1UXXZqzRSya7vJPclweBcXi9OQIPQ=; X-YMail-OSG: S8PR9_0VM1lZVqgjQkckYDlYY0jqRuQEmRg.DdaHtXNmn7V mMd.w2H_DA4mQaaeHZYHYow5G4KpEFLbWfGhG5KnyDOI6FVjmmLLpiHYRV3p r4DM_nmGw4JGskye5dZeOBBhBPYUkXAxoh5S1asqESf0BfXjqqofeTwSaDxp aa0cPWSFJPpztOv9Wi_ZQ5y.8PYEPzL3uhmX9Fa1_gZZKChcCF2qg0ilOtav 0jyPauemXMzCo4Dv.qP9IKu6aXqAauGcA2nafx8gESpM_Qx8l2EzZZjzRLTy G5cMyxsJoz1XQAh.VlGrVCklUvKafDL1UefSEDt_6ll_Ef6JRgyh5ak.nBcg IZ128LYbq8OK_Ga5rrYnIbJgpOU_3tRNRbNlxbBH2d15YOHARc9KTC.Alviu lUOYQ1yveSdDoi.AwOHJEdxkzSw3blqZVUcburpOyBorHQKf7Ym_DhA-- Received: from [175.143.59.209] by web110715.mail.gq1.yahoo.com via HTTP; Mon, 05 Dec 2011 18:58:59 PST X-Mailer: YahooMailWebService/0.8.115.331698 References: <87bormwhes.fsf@comcast.net> Message-ID: <1323140339.40411.YahooMailNeo@web110715.mail.gq1.yahoo.com> Date: Mon, 5 Dec 2011 18:58:59 -0800 (PST) From: "white.heron white" Reply-To: "white.heron white" Subject: Re: Recover from failover To: Jerry Sievers , Martin S Cc: "pgsql-admin@postgresql.org" In-Reply-To: <87bormwhes.fsf@comcast.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1317208013-147351362-1323140339=:40411" X-Pg-Spam-Score: -0.2 (/) X-Archive-Number: 201112/37 X-Sequence-Number: 38795 --1317208013-147351362-1323140339=:40411 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Dear All,=0A=0AAs soon as the slave database server had been promoted to ma= ster. The old-server master database should be promote to become slave serv= er.=0AI believe database replication has been done by your vendor. In this = case the new master database server will replicate data with new slave data= base server.=0AOnce replication completed. You may unplug the new slave dat= abase server and perform kernel operating system upgrade as standalone.=0A= =0A=A0=0ARegards,=0A=0A=0AMOHAMMAD ADLI BIN MT TAJUDIN=0A=0A=0AH/p number: = =A0(017) 362 3661=0AEmail: white.heron@yahoo.com=0A=0A=0A__________________= ______________=0A From: Jerry Sievers =0ATo: Martin= S =0ACc: pgsql-admin@postgresql.org =0ASent: Tue= sday, December 6, 2011 10:41 AM=0ASubject: Re: [ADMIN] Recover from failove= r=0A =0AMartin S writes:=0A=0A> Hello list,=0A>= =0A> May be this information is inside the documentation, but couldn't find= it.=0A>=0A> I'm doing some tests with postgres 9.1.1 and replication, and = I was=0A> wandering if there is some information about how to recover from = a=0A> failover.=0A>=0A> Suppose I'm doing some kernel upgrades on the maste= r, so in order to=0A> avoid downtime, I promote the slave to become the mas= ter, and reboot=0A> the old-master. Once the old-master is up and running a= gain, I want it=0A> to be the master as it was before. The problem are the = updates and=0A> inserts made while it was offline. Does it recovers automag= ically by=0A> streaming or something? Do you have any procedures/recommenda= tions to=0A> do it?=0A=0AAbout the only way you can role reverse master and= standby is to stop=0Aimmediate the master, online the standby and then con= fig the old=0Amaster as a standby and point it to the new master. =0A=0ADoi= ng a normal stop on the original master before onlining the=0Astandby, then= making changes to the old master DB and you'll have to=0Arefresh the old m= aster from a base backup before putting it into=0Arecovery.=0A=0AMost admin= s will tell you to refresh the old master in either case to=0Abe on the saf= e side.=A0 This is the conventional and guaranteed to work=0Aapproach.=0A= =0AHTH=0A=0A> Cheers,=0A>=0A> Martin=0A>=0A> -- =0A> Sent via pgsql-admin m= ailing list (pgsql-admin@postgresql.org)=0A> To make changes to your subscr= iption:=0A> http://www.postgresql.org/mailpref/pgsql-admin=0A>=0A=0A-- =0AJ= erry Sievers=0APostgres DBA/Development Consulting=0Ae: postgres.consulting= @comcast.net=0Ap: 305.321.1144=0A=0A-- =0ASent via pgsql-admin mailing list= (pgsql-admin@postgresql.org)=0ATo make changes to your subscription:=0Ahtt= p://www.postgresql.org/mailpref/pgsql-admin --1317208013-147351362-1323140339=:40411 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Dear All,<= /span>

As soon as the slave database server had be= en promoted to master. The old-server master database should be promote to = become slave server.
I believe database replication has been done= by your vendor. In this case the new master database server will replicate= data with new slave database server.
Once replication completed.= You may unplug the new slave database server and perform kernel operating = system upgrade as standalone.

 
Reg= ards,

MOHAMMAD ADLI BIN MT TAJUDIN

H/p = number:  (017) 362 3661
Email: white.heron@yahoo.com

From: Jerry Sievers <gsievers= 19@comcast.net>
To:= Martin S <martins.listz@gmail.com>
Cc: pgsql-admin@postgresql.org
Sent: Tuesday, December 6, 2011 10:41 AM
= Subject: Re: [ADMIN] Recov= er from failover

=0AMartin S <martins.listz@g= mail.com> writes:

> Hello list,
>
> May be thi= s information is inside the documentation, but couldn't find it.
>> I'm doing some tests with postgres 9.1.1 and replication, and I was> wandering if there is some information about how to recover from a> failover.
>
> Suppose I'm doing some kernel upgrades on = the master, so in order to
> avoid downtime, I promote the slave to b= ecome the master, and reboot
> the old-master. Once the old-master is= up and running again, I want it
> to be the master as it was before.= The problem are the updates and
> inserts made while it was offline.= Does it recovers automagically by
> streaming or something? Do you h= ave any procedures/recommendations to
> do it?

About the only = way you can role reverse master and standby is to stop
immediate the master, online the standby and the= n config the old
master as a standby and point it to the new master.
Doing a normal stop on the original master before onlining the
stan= dby, then making changes to the old master DB and you'll have to
refresh= the old master from a base backup before putting it into
recovery.
<= br>Most admins will tell you to refresh the old master in either case tobe on the safe side.  This is the conventional and guaranteed to work=
approach.

HTH

> Cheers,
>
> Martin
>=
> --
> Sent via pgsql-admin mailing list (pg= sql-admin@postgresql.org)
> To make changes to your subscription:=
> http://www.postgresql.org/mailpref/pgsql-admin
>

-- <= br>Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 305.321.= 1144

--
Sent via pgsql-admin mailing list (pgsq= l-admin@postgresql.org)
To make changes to your subscription:
h= ttp://www.postgresql.org/mailpref/pgsql-admin


=
--1317208013-147351362-1323140339=:40411--