Search Postgresql Archives

Re: pgsql 9.0.1 table corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Benjamin Smith <lists@xxxxxxxxxxxxxxxxxx> writes:
> On Friday, April 15, 2011 09:50:57 AM Tom Lane wrote:
>> If you simply unpacked the tar archive and started a postmaster on that,
>> you'd be pretty much guaranteed to get a corrupt database.  The tar
>> archive is not a valid snapshot by itself --- you have to replay
>> whatever WAL was generated during the archiving sequence in order to get
>> to a consistent database state. 

> I have, more than once, "moved" a PG instance from one machine to another with 
> the following sequence, without apparent issue. is there anything I'm missing 
> and/or need to be concerned with? 

> 1) service postgresql stop; 
> 2) rsync -vaz /var/lib/pgsql root@newserver:/var/lib/pgsql; 
> 3) ssh root@newserver; 
> 4) (edit postgresql.conf, set IP addresses, memory, etc)
> 5) service postgresql start; 

That way is fine --- what you can't do is take a tarball while the
server is running, unless you do the full nine yards with WAL replay.

			regards, tom lane

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux