pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Migration of PGDATA
7+ messages / 5 participants
[nested] [flat]

* Migration of PGDATA
@ 2010-03-29 09:31 "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 10:07 ` Re: Migration of PGDATA Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-29 10:18 ` Re: Migration of PGDATA Robert Joosten <robert@ml.erje.net>
  0 siblings, 2 replies; 7+ messages in thread

From: "Martin Münstermann" @ 2010-03-29 09:31 UTC (permalink / raw)
  To: pgsql-admin

Hi,

is it safe to move the PGDATA directory from one system to another when migrating from one operating system to another?
For example: migrating from Debian to RHEL, or from RHEL4 to RHEL5?
The database is of course shutdown properly, and the PG major versions match.

Or is a dump/restore necessary in these cases?

Thanks,
 Martin

-- 
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02



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

* Re: Migration of PGDATA
  2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
@ 2010-03-29 10:07 ` Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-29 11:50   ` Re: Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
  1 sibling, 1 reply; 7+ messages in thread

From: Guillaume Lelarge @ 2010-03-29 10:07 UTC (permalink / raw)
  To: Martin Münstermann <mmuenst@gmx.de>; +Cc: pgsql-admin

Le 29/03/2010 11:31, "Martin Münstermann" a écrit :
> [...]
> is it safe to move the PGDATA directory from one system to another when migrating from one operating system to another?
> For example: migrating from Debian to RHEL, or from RHEL4 to RHEL5?
> The database is of course shutdown properly, and the PG major versions match.
> 
> Or is a dump/restore necessary in these cases?
> 

As long as you have the same hardware platform (for example no
32bit/64bit changes) and no difference in compiling options (for example
--disable-integer-datetimes), it should work great.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com



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

* Re: Migration of PGDATA
  2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 10:07 ` Re: Migration of PGDATA Guillaume Lelarge <guillaume@lelarge.info>
@ 2010-03-29 11:50   ` "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 14:47     ` Re: Migration of PGDATA Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: "Martin Münstermann" @ 2010-03-29 11:50 UTC (permalink / raw)
  To: pgsql-admin

Hi,

> > is it safe to move the PGDATA directory from one system to another when
> migrating from one operating system to another?
> > For example: migrating from Debian to RHEL, or from RHEL4 to RHEL5?
> > The database is of course shutdown properly, and the PG major versions
> match.
> > 
> > Or is a dump/restore necessary in these cases?
> > 
> 
> As long as you have the same hardware platform (for example no
> 32bit/64bit changes) and no difference in compiling options (for example
> --disable-integer-datetimes), it should work great.

There is no difference in the platform or the compiler options.

In case it does not work great, what kind of problems would we experience?
Would PG not startup at all? Or would we experience SQL errors later on or even casual crashes?

Thanks,
 Martin


-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser



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

* Re: Migration of PGDATA
  2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 10:07 ` Re: Migration of PGDATA Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-29 11:50   ` Re: Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
@ 2010-03-29 14:47     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2010-03-29 14:47 UTC (permalink / raw)
  To: "Martin Münstermann" <mmuenst@gmx.de>; +Cc: pgsql-admin

=?iso-8859-1?Q?=22Martin_M=FCnstermann=22?= <mmuenst@gmx.de> writes:
> In case it does not work great, what kind of problems would we experience?

In theory pg_control contains enough information to detect such
compatibility problems, so that you'd get a refusal to start.
In practice, maybe not, and the consequences could be arbitrarily
unpleasant.  Better keep a pg_dump backup just in case.

One thing I'd particularly caution you to check is that the locale
settings on the new platform are equivalent to those on the old.
We have seen cases where the same locale name produces different
sort orderings on different platforms.  That will result in corrupt
(malfunctioning) indexes on text columns.

			regards, tom lane



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

* Re: Migration of PGDATA
  2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
@ 2010-03-29 10:18 ` Robert Joosten <robert@ml.erje.net>
  2010-03-29 10:49   ` Re: Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
  1 sibling, 1 reply; 7+ messages in thread

From: Robert Joosten @ 2010-03-29 10:18 UTC (permalink / raw)
  To: pgsql-admin

Hi,

> is it safe to move the PGDATA directory from one system to another when migrating from one operating system to another?
> For example: migrating from Debian to RHEL, or from RHEL4 to RHEL5?
> The database is of course shutdown properly, and the PG major versions match.
> Or is a dump/restore necessary in these cases?

Besides the other reply, take into account little- versus bigendian 
changes if you switch hardware.

But just out of curiosity: why propose against a dump/restore ? I mean: 
when I upgrade between major releases I dump as well, as it is 
recommended. I never ran into trouble, you know. 

Regards,
Robert



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

* Re: Migration of PGDATA
  2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 10:18 ` Re: Migration of PGDATA Robert Joosten <robert@ml.erje.net>
@ 2010-03-29 10:49   ` "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 10:53     ` Re: Migration of PGDATA Renato Oliveira <renato.oliveira@grant.co.uk>
  0 siblings, 1 reply; 7+ messages in thread

From: "Martin Münstermann" @ 2010-03-29 10:49 UTC (permalink / raw)
  To: Robert Joosten <robert@ml.erje.net>; pgsql-admin

Hi,

> > is it safe to move the PGDATA directory from one system to another when
> migrating from one operating system to another?
> > For example: migrating from Debian to RHEL, or from RHEL4 to RHEL5?
> > The database is of course shutdown properly, and the PG major versions
> match.
> > Or is a dump/restore necessary in these cases?
> 
> Besides the other reply, take into account little- versus bigendian 
> changes if you switch hardware.

Good point. But as we stick to Linux on Intel, we expect no problems there.

> But just out of curiosity: why propose against a dump/restore ? I mean: 
> when I upgrade between major releases I dump as well, as it is 
> recommended. I never ran into trouble, you know. 

It's a question of migration duration aka downtime.
Our PGDATA resides on a SAN, so moving/migrating the directory takes a couple of seconds. A dump/restore cycle would take much longer.

Thanks,
 Martin

-- 
GMX.at - Österreichs FreeMail-Dienst mit über 2 Mio Mitgliedern
E-Mail, SMS & mehr! Kostenlos: http://portal.gmx.net/de/go/atfreemail



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

* Re: Migration of PGDATA
  2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
  2010-03-29 10:18 ` Re: Migration of PGDATA Robert Joosten <robert@ml.erje.net>
  2010-03-29 10:49   ` Re: Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
@ 2010-03-29 10:53     ` Renato Oliveira <renato.oliveira@grant.co.uk>
  0 siblings, 0 replies; 7+ messages in thread

From: Renato Oliveira @ 2010-03-29 10:53 UTC (permalink / raw)
  To: "Martin Münstermann" <mmuenst@gmx.de>; Robert Joosten <robert@ml.erje.net>; pgsql-admin

Only out of curiosity, is your current server 32 bit or 64?
Are you migrating 32 to 32 or 64 to 64?

Thank you

Renato



Renato Oliveira
Systems Administrator
e-mail: renato.oliveira@grant.co.uk

Tel: +44 (0)1763 260811
Fax: +44 (0)1763 262410
http://www.grant.co.uk/

Grant Instruments (Cambridge) Ltd

Company registered in England, registration number 658133

Registered office address:
29 Station Road,
Shepreth,
CAMBS SG8 6GB
UK

-----Original Message-----


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of "Martin Münstermann"
Sent: 29 March 2010 11:50
To: Robert Joosten; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Migration of PGDATA

Hi,

> > is it safe to move the PGDATA directory from one system to another when
> migrating from one operating system to another?
> > For example: migrating from Debian to RHEL, or from RHEL4 to RHEL5?
> > The database is of course shutdown properly, and the PG major versions
> match.
> > Or is a dump/restore necessary in these cases?
>
> Besides the other reply, take into account little- versus bigendian
> changes if you switch hardware.

Good point. But as we stick to Linux on Intel, we expect no problems there.

> But just out of curiosity: why propose against a dump/restore ? I mean:
> when I upgrade between major releases I dump as well, as it is
> recommended. I never ran into trouble, you know.

It's a question of migration duration aka downtime.
Our PGDATA resides on a SAN, so moving/migrating the directory takes a couple of seconds. A dump/restore cycle would take much longer.

Thanks,
 Martin

--
GMX.at - Österreichs FreeMail-Dienst mit über 2 Mio Mitgliedern
E-Mail, SMS & mehr! Kostenlos: http://portal.gmx.net/de/go/atfreemail

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



-----Original Message-----


P Please consider the environment before printing this email
CONFIDENTIALITY: The information in this e-mail and any attachments is confidential. It is intended only for the named recipients(s). If you are not the named recipient please notify the sender immediately and do not disclose the contents to another person or take copies.

VIRUSES: The contents of this e-mail or attachment(s) may contain viruses which could damage your own computer system. Whilst Grant Instruments (Cambridge) Ltd has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should therefore carry out your own virus checks before opening the attachment(s).

OpenXML: For information about the OpenXML file format in use within Grant Instruments please visit our http://www.grant.co.uk/Support/openxml.html




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


end of thread, other threads:[~2010-03-29 14:47 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 09:31 Migration of PGDATA "Martin Münstermann" <mmuenst@gmx.de>
2010-03-29 10:07 ` Guillaume Lelarge <guillaume@lelarge.info>
2010-03-29 11:50   ` "Martin Münstermann" <mmuenst@gmx.de>
2010-03-29 14:47     ` Tom Lane <tgl@sss.pgh.pa.us>
2010-03-29 10:18 ` Robert Joosten <robert@ml.erje.net>
2010-03-29 10:49   ` "Martin Münstermann" <mmuenst@gmx.de>
2010-03-29 10:53     ` Renato Oliveira <renato.oliveira@grant.co.uk>

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