Odoo Help


Unable to Drop Postgres database.

Sairam Bandaru
on 10/28/15, 3:50 AM 747 views

When am trying to drop database getting this "DETAIL: There are 5 other sessions using the database."

So should drop database without stopping either postgres server or odoo server

Thank you Axel.

Sairam Bandaru
on 10/30/15, 11:54 AM
Axel Mendoza
On 10/28/15, 4:09 AM

If you need to do it in psql or using a postgresql client you could issue this query to stop those sessions:

SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'db_name' AND pid != pg_backend_pid();

Change db_name for your target database to drop

But Odoo itself do this if you drop the database through Odoo database manager ui accesible at:


In the menu drop, select the target database to drop, type the instance admin password and clic drop button or press enter.

Change localhost:8069 in the previous url to match your Odoo instance url

If works for you then you need to vote and accept the answer

Axel Mendoza
on 10/29/15, 12:21 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 10/28/15, 3:50 AM
Seen: 747 times
Last updated: 10/30/15, 11:55 AM