You need just increase max_locks_per_transaction option in Postgres config and restart the service
max_locks_per_transaction option