public inbox for [email protected]  
help / color / mirror / Atom feed
From: Don Seiler <[email protected]>
To: [email protected]
Subject: Bug in pg_upgrade standby rsync doc
Date: Thu, 7 Dec 2017 11:28:12 -0600
Message-ID: <CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=CQ@mail.gmail.com> (raw)

In step 10 of the pg_upgrade doc at
https://www.postgresql.org/docs/9.6/static/pgupgrade.html, it uses this
example for rsyncing the main $PGDATA dir to the standby:

rsync --archive --delete --hard-links --size-only --no-inc-recursive
/opt/PostgreSQL/9.5/data \
      /opt/PostgreSQL/9.6/data standby.example.com:/opt/PostgreSQL


However when I ran this (substituting /var/lib/pgsql for /opt/PostgreSQL),
I found that it put a directory under /var/lib/pgsql/data, and my 9.6/data
dir was still empty. Furthermore, what was in /var/lib/pgsql/data appeared
to be the old 9.2 contents.

I suspect this is because the "data" directories are two levels below the
parent directory specified at the end of the command. When I used the
similar command for separate tablespaces, it worked as expected.

When I run the command with the "data" dir, so that I'm just specifying 9.2
and 9.6, it works as desired. eg:

rsync --archive --delete --hard-links --size-only --no-inc-recursive
/opt/PostgreSQL/9.5 \
      /opt/PostgreSQL/9.6 standby.example.com:/opt/PostgreSQL


FWIW I was upgrading from 9.2.22 to 9.6.6 on CentOS 6.

-- 
Don Seiler
www.seiler.us


view thread (3+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Bug in pg_upgrade standby rsync doc
  In-Reply-To: <CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=CQ@mail.gmail.com>

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

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