--_000_FD020D3E50E7FA479567872E5F5F31E304594D4CA7ex01corpql2 co_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi
Further to David Jantzen's post of 3/16/2010.
We have decided to try to upgrade the database software from our old custom=
8.3.7 instance to the std upstream 8.3.10 version.
We have no hash indexes on interval types; we therefore anticipate that the=
migration will be a shutdown of the old instance, and restart on the std p=
gdb version, using the normal /etc/init.d/postgresql script.
The database is about 2.5Tb in size, backup takes a long time, we want to t=
ry to preserve the standby integrity.
We are currently running a warm standby, which updates using the following =
string in recovery.conf:
restore_command =3D 'pg_standby -c -d -s 10 -t /tmp/pgsql.t=
rigger.5432 /caesius/archive %f %p %r 2>>standby.log'
-------------
PROBLEM:
Testing this now on a smaller database but with the same software setup, we=
experience a problem on the standby:
- The pg_standby procedure doesn't always shutdown cleanly on the =
standby
o Checking active processes on the standby server following the issue of =
"pg_ctl stop", the pg_standby process is still running
o If we kill the pg_standby process, it switches timeline on startup
--------------
I am sure there must be a stable activity sequence to stopping/starting the=
primary/standby instances for software maintenance.
We would like to avoid having to rebuild the standby from a backup if possi=
ble.
Hence this posting.
--------------
A few more details about the sequence of actions I am trying to follow:
- Install postgres via yum repo (using rpm 8.3-7 http://yum.pgsqlr=
pms.org/reporpms/repoview/pgdg-centos.html)
o On primary
o On standby
- Setup /etc/sysconfig/pgsql/postgresql customization file
o Point at data directory
- Under old user and software:
o Switch WAL on primary, wait for WAL to recover on the standby
o Shutdown standby (pg_ctl stop -m immediate)
o Shutdown primary (pg_ctl stop -m immediate)
- Change ownership of database files to postgres
o On primary
o On standby
- Using root "service postgresql start"
o On primary
o On standby
--_000_FD020D3E50E7FA479567872E5F5F31E304594D4CA7ex01corpql2 co_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spread sheet" xmlns=
:odc=3D"urn:schemas-microsoft-com:office:odc" xmlns:oa=3D"urn:schemas-micro=
soft-com:office:activation" xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc=3D"http://m=
icrosoft.com/officenet/conferencing" xmlns:D=3D"DAV:" xmlns:Repl=3D"http://=
schemas.microsoft.com/repl/" xmlns:mt=3D"http://schemas.microsoft.com/share=
point/soap/meetings/" xmlns:x2=3D"http://schemas.microsoft.com/office/excel=
/2003/xml" xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" xmlns:ois=
=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir=3D"http://=
schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds=3D"http://www.w3=
..org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint=
/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc" xmlns:xsd=3D"http=
://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas.microsoft.com/sha=
repoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#"=
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xmlns:sps=3D"http://=
schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http://www.w3.org/2001=
/XMLSchema-instance" xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/so=
ap" xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile " xmlns:udc=
p2p=3D"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf=3D"http:/=
/schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss=3D"http://sche=
mas.microsoft.com/office/2006/digsig-setup" xmlns:dssi=3D"http://schemas.mi=
crosoft.com/office/2006/digsig" xmlns:mdssi=3D"http://schemas.openxmlformat=
s.org/package/2006/digital-signature" xmlns:mver=3D"http://schemas.openxmlf=
ormats.org/markup-compatibility/2006" xmlns:m=3D"http://schemas.microsoft.c=
om/office/2004/12/omml" xmlns:mrels=3D"http://schemas.openxmlformats.org/pa=
ckage/2006/relationships" xmlns:spwp=3D"http://microsoft.com/sharepoint/web=
partpages" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/service s/20=
06/types" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/service s/200=
6/messages" xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/ Sli=
deLibrary/" xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPor tal=
Server/PublishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns:=
st=3D"" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
/* List Definitions */
[at] list l0
{mso-list-id:598568844;
mso-list-type:hybrid;
mso-list-template-ids:-1753720556 1603314912 67698691 67698693 67698689 67=
698691 67698693 67698689 67698691 67698693;}
[at] list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
[at] list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
[at] list l1
{mso-list-id:1439375785;
mso-list-type:hybrid;
mso-list-template-ids:1117801086 -915774594 67698691 67698693 67698689 676=
98691 67698693 67698689 67698691 67698693;}
[at] list l1:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
[at] list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal>Hi<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Further to David Jantzen’s post of 3/16/2010.<o:=
p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>We have decided to try to upgrade the database softwar=
e from
our old custom 8.3.7 instance to the std upstream 8.3.10 version.<o:p></o:p=
></p>
<p class=3DMsoNormal>We have no hash indexes on interval types; we therefor=
e
anticipate that the migration will be a shutdown of the old instance, and
restart on the std pgdb version, using the normal /etc/init.d/postgresql
script.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>The database is about 2.5Tb in size, backup takes a lo=
ng
time, we want to try to preserve the standby integrity.<o:p></o:p></p>
<p class=3DMsoNormal>We are currently running a warm standby, which updates=
using
the following string in recovery.conf:<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal> =
restore_command
=3D 'pg_standby -c -d -s 10 -t /tmp/pgsql.trigger.5432 /caesius/archive %f =
%p %r
2>>standby.log'<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>-------------<o:p></o:p></p>
<p class=3DMsoNormal>PROBLEM:<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Testing this now on a smaller database but with the sa=
me
software setup, we experience a problem on the standby:<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l0 level1 =
lfo2'><![if !supportLists]><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span><![endif]>The pg_standby procedure doesn’t always shutd=
own cleanly
on the standby<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo2'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>Checking active processes on the standby ser=
ver
following the issue of “pg_ctl stop”, the pg_standby process is
still running<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo2'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>If we kill the pg_standby process, it switch=
es
timeline on startup<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>--------------<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>I am sure there must be a stable activity sequence to =
stopping/starting
the primary/standby instances for software maintenance.<o:p></o:p></p>
<p class=3DMsoNormal>We would like to avoid having to rebuild the standby f=
rom a
backup if possible.<o:p></o:p></p>
<p class=3DMsoNormal>Hence this posting.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>--------------<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>A few more details about the sequence of actions I am =
trying
to follow: <o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 level1 =
lfo1'><![if !supportLists]><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span><![endif]>Install postgres via yum repo (using rpm 8.3-7 <a
href=3D"http://yum.pgsqlrpms.org/reporpms/repoview/pgdg-cent os.html">http:/=
/yum.pgsqlrpms.org/reporpms/repoview/pgdg-centos.html</a>)<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>On primary<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>On standby<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 level1 =
lfo1'><![if !supportLists]><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span><![endif]>Setup /etc/sysconfig/pgsql/postgresql customization
file<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>Point at data directory<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 level1 =
lfo1'><![if !supportLists]><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span><![endif]>Under old user and software:<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>Switch WAL on primary, wait for WAL to recov=
er
on the standby<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>Shutdown standby (pg_ctl stop –m immed=
iate)<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>Shutdown primary (pg_ctl stop –m immed=
iate)<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 level1 =
lfo1'><![if !supportLists]><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span><![endif]>Change ownership of database files to postgres<o:p>=
</o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>On primary<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>On standby<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 level1 =
lfo1'><![if !supportLists]><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span><![endif]>Using root “service postgresql start”<o=
:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>On primary<o:p></o:p></p>
<p class=3DMsoListParagraph style=3D'margin-left:1.0in;text-indent:-.25in;
mso-list:l1 level2 lfo1'><![if !supportLists]><span style=3D'font-family:"C=
ourier New"'><span
style=3D'mso-list:Ignore'>o<span style=3D'font:7.0pt "Times New Roman"'>&nb=
sp;
</span></span></span><![endif]>On standby<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
</div>
</body>
</html>
--_000_FD020D3E50E7FA479567872E5F5F31E304594D4CA7ex01corpql2 co_--
