Fix initdb --sync-only to also sync tablespaces.

Andres Freund <andres@anarazel.de>

Commit: 522c85a6a27b614589543eddb68a4c8f7fcac901
Author: Andres Freund <andres@anarazel.de>
Date: 2014-11-15T00:19:40Z
Releases: 9.5.0
Fix initdb --sync-only to also sync tablespaces.

630cd14426dc added initdb --sync-only, for use by pg_upgrade, by just
exposing the existing fsync code. That's wrong, because initdb so far
had absolutely no reason to deal with tablespaces.

Fix --sync-only by additionally explicitly syncing each of the
tablespaces.

Backpatch to 9.3 where --sync-only was introduced.

Abhijit Menon-Sen and Andres Freund

Files

PathChange+/−
src/bin/initdb/initdb.c modified +61 −2