diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/postgresql.py
+++ b/sos/plugins/postgresql.py
@@ -57,4 +57,9 @@ class postgresql(Plugin, RedHatPlugin):
 
     def postproc(self):
         import shutil
-        shutil.rmtree(self.tmp_dir)
+        if self.tmp_dir == None:
+            return
+        try:
+            shutil.rmtree(self.tmp_dir)
+        except:
+            pass
Fix exception in postgresql postproc method

Do not assume that tmp_dir has been set and wrap tree deletion in
a try block.