PostgreSQL handler doesn't work on host installed on Debian 11 (Bullseye)

On Debian 11 (Bullseye), postgres user is installed with nologin as shell

# grep postgres /etc/passwd
postgres:x:108:65534::/home/postgres:/usr/sbin/nologin

Which causes an error when the hander list databases :

# su - postgres -c 'psql -AtU postgres -c \"SELECT datname FROM pg_database WHERE NOT datistemplate\"'
This account is currently not available.

And, even worse, the handler continues and tries to dump databases "This", "Account", "is", "currently", etc.

# ls /var/backups/postgres/
account.pg_dump.gz     currently.pg_dump.gz  is.pg_dump.gz   This.pg_dump.gz
available..pg_dump.gz  globals.sql.gz        not.pg_dump.gz

chsh postgres -s /bin/bash fixes the problem, but backupninja should work out of the box. I don't know yet what would be the best solution. Using sudo -u instead of su - works, but backupninja should not depends on sudo…

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information