pg_upgrade: Improve error checking in rewriteVisibilityMap.

Robert Haas <rhaas@postgresql.org>

Commit: aba8943082f1ccbfb19f2e7ff02ba3be0fcb6c9d
Author: Robert Haas <rhaas@postgresql.org>
Date: 2016-06-06T10:17:10Z
Releases: 9.6.0
pg_upgrade: Improve error checking in rewriteVisibilityMap.

In the old logic, if read() were to return an error, we'd silently stop
rewriting the visibility map at that point in the file.  That's safe,
but reporting the error is better, so do that instead.

Report by Andres Freund.  Patch by Masahiko Sawada, with one correction
by me.

Files

PathChange+/−
src/bin/pg_upgrade/file.c modified +13 −2