Prevent starting a standalone backend with standby_mode on.
Prevent starting a standalone backend with standby_mode on.

This can't really work because standby_mode expects there to be more
WAL arriving, which there will not ever be because there's no WAL
receiver process to fetch it.  Moreover, if standby_mode is on then
hot standby might also be turned on, causing even more strangeness
because that expects read-only sessions to be executing in parallel.
Bernd Helmle reported a case where btree_xlog_delete_get_latestRemovedXid
got confused, but rather than band-aiding individual problems it seems
best to prevent getting anywhere near this state in the first place.
Back-patch to all supported branches.

In passing, also fix some omissions of errcodes in other ereport's in
readRecoveryCommandFile().

Michael Paquier (errcode hacking by me)

Discussion: <abfe07ec3d4ea489b18eed06eddbc60053e9a367@eje.credativ.lan>

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