DB Query for Audit Purposes

Folks,
At our company we have a internal Gitlab instance. We have been asked by the Audit Team to provide a list of users where their access level is greater than reporter (20), in all groups/subgroups/projects. As we have read access to Gitlab DB (PostgreSQL), we are running a query to get this list.

"select n.description, n.id as group_id, n.name as group_name, u.id as user_id, u.username, p.id as project_id, p.name as project_name, pa.access_level from project_authorizations pa
join users u on u.id = pa.user_id
join identities i on i.user_id = u.id
join projects p on p.id = pa.project_id
join namespaces n on n.id = p.namespace_id
where pa.access_level > 20
and n.path <> u.username
and i.provider = 'ldapmain’
order by n.description, n.name, u.username, p.name"

The issue is related to the join on project_authorizations table. It has more than 1.4 million lines, causing an error on PostgreSQL:

ERROR: canceling statement due to conflict with recovery DETAIL: User query might have needed to see row versions that must be removed. SQL state: 40001

We know that are options to enable on server side that might help solve this, however we don´t have rights to change that (and have no idea about the side affects).

Do you guys know any other way to get this list (maybe using the API)?

Thanks in advance,