Re: Ubuntu Packages / Config Files

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Stephan Fabel <sfabel(at)hawaii(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: Ubuntu Packages / Config Files
Date: 2014-05-01 19:35:17
Message-ID: 5362A1F5.6030103@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/05/2014 19:40, Stephan Fabel wrote:
> All,
>
> apologies if this has been addressed somewhere already. I don't have a
> lot of experience in PostgreSQL; this is my first setup where I'm trying
> to scale and provide some of the more advanced features (like WAL
> shipping, master-slave sync, integrating pgbouncer, etc.), and I'm
> looking for help regarding the configuration files.
>
> I'm using Ubuntu 12.04 for these deployments at the moment. The Ubuntu
> packages don't put the configuration files with the cluster data (by
> default under /var/lib/postgresql/9.1/main under 12.04), but in
> /etc/postgresql/9.1/main) and they start postgres with the -c option
> pointing there.
>
> Whenever I try to add a slave, first I stop the postgresql service, move
> the above data directory to something like
> /var/lib/postgresql/9.1/main.orig, create a new 'main' directory with
> identical permissions/ownerships, and start pg_basebackup pointing
> there. It will not copy the server.crt and server.key symlinks (by
> default pointing to the "snakeoil" cert/key) so I re-create those. I
> then put the appropriate recovery.conf into /etc/postgresql/9.1/main,
> given that that's the configuration directory where everything is. I set
> "wal_level = hot_standby" and "hot_standby = on" in postgresql.conf.
> After I then start the postgresql service again.

You haven't made it clear that you are actually replicating to a
different PostgreSQL server (whether on the same machine or on another
one) - is that the case?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message bricklen 2014-05-01 19:39:44 Re: Backups over slave instead master?
Previous Message Seb 2014-05-01 19:26:41 Re: break table into portions for writing to separate files