Odoo Help


Unable to Drop Postgres database.

Sairam Bandaru
on 10/28/15, 3:50 AM 852 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

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

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: 852 times
Last updated: 10/30/15, 11:55 AM