Using of replication by initdb for both nodes?

Started by Bocapover 12 years ago3 messagesgeneral
Jump to latest
#1Bocap
kakalot4_9@yahoo.com

Hi all,

I think it is not documented the follow using of replication, but is that correct.

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?

Regards,
Bocap

#2Bocap
kakalot4_9@yahoo.com
In reply to: Bocap (#1)
Re: Using of replication by initdb for both nodes?

So sorry for this inconvenience, please delete the same one i've posted.

This is the first time i'm posted to this maillist.

On 2013/08/29, at 23:06, Bocap <kakalot4_9@yahoo.com> wrote:

Show quoted text

Hi all,

I think it is not documented the follow using of replication, but is that correct.

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?

Regards,
Bocap

#3Michael Paquier
michael@paquier.xyz
In reply to: Bocap (#1)
Re: Using of replication by initdb for both nodes?

On Thu, Aug 29, 2013 at 11:06 PM, Bocap <kakalot4_9@yahoo.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

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