Re: Setting up replication - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Setting up replication
Date
Msg-id 5508C3B3.4050308@aklaver.com
Whole thread Raw
In response to Setting up replication  (Robert Fitzpatrick <robert@webtent.org>)
List pgsql-general
On 03/17/2015 04:08 PM, Robert Fitzpatrick wrote:
> I have a question about setting up replication between my
> postgresql-9.3.6 servers. If I'm using pg_basebackup on my FreeBSD 10.1
> slave server, the postgresql.conf file is in the data directory, which
> pg_basebackup insists must be empty. I can't find any info about how to
> relocate the postgresql.conf file and tell the init script its new
> location. If I setup PITR prior to replication setup and share the same
> postgresql.conf file transferred by pg_basebackup, how can both servers
> see the archive directory? It is local for the slave, nfs mount for the
> master.
>
> Obviously there is something I'm missing or not understanding, can
> anyone help? Thanks!

A step by step on what you are doing would help.

In the meantime:

1) You should not have to initdb the standby, that is handled by
pg_basebackup copying over the binary files.

2) The archive directory in the standby is pointed to in recovery.conf:
http://www.postgresql.org/docs/9.3/static/recovery-config.html

A simple one can be set by pg_basebackup:

http://www.postgresql.org/docs/9.3/interactive/app-pgbasebackup.html

-R
--write-recovery-conf

     Write a minimal recovery.conf in the output directory (or into the
base archive file when using tar format) to ease setting up a standby
server.

>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Robert Fitzpatrick
Date:
Subject: Setting up replication
Next
From: Glyn Astill
Date:
Subject: Re: Reg: PL/pgSQL commit and rollback