Moving a root virtualserver to inside other virtualserver resturn error in postgresql user change name when user has tables

I have a virtualserver wich is not a sub server. I have one postgresql database, and the owner of the database is the postgresql user generated by virtualmin, so the tables inside the database are owned by the same user.

I go to server configuration -> Move server, and i choose one virtualserver to make it his parent. The script make the work fine except for the database user. It doesn't change the user name because it has tables in property.

Renaming PostgreSQL user ..
.. PostgreSQL database failed! : SQL drop user "domain.com" failed : ERROR: role "domain.com" cannot be dropped because some objects depend on it DETAIL: 165 objects in database prepara_beta at /usr/share/webmin/web-lib-funcs.pl line 1397, line 4.

Maybe it's possible to, instead changing the username of the database user, create a new user, change the ownserships of databases and tables, and delete the old user... I don't know, perl is not my language.

Status: 
Closed (fixed)

Comments

Which PostreSQL version are you running there? Virtualmin should deal with this situation (by changing the ownership of objects), for PostgreSQL versions 8 and above.

Actually, I see the bug that causes this - not all objects were being re-assigned to the new user. It will be fixed in the next release.

Status: Active ยป Fixed