Fix cross-version compatibility checks of pg_verify_checksums
authorMichael Paquier <michael@paquier.xyz>
Wed, 13 Mar 2019 00:51:02 +0000 (09:51 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 13 Mar 2019 00:51:02 +0000 (09:51 +0900)
commitc9ae7f704c6772a99a456ed50d226c1fdf23f6d7
tree258882a892230b29c4700adddd6351666497ab69
parent3f34283973a342aa1cb709d6e8f5cea430efcf29
Fix cross-version compatibility checks of pg_verify_checksums

pg_verify_checksums performs a read of the control file, and the data it
fetches should be from a data folder compatible with the major version
of Postgres the binary has been compiled with, but we never actually
checked that compatibility.

Reported-by: Sergei Kornilov
Author: Michael Paquier
Reviewed-by: Sergei Kornilov
Discussion: https://postgr.es/m/155231347133.16480.11453587097036807558.pgcf@coridan.postgresql.org
Backpatch-through: 11
src/bin/pg_verify_checksums/pg_verify_checksums.c