跳至內容
選單
此問題已被標幟
3 回覆
5546 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
0
2月 21
1665
0
9月 18
3210
1
11月 16
8839
0
7月 25
301
1
6月 25
986