Only recycle normal files in pg_xlog as WAL segments. pg_standby creates symbolic links with the -l option, and as Fujii Masao pointed out we ended up overwriting files in the archive directory before this patch. Patch by Aidan Van Dyk, Fujii Masao and me.
Only recycle normal files in pg_xlog as WAL segments. pg_standby creates
symbolic links with the -l option, and as Fujii Masao pointed out we ended up
overwriting files in the archive directory before this patch. Patch by
Aidan Van Dyk, Fujii Masao and me.

Backpatch to 8.3, where pg_standby was introduced.

snaga/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,snaga/postgres-xl,yuanzhao/gpdb,Chibin/gpdb,techdragon/Postgres-XL,yazun/postgres-xl,jmcatamney/gpdb,postmind-net/postgres-xl,Postgres-XL/Postgres-XL,yuanzhao/gpdb,pavanvd/postgres-xl,Chibin/gpdb,zeroae/postgres-xl,xinzweb/gpdb,yuanzhao/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,tpostgres-projects/tPostgres,ovr/postgres-xl,snaga/postgres-xl,yazun/postgres-xl,edespino/gpdb,postmind-net/postgres-xl,50wu/gpdb,edespino/gpdb,adam8157/gpdb,zeroae/postgres-xl,xinzweb/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,Chibin/gpdb,oberstet/postgres-xl,greenplum-db/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,ovr/postgres-xl,kmjungersen/PostgresXL,yuanzhao/gpdb,kmjungersen/PostgresXL,50wu/gpdb,postmind-net/postgres-xl,adam8157/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,arcivanov/postgres-xl,Postgres-XL/Postgres-XL,techdragon/Postgres-XL,yuanzhao/gpdb,yazun/postgres-xl,xinzweb/gpdb,xinzweb/gpdb,yuanzhao/gpdb,edespino/gpdb,oberstet/postgres-xl,kmjungersen/PostgresXL,Chibin/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,yuanzhao/gpdb,pavanvd/postgres-xl,Chibin/gpdb,yuanzhao/gpdb,techdragon/Postgres-XL,edespino/gpdb,adam8157/gpdb,ashwinstar/gpdb,yazun/postgres-xl,50wu/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,xinzweb/gpdb,greenplum-db/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,yuanzhao/gpdb,edespino/gpdb,ashwinstar/gpdb,edespino/gpdb,postmind-net/postgres-xl,greenplum-db/gpdb,50wu/gpdb,ovr/postgres-xl,50wu/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,zeroae/postgres-xl,50wu/gpdb,ovr/postgres-xl,edespino/gpdb,tpostgres-projects/tPostgres,postmind-net/postgres-xl,techdragon/Postgres-XL,adam8157/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,snaga/postgres-xl,50wu/gpdb,Chibin/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,greenplum-db/gpdb,oberstet/postgres-xl,kmjungersen/PostgresXL,yuanzhao/gpdb,arcivanov/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,oberstet/postgres-xl,edespino/gpdb,greenplum-db/gpdb,adam8157/gpdb,ovr/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,ashwinstar/gpdb,lisakowen/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,pavanvd/postgres-xl,edespino/gpdb,lisakowen/gpdb,lisakowen/gpdb,Chibin/gpdb,50wu/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,Chibin/gpdb,xinzweb/gpdb,adam8157/gpdb,kmjungersen/PostgresXL,arcivanov/postgres-xl,zeroae/postgres-xl,Chibin/gpdb,snaga/postgres-xl,ashwinstar/gpdb,edespino/gpdb,oberstet/postgres-xl,adam8157/gpdb