Re: pg_upgrade --logfile option documentation
От | Bruce Momjian |
---|---|
Тема | Re: pg_upgrade --logfile option documentation |
Дата | |
Msg-id | 20120229024541.GA6040@momjian.us обсуждение исходный текст |
Ответ на | Re: pg_upgrade --logfile option documentation (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: pg_upgrade --logfile option documentation
(Robert Haas <robertmhaas@gmail.com>)
Re: pg_upgrade --logfile option documentation (Bruce Momjian <bruce@momjian.us>) |
Список | pgsql-hackers |
On Tue, Feb 28, 2012 at 02:15:30PM -0500, Bruce Momjian wrote: > On Tue, Feb 28, 2012 at 01:24:45PM -0500, Robert Haas wrote: > > > Running this script will delete the old cluster's data files: > > > /usr/local/pgdev/pg_upgrade/delete_old_cluster.sh > > > > I think you should rename the old control file just before the step > > that says "linking user relation files". That's the point after which > > it becomes unsafe to start the old cluster, right? > > Yes, it is true that that is the danger point, and also it is much less > likely to fail at that point --- it usually happens during the schema > creation. I would have to add some more conditional wording without > clearly stating if the old suffix is present. OK, I have implemented both Roberts and Àlvaro's ideas in my patch. I only add the .old suffix to pg_controldata when link mode is used, and I now do it after the schema has been created (the most common failure case for pg_upgrade), and just before we actually link files --- both very good ideas. Patch attached; new pg_upgrade output with link mode below. --------------------------------------------------------------------------- Performing Consistency Checks ----------------------------- Checking current, bin, and data directories ok Checking cluster versions ok Checking database user is a superuser ok Checking for prepared transactions ok Checking for reg* system OID user data types ok Checking for contrib/isn with bigint-passing mismatch ok Creating catalog dump ok Checking for prepared transactions ok Checking for presence of required libraries ok If pg_upgrade fails after this point, you must re-initdb the new cluster before continuing. Performing Upgrade ------------------ Analyzing all rows in the new cluster ok Freezing all rows on the new cluster ok Deleting new commit clogs ok Copying old commit clogs to new server ok Setting next transaction ID for new cluster ok Resetting WAL archives ok Setting frozenxid counters in new cluster ok Creating databases in the new cluster ok Adding support functions to new cluster ok Restoring database schema to new cluster ok Removing support functions from new cluster ok Adding ".old" suffix to old global/pg_control ok If you want to start the old cluster, you will need to remove the ".old" suffix from /u/pgsql.old/data/global/pg_control.old. Because "link" mode was used, the old cluster cannot be safely started once the new cluster has been started. Linking user relation files ok Setting next OID for new cluster ok Creating script to delete old cluster ok Upgrade complete ---------------- Optimizer statistics are not transferred by pg_upgrade so consider running: vacuumdb --all --analyze-only on the newly-upgraded cluster. Running this script will delete the old cluster's data files: /usr/local/pgdev/pg_upgrade/delete_old_cluster.sh -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
Вложения
В списке pgsql-hackers по дате отправления: