Re: Checkpoint Err on Startup of Rsynced System

From: Venkata Balaji N <nag1010(at)gmail(dot)com>
To: Jim Longwill <longwill(at)psmfc(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Checkpoint Err on Startup of Rsynced System
Date: 2016-05-31 22:00:44
Message-ID: CAEyp7J9Mwkd2DRVh7geAwy9QzB-9-qbqQtPMdFCGiNSdSki2FQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 1, 2016 at 3:13 AM, Jim Longwill <longwill(at)psmfc(dot)org> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Longwill 2016-05-31 22:11:41 Re: Checkpoint Err on Startup of Rsynced System
Previous Message CS DBA 2016-05-31 21:50:06 Re: plql and or clausule