My current problem is that I need to upgrade a 4 node Slony cluster  
from PostgreSQL 8.0.4 to 8.2.4 to take advantage of the performance  
enhancements 8.2 offers.  But before I even think about that, I have  
the ancillary problem that I'm still running Slony 1.1.5, and would  
like to update that (for log shipping and just to stay current) to  
the latest and greatest.  David Fetter on freenode:#postgresql  
strongly suggested I upgrade slony before upgrading postgresql.   So-  
as much as I don't want to "fix" something that ain't "broke", I like  
following Smart People's Advice and I'm going to upgrade Slony to  
1.2.11.

As I said, I have 4 nodes all running 8.0.4 on linux (redhat).  Slony  
1.1.5 is installed on all nodes.  From what I've gathered, I've  
determined that the way I'm most comfortable with is described here:

http://www.pgadmin.org/docs/1.4/slony/slonyupgrade.html

...wherein I create new installs of postgresql 8.0.4 that have the  
newer slony (1.2.11) compiled in.

My proposed upgrade strategy:

1.  Compile new versions of postgresql 8.0.4 on all machines

2.  Compile Slony 1.2.11 into that postgresql I just built

3.  Install my new postgresql in a place other than where my current  
postgresql is installed.  For example- currently, my postgresql is  
installed in /usr/local/pgsql8.0.4, I will probably put the "new"  
version of 8.0.4 in /usr/local/pgsql8.0.4-2.  Do this on all 4 nodes.

4.  When I'm ready, I take the entire cluster down, including slons  
and all related watchdogs.  Late at night, on a sunday.  Buy wife  
some ice cream so she doesn't mind too much that I'm working late on  
a sunday night.

5.  I then move or copy my existing data directory over to the "new"  
8.0.4 data directory, on all 4 nodes.  Possibly I symlink to my  
existing PG data dir (in the "old" 8.0.4 install dir to save time- my  
db is around 30Gb), I would, of course, rather copy the data in case  
things Go Poorly.

6.  I bring up the "new" 8.0.4 postgresql servers on all 4 nodes.  I  
leave the slons alone for now (down).

7.  I make sure all 4 "new" postgresql 8.0.4 are accessing the data  
directory properly, run a few queries, no inserts or anything.

8.  I run the command

update functions (id = <node number>);

...against the appropriate nodes (my nodes are numbered  
10,20,30,40).  Question: do the slons need to be running at this  
point or not?  I'm assuming not, but thats just a gut feeling.

9.  Bring up the new slons

10.  Frantically check log files to make sure everything looks okay.

11.  Try a few updates on the master database and verify that they  
have been propagated to the subscribers.  Swear like a longshoreman  
if they have not.  See step 14.

12.  At this point, the cluster should be updated to slony 1.2.11,  
I'm not sure how I can verify this, but I'll settle for DB changes  
getting properly propagated.

13.  Over the next few days, peer continuously at the log files for  
any weirdness.

14.  If things don't Go Well, make a nuisance of  
myself^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H Politely ask intelligent  
questions in #postgresql and #slony.  Refer to step 11.

Questions:

1.  Should the slons be running when I run "update functions"?

2.  How can I verify that I am indeed running version 1.2.11 when all  
is said and done?

3.  Will this method of compiling "new" versions of postgresql  
(rather than upgrading an existing install) allow me to "downgrade"  
to slony 1.1.5 if things go poorly?  If things don't work out, can I  
just bring up the old postgresql (the one compiled with 1.1.5) and  
run the 1.1.5 "update functions" again to kind of "back out" the  
upgrade?  If there some other, preferable way of downgrading?

4.  Are there any detailed docs on what exactly "update functions" does?


How close is this to correct?  Many, many thanks to anyone who has  
made it this far through my post and to anyone who has any comments  
or suggestions regarding this proposed upgrade process.  I sure would  
love any feedback anyone is willing to supply!

Thanks!

/kurt


On Aug 30, 2007, at 10:12 AM, Sam Cooley wrote:

>> Date: Wed, 29 Aug 2007 20:23:57 -0400
>> From: Kurt Overberg <[EMAIL PROTECTED]>
>> Subject: Re: [Slony1-general] Setting up log shipping node
>> To: Brad Nicholson <[EMAIL PROTECTED]>
>>
>> Brad,
>>
>
> ...
>
>> (compile new slony, get the libs into postgresql, then run update
>> functions), but is it really that simple?  Should I not be nervous
>> and plow ahead?  How easy is it to find a consultant who knows how to
>> do this stuff (confidently)?
>
> Hopefully somebody else will give you this advice; being thorough and
> methodic with your planning and testing should make upgrades  
> smoother.  I
> do not profess to be an expert on slony/pg myself but would be  
> happy to
> look at your upgrade plans if you can not find another set of  
> eyes.  I may
> be going through a similar upgrade in the near future and would be  
> happy
> to work on the thinking.
>
> Good luck,
>
> Sam cooley
>
>> Thanks for the reply, its greatly appreciated!
>>
>> /kurt
>
>

Kurt Overberg
[EMAIL PROTECTED]



_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to