Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMzyZ-0008Qo-Gu for pgsql-docs@arkaria.postgresql.org; Thu, 07 Dec 2017 17:28:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMzyY-0007hZ-GK for pgsql-docs@arkaria.postgresql.org; Thu, 07 Dec 2017 17:28:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eMzyY-0007hQ-7P for pgsql-docs@lists.postgresql.org; Thu, 07 Dec 2017 17:28:46 +0000 Received: from mail-yb0-x241.google.com ([2607:f8b0:4002:c09::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eMzyP-0000b2-Ff for pgsql-docs@lists.postgresql.org; Thu, 07 Dec 2017 17:28:45 +0000 Received: by mail-yb0-x241.google.com with SMTP id 5so3266766ybp.4 for ; Thu, 07 Dec 2017 09:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seiler-us.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=Lmw4Zcu5Mq6bmJ8P5GDgDwIqv1OG7oCLxFKeaBvFt+0=; b=vqCIgwrLLGyHusvNV78NxxmuVswzTGcwKI+K2xZaghYMClCwFvMk/VS6dF6C6pVjL8 KmkaYkY+hQIw6VR7oEHyJ6gQiDP5T3sxSdng3RB65yXmH6Bfrpu5zjbE7lH+BKAzkSIY 20AfZo0qsV+JbpdRNDYYlgaaTtPBrAFYPeJOLpwZIy9Wse8oP5jjDsvXeaoMHn/e6eGk qkliNIYj3G/mJeOLj3IeA819/OSS02VGaB86CdpLPENiDLPQ8IYd9A+NPCN8rXxKnSYP 3b9cX3Hq93sNb57EnExkmyTgvT3dnbFaIJsDFib2Xamqc9ef8iM9F0bETdNQ/3yUIG5h 2Z0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Lmw4Zcu5Mq6bmJ8P5GDgDwIqv1OG7oCLxFKeaBvFt+0=; b=Yf22nwcvaCZfJoYElMwaJrUjHNoxNrDpJ/xDAyh4oUilB0vp8bzDaCbMySmZYrKM2n Ri2MQlPIymgdZBmX0xu5E4xJ/+L8eJHCcu07HEk7azLlKE12h5TUWveqpH1+vryunqhZ oPF4pEvbkr3WcyR/t+5lyOyu6x7JBivaOgGUeZcdqGJ27pkxhX2eVDM6WEXYHbm88zzN WVM0l+TK4JRwIQW+M9Fou0rX6Zkoe01U8VFUonlWXVjqp7vkflhLCO8cS59CW9j6y2X1 t+h8A2qw0pqfnWtKrAzx/hMOb63KNFKUUYxEw/n2pLFa3F7k0RJUmYQ8qtdz7kye8enn oYmQ== X-Gm-Message-State: AKGB3mJkSm9AYQr+7EiGOWqcHmGtf8eHF2T1A6NDzeLBRE69Nj25AnEq eM/+PvNSVwP747mRF4vMO1D+rj6ptpCk84E+T0EBXhBKDAg= X-Google-Smtp-Source: AGs4zMZ9vOga71wCUe7ASDyJ5yKIJz1HTtHJiDoOs9KLu/Hejjzn5w0tq7OEza6e8f7o4JEDhdB0+sSB7u7bvpYJMKs= X-Received: by 10.37.183.140 with SMTP id n12mr9202141ybh.9.1512667713166; Thu, 07 Dec 2017 09:28:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.215.11 with HTTP; Thu, 7 Dec 2017 09:28:12 -0800 (PST) From: Don Seiler Date: Thu, 7 Dec 2017 11:28:12 -0600 Message-ID: Subject: Bug in pg_upgrade standby rsync doc To: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="089e0822e438b4fd13055fc36568" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --089e0822e438b4fd13055fc36568 Content-Type: text/plain; charset="UTF-8" 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 --089e0822e438b4fd13055fc36568 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In step 10 of the pg_upgrade doc at=C2=A0https://www.postgresql= .org/docs/9.6/static/pgupgrade.html, it uses this example for rsyncing = the main $PGDATA dir to the standby:

<= pre class=3D"gmail-PROGRAMLISTING" style=3D"font-size:1.3em;color:rgb(0,0,0= );border-width:1px;border-style:solid;padding:2ex;margin-top:2ex;margin-bot= tom:2ex;margin-left:2ex;overflow:auto;border-radius:8px;border-color:rgb(20= 7,207,207);background-color:rgb(247,247,247)">rsync --archive --delete --ha= rd-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/l= ib/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, s= o that I'm just specifying 9.2 and 9.6, it works as desired. eg:
<= div>
rsync --a=
rchive --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.sei= ler.us
--089e0822e438b4fd13055fc36568--