Re: A weird bit in pg_upgrade/exec.c
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: a.akenteva@postgrespro.ru
Cc: pgsql-hackers@postgresql.org
Date: 2017-11-09T16:06:08Z
Lists: pgsql-hackers
a.akenteva@postgrespro.ru wrote: > This function has two calls: > check_bin_dir(&old_cluster); > check_bin_dir(&new_cluster); > > I'd like to substitute these last two lines with this: > get_bin_version(cluster); Odd indeed. One would think that if a cluster variable is passed as parameter, the global vars should not be used. +1 for fixing it, and your proposal sounds as good as any. > Doing it would simplify the patch I'm writing, but I'm worried I might break > something that's been there for a long time and has been working fine. I think odd coding this was introduced recently because of the pg_resetxlog -> pg_resetwal renaming. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix bogus logic for checking data dirs' versions within pg_upgrade.
- 4b02e935fee8 10.2 landed
- 164d6338785b 11.0 landed
-
Fix bogus logic for checking executables' versions within pg_upgrade.
- 115a70756338 10.2 landed
- 9be95ef156e7 11.0 landed