Bug in pg_upgrade standby rsync doc - Mailing list pgsql-docs

From Don Seiler
Subject Bug in pg_upgrade standby rsync doc
Date
Msg-id CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=CQ@mail.gmail.com
Whole thread Raw
Responses Re: Bug in pg_upgrade standby rsync doc
List pgsql-docs
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

pgsql-docs by date:

Previous
From: madhevan@gmail.com
Date:
Subject: listen/notify sequence not working in windows10 pgAdmin 4
Next
From: blaz@merela.org
Date:
Subject: Potentially misplaced "we trust"