From: Bruce Momjian <bruce@momjian.us>
To: Don Seiler <don@seiler.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Upgrade master/slave: rsync?
Date: Tue, 19 Sep 2017 15:41:58 -0400
Message-ID: <20170919194158.GC15391@momjian.us> (raw)
In-Reply-To: <CAHJZqBDmY2UtD0YBbp+YGnvR0ARWwnRwEMsDibKrc37LWpqFcg@mail.gmail.com>
References: <CAHJZqBA_Z_HYf13Mqg=T0uDWHpoxoUAxoAv3BUJsSPHNwNr+cw@mail.gmail.com>
<20170913162413.GX4628@tamriel.snowman.net>
<CAHJZqBAyNA121LKyxt9itVnK864hZkpP4=wCT5WP3_SWQ0PxzQ@mail.gmail.com>
<20170913165335.GY4628@tamriel.snowman.net>
<CAHJZqBAnpTO651fm16uDysNTOdJeOy_X=F2DfFstc87UFzTOFg@mail.gmail.com>
<CAHJZqBDmY2UtD0YBbp+YGnvR0ARWwnRwEMsDibKrc37LWpqFcg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
On Wed, Sep 13, 2017 at 03:01:50PM -0500, Don Seiler wrote:
> Thinking more on this in my situation. The databases I've inherited have the
> default system tables in the default tablespaces under $PGDATA (/var/lib/pgsql/
> 9.2/data), but then also has most of the app-specific data on separate
> tablespaces outside of the data directory (eg various directories under /opt/
> postgres). Of course this also means the various symlinks to these from $PGDATA
> /pg_tblspc. For these, pg_upgrade will create a new directory
> (PG_9.6_201608131) with hard-links (assuming I used the --link option) to the
> old PG_9.2_201204301 directory, and then add symlinks from the new 9.6 $PGDATA
> directory to the tablespace location.
>
> I'm just trying to walk through this in my head. I'd need to run a similar
> rsync command for each of these. For example, for tablespace foo with location
> /opt/postgres/foo:
>
> cd /opt/postgres/foo
> rsync --archive --delete --hard-links --size-only PG_9.2_201204301
> PG_9.6_201608131 standby.host.com:/opt/postgres/foo
Yes.
> And then rinse & repeat for any others similar tablespaces for each standby/
> slave?
>
> Another question. I have one slave in the same datacenter as the master, the
> other slaves are in the DR data center across the country. I'm assuming I could
> sync those DR slaves from the local slave? That way I can get the master back
> online and serving requests as soon as the local slave is successfully upgraded
> rather than waiting for rsync over the WAN? And then one DR slave could be
> copied from the other so I only have to do the WAN rsync once (especially if
> it's a downstream standby in a cascading scenario)?
Yes.
I think you will find answers to these questions in the updated
pg_upgrade docs that were backpatched to 9.5:
https://www.postgresql.org/docs/9.6/static/pgupgrade.html
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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: bruce@momjian.us, don@seiler.us, sfrost@snowman.net
Subject: Re: Upgrade master/slave: rsync?
In-Reply-To: <20170919194158.GC15391@momjian.us>
* 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