Padnag is a utility I’ve written to synchronize PostgreSQL database roles with Active Directory groups & group members.
Create the database role hierarchy you need, even when the AD is differently organised.
Straight one-to-one mapping from AD to DB or link multiple OUs, groups and roles.
Database roles can associated with one or several Active Directory groups - and vice versa -
an Active Directory group can be tied to one or several database roles.