Upgrade standby after starting cluster using rsync

Поиск
Список
Период
Сортировка
От Martín Fernández
Тема Upgrade standby after starting cluster using rsync
Дата
Msg-id 5c86b376caab5331f9000001@polymail.io
обсуждение исходный текст
Ответы Re: Upgrade standby after starting cluster using rsync  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
Hello,

I've 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 --delete --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 the journey of upgrading the other half of the cluster since we have concluded that the upgrade was successful. 

We are planning 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 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  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-only ? Should we use the default rsync mechanism that would check for size and timestamps ?

Hoping someone has some better experience than me on upgrading standbys using rsync.

Thanks for all the help as usual!

Best,

Martín

В списке pgsql-general по дате отправления:

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: POSTGRES/MYSQL
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Autovacuum Transaction Wraparound