You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Avoid throwing ERROR during WAL replay of DROP TABLESPACE.
Although we will not even issue an XLOG_TBLSPC_DROP WAL record unlessremoval of the tablespace's directories succeeds, that does not guaranteethat the same operation will succeed during WAL replay. Foreseeablereasons for it to fail include temp files created in the tablespace by HotStandby 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 databaseto start again, since otherwise the same error will recur on subsequentattempts to replay the same WAL record. And the consequence of failing toremove the directories is only that some probably-small amount of diskspace is wasted, so it hardly seems justified to throw an error.Accordingly, arrange to report such failures as LOG messages and keep goingwhen a failure occurs during replay.Back-patch to 9.0 where Hot Standby was introduced. In principle suchproblems can occur in earlier releases, but Hot Standby increases the oddsof trouble significantly. Given the lack of field reports of such issues,I'm satisfied with patching back as far as the patch applies easily.