Re: Checkpoint Err on Startup of Rsynced System

Поиск
Список
Период
Сортировка
От Venkata Balaji N
Тема Re: Checkpoint Err on Startup of Rsynced System
Дата
Msg-id CAEyp7J9Mwkd2DRVh7geAwy9QzB-9-qbqQtPMdFCGiNSdSki2FQ@mail.gmail.com
обсуждение исходный текст
Ответ на Checkpoint Err on Startup of Rsynced System  (Jim Longwill <longwill@psmfc.org>)
Список pgsql-general

On Wed, Jun 1, 2016 at 3:13 AM, Jim Longwill <longwill@psmfc.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

В списке pgsql-general по дате отправления:

Предыдущее
От: CS DBA
Дата:
Сообщение: Re: plql and or clausule
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Row security policies documentation question