> now you don't want a DB user per end user.
`RESET ROLE; SET ROLE app_username;` could be done for each query / transaction / when fetching the connection from the pool.
`RESET ROLE; SET ROLE app_username;` could be done for each query / transaction / when fetching the connection from the pool.
Also, it’s more convenient to use SET LOCAL ROLE <ROLE_NAME>, since that only keeps the role for the transaction. Manually resetting it is error prone (IME), and forgetting will have the supposedly “temporary” role bleed to the next transaction.