Обсуждение: pg_ugprade use of --check and --link
In a private bug report, I have realized that if you are eventually going to be using link mode with pg_upgrade, and you run --check mode, you should use --link with --check to check that both clusters are on the same file system. I have documented this with the attached, applied patch, and backpatched it to 9.2. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
Bruce Momjian wrote: > In a private bug report, I have realized that if you are eventually > going to be using link mode with pg_upgrade, and you run --check mode, > you should use --link with --check to check that both clusters are on > the same file system. Would it make sense to run the filesystem check anyway, and if the check fails say something like "this will fail in --link mode, although copy mode might work" ? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On Thu, Jun 6, 2013 at 10:24:30AM -0400, Alvaro Herrera wrote: > Bruce Momjian wrote: > > In a private bug report, I have realized that if you are eventually > > going to be using link mode with pg_upgrade, and you run --check mode, > > you should use --link with --check to check that both clusters are on > > the same file system. > > Would it make sense to run the filesystem check anyway, and if the > check fails say something like "this will fail in --link mode, although > copy mode might work" ? I thought about that, but the problem is that the return value of --check should be success/fail. We could do the check always, and issue a warning, but you would still need to use --link with --check if you wanted a valid return value --- that seemed just too awkward. Documenting the --link requirement seemed clearer. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +