Re: [ADMIN] Upgrade master/slave: rsync?

Поиск
Список
Период
Сортировка
От Don Seiler
Тема Re: [ADMIN] Upgrade master/slave: rsync?
Дата
Msg-id CAHJZqBDmY2UtD0YBbp+YGnvR0ARWwnRwEMsDibKrc37LWpqFcg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [ADMIN] Upgrade master/slave: rsync?  (Don Seiler <don@seiler.us>)
Ответы Re: [ADMIN] Upgrade master/slave: rsync?
Список pgsql-admin
Thinking more on this in my situation. The databases I've inherited have the default system tables in the default tablespaces under $PGDATA (/var/lib/pgsql/9.2/data), but then also has most of the app-specific data on separate tablespaces outside of the data directory (eg various directories under /opt/postgres). Of course this also means the various symlinks to these from $PGDATA/pg_tblspc. For these, pg_upgrade will create a new directory (PG_9.6_201608131) with hard-links (assuming I used the --link option) to the old PG_9.2_201204301 directory, and then add symlinks from the new 9.6 $PGDATA directory to the tablespace location.

I'm just trying to walk through this in my head. I'd need to run a similar rsync command for each of these. For example, for tablespace foo with location /opt/postgres/foo:

cd /opt/postgres/foo
rsync --archive --delete --hard-links --size-only PG_9.2_201204301 PG_9.6_201608131 standby.host.com:/opt/postgres/foo

And then rinse & repeat for any others similar tablespaces for each standby/slave?

Another question. I have one slave in the same datacenter as the master, the other slaves are in the DR data center across the country. I'm assuming I could sync those DR slaves from the local slave? That way I can get the master back online and serving requests as soon as the local slave is successfully upgraded rather than waiting for rsync over the WAN? And then one DR slave could be copied from the other so I only have to do the WAN rsync once (especially if it's a downstream standby in a cascading scenario)?

Don.

--
Don Seiler
www.seiler.us

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

Предыдущее
От: Raghavendra
Дата:
Сообщение: Re: [ADMIN] Configure Python 3
Следующее
От: yaya2002
Дата:
Сообщение: [ADMIN] ec2 not connect postgreSql "Connection refused. Check that thehostname and port are correct"