pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Scott Whitney <swhitney@journyx.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Migrating to PG 9.2 (LONG, SORRY)
Date: Wed, 3 Oct 2012 21:18:03 -0400
Message-ID: <20121004011803.GO1267@tamriel.snowman.net> (raw)
In-Reply-To: <16066886.672322.1349283343874.JavaMail.root@mail.int.journyx.com>
References: <cf774789-5676-4931-bff3-3508814ebc7d@zimbra.int.journyx.com>
	<16066886.672322.1349283343874.JavaMail.root@mail.int.journyx.com>

* Scott Whitney (scott@journyx.com) wrote:
> 1)Add to pg_hba.conf on master:
> host  replication  postgres  my IP/32  trust

Never use 'trust'.  At least use 'md5', all that requires is putting a
password into your replication config.

> 2) Configure in postgresql.conf on master:
> wal_level = hot_standby
> max_wal_senders = 5
> wal_keep_segments = SOME NUMBER I HAVE TO DETERMINE BASED ON HOW LONG THE BACKUP ETC TAKES.
> 
> # Maybe do this if the above is not high enough
> #archive_mode    = on
> #archive_command = 'cp %p /path_to/archive/%f'

You should definitely have a mechanism for the WALs to be transferred to
the replica(s) on a regular basis.  Don't just rely on the replication
connection.  With this, you don't have to worry as much about the
wal_keep_segments option above...

> 3) Add to postgresql.conf on standby:
> hot_standby = on
> 
> 4) Create a recovery.conf on the standby (in $PGDATA):
> standby_mode          = 'on'
> primary_conninfo      = 'host=master IP port=5432 user=postgres'

In primary_conninfo is where you'd put the password for md5 auth.

> 5)Do my backup from the STANDBY AT THE DATA CETNER

I think the typical approach is to use the same copy of the master that
you did for the intial slave when doing the cascaded slave..
Regardless, and with all of this, test, test, test.

	Thanks,

		Stephen

Attachments:

  signature.asc (application/pgp-signature, 197B) download

view thread (2+ messages)

Message-ID: <20121004011803.GO1267@tamriel.snowman.net>
Permalink:  ../20121004011803.GO1267@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20121004011803.GO1267@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sfrost@snowman.net, swhitney@journyx.com
  Subject: Re: Migrating to PG 9.2 (LONG, SORRY)
  In-Reply-To: <20121004011803.GO1267@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox