Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10(upgrading standby servers) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10(upgrading standby servers)
Date
Msg-id 20170913132627.GG6766@momjian.us
Whole thread Raw
In response to Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10(upgrading standby servers)  (Andreas Joseph Krogh <andreas@visena.com>)
Responses Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10(upgrading standby servers)
Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10(upgrading standby servers)
List pgsql-hackers
On Wed, Sep 13, 2017 at 01:35:17AM +0200, Andreas Joseph Krogh wrote:
> På onsdag 13. september 2017 kl. 01:00:20, skrev Bruce Momjian <
> bruce@momjian.us>:
> (I know this isn't exactly -hackers food, but it seems natural to end this
> thread here)
>  
> Ok, thanks.
> It is clearer what happens now that you've explained that there's a clever
> "rsync-trick" involving 2 directories and making rsync preserving
> hard-links that way on the destination-server. Maybe it's because I'm not a
> native English speaker but it wasn't obvious to me...
>  
> I have my tablespaces laid out like this:
> /storage/fast_ssd/9.6/tablespaces/<customer>
> which you correctly say that in practice means that 9.6 files are (I see now
> that I don't need the pg-version in my directory-structure):
> /storage/fast_ssd/9.6/tablespaces/<customer>/PG_9.6_201608131
>  
> I understand, I hope, that without link-mode rsyncing tablespaces would be like
> this:
> rsync --archive /path/to/tablespace_basedir standby:/path/to/tablespace_basedir
>  
> What would the equivalent be in link-mode, for transferring most efficiently?
> The reason I ask is that it's not immediately obvious to me what "old_datadir"
> and "new_datadir" when rsync'ing tablespaces and pg_wal dirs outside the
> "pg-dirs".
>  
> Speaking of pg_wal, how should this be rsynced now that it's changed its name
> (from pg_xlog), just rsync pg_xlog and rename it?
>  
> I know I'm being a little nitty-gritty here, but if it helps me understand it
> might help others.

I have applied the attached patch to show examples of using rsync on
PGDATA and tablespaces, documented that rsync is only useful when in
link mode, and explained more clearly how rsync handles links.  You can
see the results here:

    http://momjian.us/pgsql_docs/pgupgrade.html

Any more improvements?

-- 
  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-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] Hooks to track changed pages for backup purposes
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE insteadof UNBOUNDED for range partition b