I was learning PostgreSQL like a year ago and started to fill information on a database that the Postgres user was the owner. This data is a lot, and now I want to move it to production but as is known this is a very bad practice, so I created another user and ran the command
ALTER DATABASE modelos_vehiculos OWNER TO new_user;
To transfer the ownership to the new user. The response on psql was
ALTER DATABASE
But now when I try to log with the new user, it says that the user have no permission. I saw on pgadmin and the new user is the owner, but this can't do anything on the database neither SELECT, INSERT,...
How can I concede all the permissions to this user?
I also saw that the correct way to do this is with this command instead of the ALTER one
REASSIGN OWNED BY old_name TO new_name;
But this command can't be used when the owner is the Postgres user because It will transfer all the databases to the user, including the databases used by Postgres to operate.