Fix bogus logic for checking data dirs' versions within pg_upgrade.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Nov 2017 16:16:53 +0000 (11:16 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Nov 2017 16:16:53 +0000 (11:16 -0500)
commit164d6338785b0b6c5a1ac30ee3e4b63bd77441ba
tree3b9339db9c417ec5bb5a317b416de54628e4469f
parented9b3606dadb461aac57e41ac509f3892095a394
Fix bogus logic for checking data dirs' versions within pg_upgrade.

Commit 9be95ef15 failed to cure all of the redundancy here: we were
actually calling get_major_server_version() three times for each
of the old and new data directories.  While that's not enormously
expensive, it's still sloppy.

A. Akenteva

Discussion: https://postgr.es/m/f9266a85d918a3cf3a386b5148aee666@postgrespro.ru
src/bin/pg_upgrade/check.c
src/bin/pg_upgrade/exec.c