1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Cannot delete site: postgresql role "username" cannot be dropped

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by JesK, Nov 9, 2010.

  1. JesK

    JesK Guest

    0
     
    Hi everyone,

    I have tried to delete a site ever since 9.2.3, but cannot do so. I am getting this error when I try:

    Error: ERROR: role "vaco" cannot be dropped because some objects depend on it DETAIL: 312 objects in database vaco

    The site has been deleted from /var/www/vhosts - so it is not live, and hence, I cannot log in to the site to delete the postgresql database. Tt irritates me that I cannot get rid of the subscription.

    Anyone have a solution to how to get rid of this database?

    I tried: /usr/local/psa/bin/database -r vaco
    but this command yields same error.
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
  3. JesK

    JesK Guest

    0
     
    Hi Igor,

    Thanks for the reply - but how do I get in to the postgres database to do this?

    /Jes
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
  5. JesK

    JesK Guest

    0
     
    Igor - I do know how to log in to postgres - what I don't know is which user I need to log in with to do what you suggest.

    Second of all, I don't know which database Plesk use to store these information.

    And third, I have no clue as to what password that user has - is it some random hash that Plesk stores somewhere, or could it be something I defined?

    I did try to su to the posgres user, then run psql postgres - was asked a password, and entered the control panel admin password. No go.
     
  6. JesK

    JesK Guest

    0
     
    Sorry, I figured it out.

    su admin
    psql template1
    Password: (Enter control panel password)

    template1=# drop database vaco;
    template1=# drop user vaco;
    \q

    This did the trick - after this I was able to delete the site/subscription.

    Thanks for the pointer. :)

    /Jes
     
Loading...