Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3QYu-0007FR-0J for pgsql-general@arkaria.postgresql.org; Mon, 11 Mar 2019 19:26:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h3QYs-0004cL-46 for pgsql-general@arkaria.postgresql.org; Mon, 11 Mar 2019 19:26:10 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3QYr-0004bk-SQ for pgsql-general@lists.postgresql.org; Mon, 11 Mar 2019 19:26:09 +0000 Received: from mail-it1-x142.google.com ([2607:f8b0:4864:20::142]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3QYp-00045N-Ji for pgsql-general@lists.postgresql.org; Mon, 11 Mar 2019 19:26:09 +0000 Received: by mail-it1-x142.google.com with SMTP id w18so500121itj.4 for ; Mon, 11 Mar 2019 12:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:date:message-id:subject:from:to; bh=5khd7ISnvDGJrzDj6K8iBC+4Ul8sm2x2fIFKCMX7PPM=; b=nTGH78DWHHHQhVJCiaJ6D704eNsUvmFL8DTXL52Shz/0dxCAXbK5bonwaLb0f2tp4H 0rbEarCRrvl9XapeG5M+uxv55WLOo4wxNngZkRHwCemHsu5xFStCROZKA91okM7xYHf3 vqXKl0pu2uTp6ghQ6hJ+gJMOKFbkg+/u7xpYduIcg59bK39Wg8wwv+7L/dg+Nfw1mEO9 6XndNMjsmOVkmf7NJuyfoXbVkqb5xlYmY1xGrvoCoSYPDlW3SAXtjI3GqMiFNhoqrykG EXt4CyXEiCGqJfuWClHk0SXihPX8O7kg8qoN2FE6qT96JKxWKuCp0hzkkK0nH8HXbbsu 2MDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=5khd7ISnvDGJrzDj6K8iBC+4Ul8sm2x2fIFKCMX7PPM=; b=CAwBnMmShN+Ea71XDw0MeFW/AgBtAUdQ4UUE17R+bC4CRt8UHlA8G9jTzuCAJNp+o5 RGpwupl8m6OeQORAakia1HyKIBL/QgrzklkkrKLtTPPDufoU7rT6ReZib577YIJsSWoi thfdIVeAp8Qd3FUHPWGsQpAys9Hcu1sx86ZSkJtLtMcaPpRYKBy7uS0oHMVn2Gcfc8CY iwM3RR2u59b16aZVPz3MKsZ2O0ypepVVdAfglj/rcy3FwbXn9VqibU9/9DyihATPSDED agOPy2k8nP/lhjR9oMlJffqxmlqNKfVcP8oxwiWkBsmviJtGre5ARWBTl8AH6c0eKXh8 8/xg== X-Gm-Message-State: APjAAAWuNVvDmNqtOLSnmckdGX/f0t36Cwe3cpVBWvQOQL6tnwFc5vVS 7OG80nSW82Us3KsN02mdlMIVc9WI X-Google-Smtp-Source: APXvYqyCp4VAFEAyS4ycsv/08TkEfikQsk+tCnVAASOTPtB/GRduSVUJoFILpWDdOH/gTySwhuak8w== X-Received: by 2002:a24:45a3:: with SMTP id c35mr222243itd.37.1552332365342; Mon, 11 Mar 2019 12:26:05 -0700 (PDT) Received: from localhost (166.193.193.35.bc.googleusercontent.com. [35.193.193.166]) by smtp.gmail.com with ESMTPSA id e12sm2756198iod.6.2019.03.11.12.26.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 12:26:04 -0700 (PDT) Mime-Version: 1.0 Date: Mon, 11 Mar 2019 12:25:55 -0700 X-Mailer: Polymail Message-ID: <5c86b376caab5331f9000001@polymail.io> X-Polymail-Id: <5c86b376caab5331f9000001@polymail.io> Subject: Upgrade standby after starting cluster using rsync From: =?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?= To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary=fe9d51e95ecd144ccdb4654ad074f73ef9b7505fb2250e0fa324b3f108e8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --fe9d51e95ecd144ccdb4654ad074f73ef9b7505fb2250e0fa324b3f108e8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hello, I've wrote a couple of questions around pg_upgrade and updating standbys us= ing rsync last week. We were able to successfully upgrade half of our clust= er (the other half was kept for failover) from pg92 with postgis 1.5.8 to p= g10 with postgis 2.4. It was a really interesting challenge because of post= gis binary incompatibility for geometry data types. The rsync call that we used looked exactly like this (taken from pg_upgrade= man page basically): `rsync --verbose --verbose --progress --archive --delete --hard-links --siz= e-only=C2=A0 --no-inc-recursive /var/lib/postgres/9.2 /var/lib/postgres/10 = $REPLICA_IP:/var/lib/postgres` We are now in the journey of upgrading the other half of the cluster since = we have concluded that the upgrade was successful.=C2=A0 We are planning on using the same rsync call to upgrade the rest of the sta= ndbys (in combination with pg_start_backup/pg_stop_backup low level api). M= y only concern is that I'm not 100% sure if the `--size-only` flag will be = enough to guarantee that files are the same. On the initial set of standbys= that we upgraded this shouldn't generate an issue since the standbys were = at the same last checkpoint than the master=C2=A0 and we did the rsync call= before starting the primary (after running pg_upgrade). Is there any potential issues that could show up if we do it with --size-on= ly ? Should we use the default rsync mechanism that would check for size an= d timestamps ? Hoping someone has some better experience than me on upgrading standbys usi= ng rsync. Thanks for all the help as usual! Best, Mart=C3=ADn --fe9d51e95ecd144ccdb4654ad074f73ef9b7505fb2250e0fa324b3f108e8 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 3D""
Hello,

I'v= e wrote a couple of questions around pg_upgrade and updating standbys using= rsync last week. We were able to successfully upgrade half of our cluster = (the other half was kept for failover) from pg92 with postgis 1.5.8 to pg10= with postgis 2.4. It was a really interesting challenge because of postgis= binary incompatibility for geometry data types.

The rsync call that= we used looked exactly like this (taken from pg_upgrade man page basically= ):

`rsync --verbose --verbose --progress --archive --dele= te --hard-links --size-only  --no-inc-recursive /var/lib/postgres/9.2 = /var/lib/postgres/10 $REPLICA_IP:/var/lib/postgres`

We are now in th= e journey of upgrading the other half of the cluster since we have conclude= d that the upgrade was successful. 

We are pl= anning on using the same rsync call to upgrade the rest of the standbys (in= combination with pg_start_backup/pg_stop_backup low level api). My only co= ncern is that I'm not 100% sure if the `--size-only` flag will be enough to= guarantee that files are the same. On the initial set of standbys that we = upgraded this shouldn't generate an issue since the standbys were at the sa= me last checkpoint than the master  and we did the rsync call before s= tarting the primary (after running pg_upgrade).

Is there any potenti= al issues that could show up if we do it with --size-only ? Should we use t= he default rsync mechanism that would check for size and timestamps ?
Hoping someone has some better experience than me on upgrading standbys u= sing rsync.

Thanks for all the help as usual!

Best,

Mart=C3=ADn
--fe9d51e95ecd144ccdb4654ad074f73ef9b7505fb2250e0fa324b3f108e8--