diff -Nuar bareos-Release-21.1.2.org/core/src/plugins/filed/python/postgres/BareosFdPluginPostgres.py bareos-Release-21.1.2/core/src/plugins/filed/python/postgres/BareosFdPluginPostgres.py
--- bareos-Release-21.1.2.org/core/src/plugins/filed/python/postgres/BareosFdPluginPostgres.py	2022-05-05 10:51:57.293098759 +0200
+++ bareos-Release-21.1.2/core/src/plugins/filed/python/postgres/BareosFdPluginPostgres.py	2022-05-05 10:54:34.070777307 +0200
@@ -183,6 +183,9 @@
                     self.dbuser, database=self.dbname, host=self.dbHost
                 )
 
+            if self.options["role"]:
+              self.dbCon.run("SET ROLE {0}".format(self.options["role"]))
+              bareosfd.DebugMessage(100, "SQL role switched to {0}\n".format(self.options["role"]))
             result = self.dbCon.run("SELECT current_setting('server_version_num')")
             self.pgVersion = int(result[0][0])
             # WARNING: JobMessages cause fatal errors at this stage
