Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duOR8-00060v-Ag for pgsql-admin@arkaria.postgresql.org; Tue, 19 Sep 2017 19:44:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1duOR7-00006H-Tk for pgsql-admin@arkaria.postgresql.org; Tue, 19 Sep 2017 19:44:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1duOPH-0002pg-Kl for pgsql-admin@postgresql.org; Tue, 19 Sep 2017 19:42:07 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1duOPA-0007gE-Ge for pgsql-admin@postgresql.org; Tue, 19 Sep 2017 19:42:06 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1duOP8-0007WP-Bb; Tue, 19 Sep 2017 15:41:58 -0400 Date: Tue, 19 Sep 2017 15:41:58 -0400 From: Bruce Momjian To: Don Seiler Cc: Stephen Frost , pgsql-admin Subject: Re: Upgrade master/slave: rsync? Message-ID: <20170919194158.GC15391@momjian.us> References: <20170913162413.GX4628@tamriel.snowman.net> <20170913165335.GY4628@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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 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