Fix a couple of problems pointed out by Fujii Masao in the 2008-Apr-05 patch
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Sep 2008 16:42:15 +0000 (16:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Sep 2008 16:42:15 +0000 (16:42 +0000)
commit245396b77f73091b5cf352da82dffa0dbf0f1b39
tree938da52328360273654bd73b859be7090fca3a1b
parent97a144cd9ad2aaa4b1cfbdf40069cc8beed798a3
Fix a couple of problems pointed out by Fujii Masao in the 2008-Apr-05 patch
for pg_stop_backup.  First, it is possible that the history file name is not
alphabetically later than the last WAL file name, so we should explicitly
check that both have been archived.  Second, the previous coding would wait
forever if a checkpoint had managed to remove the WAL file before we look for
it.

Simon Riggs, plus some code cleanup by me.
src/backend/access/transam/xlog.c