Re: Using of replication by initdb for both nodes?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Bocap <kakalot4_9(at)yahoo(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using of replication by initdb for both nodes?
Date: 2013-08-30 12:47:19
Message-ID: CAB7nPqSxeMSYArLQ4Y0xb5CvS3fZyoC0qGZsSSqCkQb6=UBwjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Thu, Aug 29, 2013 at 11:06 PM, Bocap <kakalot4_9(at)yahoo(dot)com> wrote:
> 1. Instead of using pg_basebackup for standby DB, i initdb for both standby
> and primary.
> 2. Create recovery.conf in standby DB, and start both nodes.
> Now it work fine for me, but is it sure that no problem?
A standby node *needs* to be based on a base backup of its primary or
the node it connects to (it can be as well a slave in a cascading
configuration). One of the reasons being that they need to share the
same system identifier (Database system identifier output in
pg_controldata). Using initdb on multiple nodes to set up a cluster
will simply not satisfy this condition, and your cluster setup will
fail. More details here:
http://www.postgresql.org/docs/9.2/static/continuous-archiving.html
--
Michael

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Technical Doubts 2013-08-31 05:19:12 to_timestamp error between postgres version 8.3 and 9.2
Previous Message Richie Vazquez 2013-08-29 19:18:21 FW: Removal of $PGDATA/base files that existed before streaming replication (v9.2.4)

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2013-08-30 13:07:26 Re: My Experiment of PG crash when dealing with huge amount of data
Previous Message hxreno1 2013-08-30 09:57:00 Re: My Experiment of PG crash when dealing with huge amount of data