Re: pg_upgrade and rsync
От | Josh Berkus |
---|---|
Тема | Re: pg_upgrade and rsync |
Дата | |
Msg-id | 54C9C473.8080201@agliodbs.com обсуждение исходный текст |
Ответ на | Re: pg_upgrade and rsync (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: pg_upgrade and rsync
Re: pg_upgrade and rsync Re: pg_upgrade and rsync |
Список | pgsql-hackers |
> So, for my 2c, I'm on the fence about it. On the one hand, I agree, > it's a bit of a complex process to get right. On the other hand, it's > far better if we put something out there along the lines of "if you > really want to, this is how to do it" than having folks try to fumble > through to find the correct steps themselves. So, here's the correct steps for Bruce, because his current doc does not cover all of these. I really think this should go in as a numbered set of steps; the current doc has some steps as steps, and other stuff buried in paragraphs. 1. Install the new version binaries on both servers, alongside the old version. 2. If not done by the package install, initdb the new version's data directory. 3. Check that the replica is not very lagged. If it is, wait for traffic to die down and for it to catch up. 4. Shut down the master using -m fast or -m smart for a clean shutdown.It is not necessary to shut down the replicas yet. 5. pg_upgrade the master using the --link option. Do not start the new version yet. 6. create a data directory for the new version on the replica. This directory should be empty; if it was initdb'd by the installation package, then delete its contents. 7. shut down postgres on the replica. 8. rsync both the old and new data directories from the master to the replica, using the --size-only and -H hard links options. For example, if both 9.3 and 9.4 are in /var/lib/postgresql, do: rsync -aHv --size-only -e ssh --itemize-changes /var/lib/postgresql/ replica-host:/var/lib/postgresql/ 9. Create a recovery.conf file in the replica's data directory with the appropriate parameters. 10. Start the master, then the replica -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
В списке pgsql-hackers по дате отправления: