Fix initdb --sync-only to also sync tablespaces.
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

jmcatamney/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,jmcatamney/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb