pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How do you upgrade for production servers?
5+ messages / 5 participants
[nested] [flat]

* How do you upgrade for production servers?
@ 2006-12-29 12:06  Arnau <arnaulist@andromeiberica.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Arnau @ 2006-12-29 12:06 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

   This is a general question about which procedure you follow when you 
upgrade your productions servers. Let's say we have a server running and 
older version and I want to install the latest version on the same 
server. Do you install slony? do you dump all the databases, install the 
latest version and after you restore? any other procedure? I'd like to 
have my production server down as less time as possible.


Thank you very much and have a great new year :D
-- 
Arnau



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: How do you upgrade for production servers?
@ 2006-12-29 12:42  Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  parent: Arnau <arnaulist@andromeiberica.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Andy Shellam (Mailing Lists) @ 2006-12-29 12:42 UTC (permalink / raw)
  To: arnaulist@andromeiberica.com; pgsql-admin

If upgrading between minor versions in the same series (e.g. 8.1.3 - 
8.1.5) you can simply use the same data directory.

However, if the major version changes (e.g. 8.1.x - 8.2.x), you must:

1. Dump the databases from your old server (preferably using the new 
version client, I believe) while your old server is still running
2. Stop your old version
3. Start your new version
4. Restore the backup into your new version

For the minimum downtime, the best thing to do is get the 2 servers 
running together (e.g. run your new version on port 5433) - then dump 
your old database, stop your old server (so no updates can get in after 
your backup), restore the backup into the new server, and restart your 
new server on port 5432.  It all depends on how big your databases are, 
and the length of time it'll take to restore your backup.

Happy New Year to you too.

Andy.

Arnau wrote:
> Hi all,
>
>   This is a general question about which procedure you follow when you 
> upgrade your productions servers. Let's say we have a server running 
> and older version and I want to install the latest version on the same 
> server. Do you install slony? do you dump all the databases, install 
> the latest version and after you restore? any other procedure? I'd 
> like to have my production server down as less time as possible.
>
>
> Thank you very much and have a great new year :D


-- 
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: How do you upgrade for production servers?
@ 2006-12-29 13:02  Phillip Smith <fukawi2@iinet.net.au>
  0 siblings, 0 replies; 5+ messages in thread

From: Phillip Smith @ 2006-12-29 13:02 UTC (permalink / raw)
  To: pgsql-admin

I install the new version to a new directory (eg, /usr/local/pg-8.2 ) then
start that server on a different port to the live server (eg, 54321), create
a new data directory (eg. /home/postgres/pgData-8.2) dump the live database,
import to the new database to make sure it's all good, then once I know
that's all good, I'll drop the live database back to "single user mode" using
pg_hba.conf, dump the database again, shutdown the old version, restart the
new version on the normal port, re-import the data then re-enable normal
access with pg_hba.conf

I have the advantage that our database generally isn't  accessed out of
 hours, so I have the luxury to be able to have the server offline for 30 -
 60 minutes while the second dump and import is happening. Depends how big
 your database is as to how long the server will be unavailable.

At least by installing the new version to a new directory and doing a test
import first lets me see how (if) the new version will affect the data
without having the live server offline.

Cheers,
-p

On Friday 29 December 2006 23:06, Arnau wrote:
> Hi all,
>
>    This is a general question about which procedure you follow when you
> upgrade your productions servers. Let's say we have a server running and
> older version and I want to install the latest version on the same
> server. Do you install slony? do you dump all the databases, install the
> latest version and after you restore? any other procedure? I'd like to
> have my production server down as less time as possible.
>
>
> Thank you very much and have a great new year :D

-------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: How do you upgrade for production servers?
@ 2006-12-29 13:45  Gregory S. Williamson <gsw@globexplorer.com>
  parent: Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  0 siblings, 0 replies; 5+ messages in thread

From: Gregory S. Williamson @ 2006-12-29 13:45 UTC (permalink / raw)
  To: Andy Shellam \(Mailing Lists\) <andy.shellam-lists@mailnetwork.co.uk>; arnaulist@andromeiberica.com; pgsql-admin

Realistically you should include some time for testing ... a few things may fail to work (not many -- the core is quite good about legacy issues, me thinks), but you may well run into some things that take longer to run that they used to. Explain Analyze is your faithful companion, as is the performance list. Better to spend an extra day or two than start getting phone calls and pages, IMHO. SO do a trial run, hopefully test it with real queries for speed, desired results and so on. (Generally we've found that newer versions do run faster but there are exceptions.)

Greg Williamson
DBA
GlobeXplorer LLC


-----Original Message-----
From:	pgsql-admin-owner@postgresql.org on behalf of Andy Shellam (Mailing Lists)
Sent:	Fri 12/29/2006 4:42 AM
To:	arnaulist@andromeiberica.com; pgsql-admin@postgresql.org
Cc:	
Subject:	Re: [ADMIN] How do you upgrade for production servers?

If upgrading between minor versions in the same series (e.g. 8.1.3 - 
8.1.5) you can simply use the same data directory.

However, if the major version changes (e.g. 8.1.x - 8.2.x), you must:

1. Dump the databases from your old server (preferably using the new 
version client, I believe) while your old server is still running
2. Stop your old version
3. Start your new version
4. Restore the backup into your new version

For the minimum downtime, the best thing to do is get the 2 servers 
running together (e.g. run your new version on port 5433) - then dump 
your old database, stop your old server (so no updates can get in after 
your backup), restore the backup into the new server, and restart your 
new server on port 5432.  It all depends on how big your databases are, 
and the length of time it'll take to restore your backup.

Happy New Year to you too.

Andy.

Arnau wrote:
> Hi all,
>
>   This is a general question about which procedure you follow when you 
> upgrade your productions servers. Let's say we have a server running 
> and older version and I want to install the latest version on the same 
> server. Do you install slony? do you dump all the databases, install 
> the latest version and after you restore? any other procedure? I'd 
> like to have my production server down as less time as possible.
>
>
> Thank you very much and have a great new year :D


-- 
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate


-------------------------------------------------------
Click link below if it is SPAM gsw@globexplorer.com
"https://mailscanner.globexplorer.com/dspam/dspam.cgi?signatureID=45950c6642261055016784&user=gsw...;
!DSPAM:45950c6642261055016784!
-------------------------------------------------------








^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: How do you upgrade for production servers?
@ 2006-12-29 16:10  Jerry Sievers <jerry@jerrysievers.com>
  parent: Arnau <arnaulist@andromeiberica.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Jerry Sievers @ 2006-12-29 16:10 UTC (permalink / raw)
  To: arnaulist@andromeiberica.com; +Cc: pgsql-admin

Arnau <arnaulist@andromeiberica.com> writes:

> Hi all,
> 
>    This is a general question about which procedure you follow when
>    you upgrade your productions servers. Let's say we have a server
>    running and older version and I want to install the latest version
>    on the same server. Do you install slony? do you dump all the
>    databases, install the latest version and after you restore? any
>    other procedure? I'd like to have my production server down as less
>    time as possible.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2006-12-29 16:10 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-29 12:06 How do you upgrade for production servers? Arnau <arnaulist@andromeiberica.com>
2006-12-29 12:42 ` Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
2006-12-29 13:45   ` Gregory S. Williamson <gsw@globexplorer.com>
2006-12-29 16:10 ` Jerry Sievers <jerry@jerrysievers.com>
2006-12-29 13:02 Re: How do you upgrade for production servers? Phillip Smith <fukawi2@iinet.net.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox