I have a database with some tables that was created by a certain user. All tables and sequences in that DB were owned by that user. I needed to change the owner of those tables and sequences to be able to run certain operations (Django Migrations).
In doing so, I changed it to postgres by mistake:
REASSIGN OWNED BY delme TO postgres;
Now, when I attempt to correct the oversight, I get the following:
db_name=# REASSIGN OWNED BY postgres TO django_development;
ERROR: cannot reassign ownership of objects owned by role postgres because they are required by the database system
How can I change ownership of that entire db's contents to django_development user?