Re: Data directory copies...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
Cc: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Data directory copies...
Date: 2004-12-01 19:04:35
Message-ID: 15742.1101927875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Steve Tucknott <steve(at)retsol(dot)co(dot)uk> writes:
> If I have two 'servers' - both RedHat 8, both running PostgreSQL 7.4.5,
> is is valid (if the postmaster is down on both servers) to simply copy
> the PGDATA directory from one 'server' to a different (previously
> emptied) location on the second 'server'?

Yes, if the servers are compiled identically on both machines. (If they
were compiled with different options, the second server should refuse to
start on the copied data directory, so you don't need to be too afraid
of getting burnt. But you do need to be sure the two machines are of
the same architecture --- don't try this between, say, i386 and PPC, nor
even between 32- and 64-bit models on a 64-bit machine.)

You must copy the whole PGDATA directory tree, of course.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Steve Tucknott 2004-12-01 19:05:22 Data directory copies...
Previous Message Robert Wimmer 2004-12-01 16:56:04 catch runtime errors