Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TJa4p-0002DB-CJ for pgsql-admin@postgresql.org; Thu, 04 Oct 2012 01:18:11 +0000 Received: from cl-174.chi-02.us.sixxs.net ([2001:4978:f:ad::2] helo=tamriel.snowman.net) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TJa4m-00006r-71 for pgsql-admin@postgresql.org; Thu, 04 Oct 2012 01:18:10 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 4F77922CD7; Wed, 3 Oct 2012 21:18:03 -0400 (EDT) Date: Wed, 3 Oct 2012 21:18:03 -0400 From: Stephen Frost To: Scott Whitney Cc: pgsql-admin@postgresql.org Subject: Re: Migrating to PG 9.2 (LONG, SORRY) Message-ID: <20121004011803.GO1267@tamriel.snowman.net> References: <16066886.672322.1349283343874.JavaMail.root@mail.int.journyx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B+k83gtVr6kFRNfs" Content-Disposition: inline In-Reply-To: <16066886.672322.1349283343874.JavaMail.root@mail.int.journyx.com> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.2.0-1-amd64 (x86_64) X-Uptime: 21:06:56 up 220 days, 7:12, 15 users, load average: 0.03, 0.08, 0.06 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/19 X-Sequence-Number: 40135 --B+k83gtVr6kFRNfs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * 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 =3D hot_standby > max_wal_senders =3D 5 > wal_keep_segments =3D SOME NUMBER I HAVE TO DETERMINE BASED ON HOW LONG T= HE BACKUP ETC TAKES. >=20 > # Maybe do this if the above is not high enough > #archive_mode =3D on > #archive_command =3D '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 =3D on >=20 > 4) Create a recovery.conf on the standby (in $PGDATA): > standby_mode =3D 'on' > primary_conninfo =3D 'host=3Dmaster IP port=3D5432 user=3Dpostgres' 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 --B+k83gtVr6kFRNfs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlBs48sACgkQrzgMPqB3kigPuwCfWuOA0AzE1AaSrs1vtWi1Vjbg WjsAnRP0oVK3hNIOxw8lokGtgF7oReLq =nGNi -----END PGP SIGNATURE----- --B+k83gtVr6kFRNfs--