> But I don’t think I would want to create a real database user for every version of the app.
Why not? Database users are (usually) not expensive, and with groups you can give access to a group you just add the user to.
Adding this logic to the connection pooler seems more complicated.
Because it means connecting to the database to provision a new user on every deploy.
Also because it doesn’t really concern the database, it concerns the pooler.
Connection poolers already maintain multiple pools, it would not be complicated at all.