Upgrade: Insufficent privilege for pg_namespace relation


I want to upgrade my nextcloud instance from 12.0.0 to 12.0.2 . It runs with a postgresql database.
When I launch my upgrade command, I have this error message:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT nspname as schema_name FROM pg_namespace WHERE nspname !~ '^pg_.*' and nspname != 'information_schema'':

SQLSTATE[42501]: Insufficient privilege: 7 ERREUR:  droit refusé pour la relation pg_namespace

But, if I connect my template1 postgresql database with my postgresql nextcloud user, I can execute the same select command without issue.

Althougth, I think logs messages don’t give me the right error message.

What is your opinion about that?
Have you an idea to identify the right error (I’ve already used the -vvv option)?



Here is related post about this problem that could be useful: --skip-migration-test option on 12 release