Search Postgresql Archives

Re: Checkpoint Err on Startup of Rsynced System

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

 




On Wed, Jun 1, 2016 at 3:13 AM, Jim Longwill <longwill@xxxxxxxxx> wrote:
I am trying to setup a 2nd, identical, db server (M2) for development and I've run into a problem with starting up the 2nd Postgres installation.

Here's what I've done:
  1) did a 'clone' of 1st (production) machine M1 (so both machines on Cent OS 7.2)
  2) setup an rsync operation, did a complete 'rsync' from M1 to M2
  3) did a final 'CHECKPOINT' command on M1 postgres
  4) shutdown postgres on M1 with 'pg_ctl stop'
  5) did final 'rsync' operation  (then restarted postgres on M1 with 'pg_ctl start')
  6) tried to startup postgres on M2

If you rsync the data-directory of an live running postgres instance, that is not going to work. As Scott said earlier, you need to do "select pg_start_backup('labelname');" before you initiate rsync and "select pg_stop_backup()" after you complete rsync. That way, postgresql would know that you are rsyncing and also identifies the required WALs to be copied over.

Or if you can shutdown M1 for sometime then, simply shutdown M1 copy over (or rsync) the data-directory to M2 and then start the M2 instance. That should work.

Regards,
Venkata B N

Fujitsu Australia

[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