Avoid throwing ERROR during WAL replay of DROP TABLESPACE.
Avoid throwing ERROR during WAL replay of DROP TABLESPACE.

Although we will not even issue an XLOG_TBLSPC_DROP WAL record unless
removal of the tablespace's directories succeeds, that does not guarantee
that the same operation will succeed during WAL replay.  Foreseeable
reasons for it to fail include temp files created in the tablespace by Hot
Standby backends, wrong directory permissions on a standby server, etc etc.
The original coding threw ERROR if replay failed to remove the directories,
but that is a serious overreaction.  Throwing an error aborts recovery,
and worse means that manual intervention will be needed to get the database
to start again, since otherwise the same error will recur on subsequent
attempts to replay the same WAL record.  And the consequence of failing to
remove the directories is only that some probably-small amount of disk
space is wasted, so it hardly seems justified to throw an error.
Accordingly, arrange to report such failures as LOG messages and keep going
when a failure occurs during replay.

Back-patch to 9.0 where Hot Standby was introduced.  In principle such
problems can occur in earlier releases, but Hot Standby increases the odds
of trouble significantly.  Given the lack of field reports of such issues,
I'm satisfied with patching back as far as the patch applies easily.

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