Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
5593 มุมมอง

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.

คำตอบที่ดีที่สุด

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:

http://localhost:8069/web/database/manager#action=database_manager

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 21
1699
0
ก.ย. 18
3266
1
พ.ย. 16
8898
1
ก.ค. 25
451
1
มิ.ย. 25
1064