I have a use case to log queries executed by certain users only on certain relations.
By using pgaudit extension, certain users can be excluded or included in the logs via session audit logging:
ALTER USER myuser SET pgaudit.log TO 'NONE';
Using object logging certain relations can be included or excluded using the pg_audit role:
grant select, delete on test_table to rds_pgaudit;
Is there a way to combine these settings so that only queries run by certain users on certain tables are logged?