Fix possible pg_basebackup failure on standby with "include WAL".
Fix possible pg_basebackup failure on standby with "include WAL".

If a restartpoint flushed no dirty buffers, it could fail to update
the minimum recovery point, leading to a minimum recovery point prior
to the starting REDO location.  perform_base_backup() would interpret
that as meaning that no WAL files at all needed to be included in the
backup, failing an internal sanity check.  To fix, have restartpoints
always update the minimum recovery point to just after the checkpoint
record itself, so that the file (or files) containing the checkpoint
record will always be included in the backup.

Code by Amit Kapila, per a design suggestion by me, with some
additional work on the code comment by me.  Test case by Michael
Paquier.  Report by Kyotaro Horiguchi.

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